/* IDL Digital Command Center — slice 1.
   Black & white, high contrast, ONE accent color (--accent).
   Motion: fades, slides, hover states only. */

:root {
  --bg: #0a0a0b;
  --panel: #121214;
  --line: #26262b;
  --text: #f4f4f2;
  --muted: #8e8e96;
  --accent: #00e37f;
  --danger: #ff5d5d;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "JetBrains Mono", Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
}

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

/* Bare links. Without this the browser default blue/purple lands on a
   near-black shell — unreadable, and visited links look broken. Classed
   links (.btn, .nav-link, …) set their own colour and win on specificity. */
a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
a:visited { color: var(--accent); }
a:hover { color: var(--text); }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
}

/* ---------- shell ---------- */

.shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.nav {
  border-right: 1px solid var(--line);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.content {
  padding: 44px clamp(20px, 5vw, 64px);
  max-width: 1040px;
  width: 100%;
  animation: fade-in 0.25s ease both;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- brand ---------- */

.brand { display: flex; flex-direction: column; line-height: 1.2; }

.brand-mark {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  color: var(--bg);
  background: var(--accent);
  padding: 2px 8px;
  align-self: flex-start;
}

.brand-name {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.28em;
  margin-top: 6px;
}

.brand-sub {
  font-family: var(--mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted);
  margin-top: 4px;
}

/* ---------- nav ---------- */

.nav-links { display: flex; flex-direction: column; gap: 2px; flex: 1; }

.nav-label {
  font-family: var(--mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted);
  margin: 18px 0 6px;
}

.nav-label:first-child { margin-top: 0; }

.nav-link {
  color: var(--text);
  text-decoration: none;
  padding: 8px 10px;
  font-size: 0.95rem;
  border-left: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease, transform 0.15s ease,
              background 0.15s ease;
}

.nav-link:hover { color: var(--accent); transform: translateX(3px); }

.nav-link.active {
  border-left-color: var(--accent);
  background: var(--panel);
  font-weight: 600;
}

.nav-link.is-disabled {
  color: #4a4a52;
  cursor: not-allowed;
  user-select: none;
}

.nav-link.is-disabled:hover { color: #4a4a52; transform: none; }

.nav-foot {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.who { display: flex; align-items: center; gap: 8px; }
.who-name { font-weight: 700; }

/* ---------- badges ---------- */

.badge {
  font-family: var(--mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 2px 6px;
}

.badge-temp { border-color: var(--accent); color: var(--accent); }

/* ---------- page structure ---------- */

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.eyebrow {
  display: block;
  font-family: var(--mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--accent);
  margin-bottom: 8px;
}

h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); font-weight: 800; letter-spacing: -0.01em; }

.panel { margin-top: 36px; }

.panel-title {
  font-family: var(--mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.muted { color: var(--muted); }

code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 1px 5px;
}

/* ---------- stats ---------- */

.stat-row { display: flex; gap: 16px; flex-wrap: wrap; }

.stat {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 22px 26px;
  min-width: 170px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

a.stat:hover { border-color: var(--accent); transform: translateY(-2px); }

.stat-value {
  font-family: var(--mono);
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1.1;
}

.stat-label {
  font-family: var(--mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}

/* ---------- forms ---------- */

.stack { display: flex; flex-direction: column; gap: 18px; }
.form-wide { max-width: 720px; }

.field { display: flex; flex-direction: column; gap: 6px; }

.field-label {
  font-family: var(--mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}

input, textarea {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  font: inherit;
  padding: 11px 12px;
  transition: border-color 0.15s ease;
  width: 100%;
}

textarea { resize: vertical; font-family: var(--mono); font-size: 0.92rem; }

input:focus, textarea:focus { outline: none; border-color: var(--accent); }

.form-actions { display: flex; gap: 12px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 11px 20px;
  border: 1px solid var(--text);
  background: transparent;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn:hover { background: var(--text); color: var(--bg); }

.btn-primary { border-color: var(--accent); background: var(--accent); color: var(--bg); font-weight: 700; }
.btn-primary:hover { background: transparent; color: var(--accent); }

.btn-ghost { border-color: var(--line); color: var(--muted); }
.btn-ghost:hover { border-color: var(--text); background: transparent; color: var(--text); }

.btn-danger:hover { border-color: var(--danger); color: var(--danger); }

/* ---------- notes ---------- */

.note-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }

.note-item {
  display: flex;
  align-items: stretch;
  gap: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  transition: border-color 0.15s ease;
}

.note-item:hover { border-color: var(--accent); }

.note-link {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  color: var(--text);
  text-decoration: none;
  min-width: 0;
}

.note-title { font-weight: 700; font-size: 1.05rem; }

.note-snippet {
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.note-meta {
  font-family: var(--mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-top: 4px;
}

.note-delete { display: flex; align-items: center; padding-right: 14px; }

.empty {
  border: 1px dashed var(--line);
  padding: 48px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
  color: var(--muted);
}

/* ---------- tables ---------- */

.table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }

.table th, .table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.table thead th {
  font-family: var(--mono);
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.table .num, .table td.num { text-align: right; font-family: var(--mono); }

/* ---------- pitch practice ---------- */

select {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  font: inherit;
  padding: 11px 12px;
  width: 100%;
}

select:focus { outline: none; border-color: var(--accent); }

.mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.mode-card {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.15s ease;
}

.mode-card:hover { border-color: var(--accent); }

.mode-num {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--accent);
}

.mode-card h2 { font-size: 1.25rem; }
.mode-card form { margin-top: auto; }

/* progress + objections */

.progress { height: 3px; background: var(--line); margin-bottom: 28px; }
.progress-fill { display: block; height: 100%; background: var(--accent); transition: width 0.3s ease; }

.objection {
  border-left: 3px solid var(--accent);
  background: var(--panel);
  padding: 26px 28px;
  margin-bottom: 24px;
}

.objection-cat {
  font-family: var(--mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.objection-text {
  font-size: clamp(1.3rem, 3.5vw, 1.85rem);
  font-weight: 700;
  line-height: 1.35;
  margin-top: 10px;
}

.last-score {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  padding: 12px 14px;
  margin-bottom: 20px;
  font-size: 0.92rem;
  animation: fade-in 0.2s ease both;
}

.score-pill {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.78rem;
  padding: 3px 9px;
  border: 1px solid var(--line);
  white-space: nowrap;
}

.score-4, .score-5 { border-color: var(--accent); color: var(--accent); }
.score-1, .score-2 { border-color: var(--muted); color: var(--muted); }

/* An unresolved fabrication flag is the loudest thing on the screen. It was
   the most muted — the exact inversion of what it means. */
.flag-open {
  border-color: var(--danger); color: var(--bg); background: var(--danger); font-weight: 700;
}

.rep { border-top: 1px solid var(--line); padding: 16px 0; }
.rep-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.rep-objection { font-weight: 700; }
.rep-answer { color: var(--muted); margin: 6px 0; white-space: pre-wrap; }
.rep-feedback { font-size: 0.92rem; border-left: 2px solid var(--accent); padding-left: 10px; }

.plain-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.plain-list li { border-left: 2px solid var(--accent); padding-left: 12px; }

/* conversation */

.convo-head { align-items: flex-start; }
.convo-actions { display: flex; align-items: center; gap: 14px; }

.timer {
  font-family: var(--mono);
  font-size: 1.15rem;
  font-weight: 700;
  border: 1px solid var(--line);
  padding: 6px 12px;
  min-width: 74px;
  text-align: center;
}

.convo {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 22px;
}

.convo-empty { text-align: center; padding: 28px 0; }

.bubble {
  max-width: 78%;
  padding: 12px 15px;
  border: 1px solid var(--line);
  animation: fade-in 0.2s ease both;
}

.bubble p { white-space: pre-wrap; }

.bubble-them { align-self: flex-start; background: var(--panel); }

.bubble-you {
  align-self: flex-end;
  border-color: var(--accent);
  background: transparent;
}

.bubble-who {
  display: block;
  font-family: var(--mono);
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 5px;
}

.bubble-you .bubble-who { color: var(--accent); }

.convo-form {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  position: sticky;
  bottom: 0;
  background: var(--bg);
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.convo-form textarea { flex: 1; font-family: var(--sans); font-size: 1rem; }

.line-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.line-form select { width: auto; min-width: 120px; }
.line-form input { flex: 1; min-width: 200px; }

.persona-card {
  border: 1px solid var(--accent);
  background: var(--panel);
  padding: 22px 24px;
  margin-bottom: 26px;
}

.persona-card h2 { font-size: 1.2rem; margin: 6px 0; }
.persona-card p { margin-top: 8px; }

/* ---------- prospects + outreach ---------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.filters input, .filters select { width: auto; min-width: 130px; flex: 0 1 auto; }
.filters input[name="q"] { flex: 1 1 200px; }

.table-scroll { overflow-x: auto; }

.table thead th a { color: var(--muted); text-decoration: none; }
.table thead th a:hover, .table thead th a.sorted { color: var(--accent); }

.inline-form { display: inline; }
.btn-tiny { padding: 5px 10px; font-size: 0.66rem; }

.pill {
  font-family: var(--mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border: 1px solid var(--line);
  padding: 2px 7px;
  white-space: nowrap;
}

.pill-interested, .pill-mockup_sent { border-color: var(--accent); color: var(--accent); }
.pill-closed { border-color: var(--accent); background: var(--accent); color: var(--bg); }
.pill-dead { color: #5a5a62; border-color: #33333a; }

.field-row { display: flex; gap: 14px; flex-wrap: wrap; }
.field-row .field { flex: 1 1 180px; }

.checkbox-field { flex-direction: row; align-items: center; gap: 10px; }
.checkbox-field input { width: auto; }

.notice {
  border: 1px solid var(--accent);
  background: var(--panel);
  padding: 14px 16px;
  margin-bottom: 22px;
  font-size: 0.92rem;
}

.draft-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.btn[disabled]:hover { background: transparent; color: var(--muted); }

/* feed */

.feed { list-style: none; display: flex; flex-direction: column; }

.feed-item {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
  flex-wrap: wrap;
}

.feed-when { font-family: var(--mono); font-size: 0.66rem; color: var(--muted); min-width: 145px; }
.feed-who { font-weight: 700; }
.feed-what { color: var(--muted); }
.feed-where { color: var(--accent); text-decoration: none; }
.feed-where:hover { text-decoration: underline; }

/* today */

.today-grid { display: grid; grid-template-columns: 1fr 280px; gap: 32px; align-items: start; }

.today-group { margin-bottom: 26px; display: flex; flex-direction: column; gap: 8px; }

.today-channel {
  font-family: var(--mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
}

.today-card {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 14px 16px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.today-card:hover { border-color: var(--accent); transform: translateX(3px); }
.today-name { font-weight: 700; font-size: 1.05rem; }
.today-meta { color: var(--muted); font-size: 0.85rem; display: flex; align-items: center; gap: 8px; }
.today-due { font-family: var(--mono); font-size: 0.62rem; color: var(--muted); letter-spacing: 0.1em; }

.team-card { border-top: 1px solid var(--line); padding: 12px 0; display: flex; flex-direction: column; gap: 4px; }
.team-name { font-weight: 700; }
.team-count { font-family: var(--mono); font-size: 0.66rem; color: var(--accent); letter-spacing: 0.14em; }
.team-list { color: var(--muted); font-size: 0.85rem; }

/* walking route */

.route-list { list-style: none; counter-reset: stop; }

.route-item {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.route-main { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.route-name { font-weight: 700; color: var(--text); text-decoration: none; }
.route-name:hover { color: var(--accent); }
.route-meta { color: var(--muted); font-size: 0.85rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.route-move { display: flex; gap: 6px; }

.route-view { max-width: 620px; margin: 0 auto; }

.route-progress {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

/* Real tap target — this gets pressed one-handed on a sidewalk. */
.route-exit {
  color: var(--muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px 0 0;
}

.route-exit:hover { color: var(--accent); }

.route-stop { padding: 26px 0 20px; }
.route-business { font-size: clamp(1.8rem, 6vw, 2.6rem); line-height: 1.1; margin: 8px 0; }

.outcome-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }

.outcome-btn {
  padding: 18px 12px;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  min-height: 60px;
}

.route-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; gap: 12px; }

/* ---------- chat ---------- */

.chat-layout { display: grid; grid-template-columns: 240px 1fr; gap: 26px; align-items: start; }

.chat-sidebar { border-right: 1px solid var(--line); padding-right: 20px; }

.chat-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.chat-list { list-style: none; display: flex; flex-direction: column; gap: 4px; }

.chat-list-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  text-decoration: none;
  color: var(--text);
  border-left: 2px solid transparent;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.chat-list-item:hover { background: var(--panel); }
.chat-list-item.active { border-left-color: var(--accent); background: var(--panel); }

.chat-list-title {
  font-weight: 700;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-list-meta {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.chat-cap {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.chat-main { display: flex; flex-direction: column; min-width: 0; }

.chat-head { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.chat-rename { display: flex; gap: 8px; align-items: center; flex: 1; }
.chat-rename input { font-size: 1.15rem; font-weight: 700; border-color: transparent; background: transparent; }
.chat-rename input:focus { border-color: var(--accent); background: var(--panel); }

.mode-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 14px 0 18px; }
.mode-btn { padding: 8px 16px; font-size: 0.7rem; }
.mode-on { border-color: var(--accent); background: var(--accent); color: var(--bg); font-weight: 700; }
.mode-blurb { font-size: 0.8rem; }

.chat-main .convo, .gc-room {
  max-height: 58vh;
  overflow-y: auto;
  padding-right: 6px;
  scroll-behavior: smooth;
}

.bubble-bot {
  align-self: flex-start;
  border-left: 3px solid var(--accent);
  background: var(--panel);
}

.bubble-bot .bubble-who { color: var(--accent); }

/* ---------- mockups (admin side) ---------- */

.notice-alert { border-color: var(--danger); }

.share-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.share-row input { flex: 1; min-width: 220px; font-family: var(--mono); font-size: 0.85rem; }

.qr {
  display: block;
  background: #fff;
  padding: 10px;
  border: 1px solid var(--line);
  width: 200px;
  height: 200px;
}

@media (max-width: 800px) {
  .share-row { flex-direction: column; align-items: stretch; }
  .share-row input { width: 100%; }
}

/* ---------- business tools ---------- */

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 24px; flex-wrap: wrap; }

.tab {
  padding: 10px 16px;
  text-decoration: none;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.tab:hover { color: var(--text); }
.tab-on { color: var(--accent); border-bottom-color: var(--accent); }

.contract-text {
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.7;
  white-space: pre-wrap;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 26px;
  overflow-x: auto;
}

/* tasks */

.task-list { list-style: none; display: flex; flex-direction: column; }

.task-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.task-check {
  width: 26px; height: 26px; flex: 0 0 26px;
  border: 1px solid var(--line); background: transparent;
  color: var(--accent); cursor: pointer; font-size: 0.9rem; line-height: 1;
}

.task-check:hover { border-color: var(--accent); }
.task-main { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.task-title { font-weight: 700; }
.task-done .task-title { text-decoration: line-through; color: var(--muted); }
.task-meta { color: var(--muted); font-size: 0.85rem; }
.task-meta a { color: var(--accent); text-decoration: none; }
.task-body { color: var(--muted); font-size: 0.9rem; white-space: pre-wrap; }

.pri {
  font-family: var(--mono); font-size: 0.58rem; text-transform: uppercase;
  letter-spacing: 0.12em; border: 1px solid var(--line); padding: 1px 6px;
}

.pri-high { border-color: var(--accent); color: var(--accent); }
.pri-low { color: #5a5a62; }

/* goals */

.goal, .goal-mini { border-top: 1px solid var(--line); padding: 18px 0; }
.goal-head { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; margin-bottom: 10px; flex-wrap: wrap; }
.goal-title { font-weight: 700; }
.goal-meta { display: block; font-family: var(--mono); font-size: 0.6rem;
             text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); }
.goal-number { font-family: var(--mono); font-weight: 700; white-space: nowrap; }
.goal-actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }

/* portfolio */

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }

.gallery-card {
  border: 1px solid var(--line); background: var(--panel);
  text-decoration: none; color: var(--text); overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.gallery-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.gallery-card img { width: 100%; height: 165px; object-fit: cover; display: block; }
.gallery-blank { height: 165px; display: flex; align-items: center; justify-content: center;
                 color: var(--muted); font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.14em; }
.gallery-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 5px; }
.gallery-title { font-weight: 700; }
.gallery-meta { color: var(--muted); font-size: 0.84rem; }
img.shot { width: 100%; height: auto; border: 1px solid var(--line); margin-bottom: 22px; display: block; }

/* notes */

.notes-layout { display: grid; grid-template-columns: 190px 1fr; gap: 26px; align-items: start; }
.notes-side { display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--line); padding-right: 16px; }

.folder {
  padding: 8px 10px; text-decoration: none; color: var(--text); font-size: 0.9rem;
  border-left: 2px solid transparent;
}

.folder:hover { background: var(--panel); }
.folder.active { border-left-color: var(--accent); background: var(--panel); font-weight: 600; }
.note-item.pinned { border-color: var(--accent); }
.note-actions { display: flex; flex-direction: column; gap: 6px; justify-content: center; padding-right: 14px; }

@media (max-width: 800px) {
  .notes-layout { grid-template-columns: 1fr; gap: 16px; }
  .notes-side { flex-direction: row; overflow-x: auto; border-right: none;
                border-bottom: 1px solid var(--line); padding: 0 0 12px; }
  .folder { white-space: nowrap; border-left: none; border-bottom: 2px solid transparent; }
  .folder.active { border-bottom-color: var(--accent); }
  .note-actions { flex-direction: row; padding: 0 14px 14px; }
  .task-item { flex-wrap: wrap; }
  .task-check { width: 34px; height: 34px; flex-basis: 34px; }
  .gallery { grid-template-columns: 1fr; }
  .contract-text { font-size: 0.78rem; padding: 16px; }
}

/* ---------- flashes ---------- */

.flashes { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }

.flash {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  background: var(--panel);
  padding: 12px 14px;
  font-size: 0.92rem;
  animation: fade-in 0.2s ease both;
}

.flash-error { border-left-color: var(--danger); }

/* ---------- login ---------- */

.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 380px;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  animation: fade-in 0.3s ease both;
}

/* ---------- mobile ---------- */

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

  .nav {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 18px 16px;
    gap: 16px;
  }

  /* One scrolling row instead of a wrapped wall — the nav must not push the
     objection below the fold on a phone. */
  .nav-links {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar { display: none; }
  .nav-link, .nav-label { white-space: nowrap; flex: 0 0 auto; }
  .nav-label { margin: 0 8px 0 0; width: auto; }

  .nav-link { padding: 8px 10px; border-left: none; border-bottom: 2px solid transparent; }
  .nav-link.active { border-bottom-color: var(--accent); }
  .nav-link:hover { transform: none; }

  .nav-foot { flex-direction: row; align-items: center; justify-content: space-between; }

  .content { padding: 24px 16px; }

  .note-item { flex-direction: column; gap: 0; }
  .note-delete { padding: 0 14px 14px; }

  .stat { flex: 1; min-width: 130px; }

  /* Mode 1 gets used standing on a sidewalk: big target, thumb-reachable.
     Form text must be >=16px or iOS Safari zooms the page on every focus. */
  input, textarea, select { font-size: 16px; }
  .objection { padding: 20px; }
  .objection-text { font-size: 1.35rem; }
  .mode-grid { grid-template-columns: 1fr; }
  .bubble { max-width: 92%; }
  .convo-head { flex-direction: column; gap: 12px; }
  .convo-actions { width: 100%; justify-content: space-between; }
  .convo-form { gap: 8px; }
  .convo-form .btn { padding: 14px 18px; }
  .line-form { flex-direction: column; align-items: stretch; }
  .line-form select, .line-form input { width: 100%; }
  .table { font-size: 0.85rem; }
  .table th, .table td { padding: 8px 6px; }

  /* Today and the walking route are the two that get used on a sidewalk. */
  .today-grid { grid-template-columns: 1fr; gap: 24px; }
  .today-card { padding: 16px; }
  .today-name { font-size: 1.15rem; }
  .filters { flex-direction: column; align-items: stretch; }
  .filters input, .filters select { width: 100%; min-width: 0; }
  .field-row { flex-direction: column; gap: 14px; }
  .feed-item { gap: 4px 10px; }
  .feed-when { min-width: 0; width: 100%; }
  .route-business { font-size: 2rem; }
  .outcome-btn { min-height: 68px; font-size: 0.82rem; }
  .route-item { flex-wrap: wrap; }
  .route-move .btn { min-width: 52px; min-height: 44px; }
  .route-nav .btn { min-height: 48px; display: inline-flex; align-items: center; }

  /* Chat: the sidebar becomes a scrolling strip above the conversation. */
  .chat-layout { grid-template-columns: 1fr; gap: 16px; }
  .chat-sidebar { border-right: none; border-bottom: 1px solid var(--line); padding: 0 0 14px; }
  .chat-list { flex-direction: row; overflow-x: auto; gap: 8px; }
  .chat-list { align-items: stretch; }
  .chat-list li { flex: 0 0 auto; max-width: 60vw; min-width: 0; }
  .chat-list-item { border-left: none; border-bottom: 2px solid transparent;
                    min-width: 150px; max-width: 60vw; }
  .chat-list-item.active { border-bottom-color: var(--accent); }
  .chat-main .convo, .gc-room { max-height: 52vh; }
  .mode-blurb { width: 100%; }
}

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

/* ==========================================================================
   DASHBOARD + SHARED POLISH (visual overhaul)
   One accent, square corners, mono for anything numeric or label-shaped.
   Nothing below introduces a second hue: series are separated by opacity.
   ========================================================================== */

:root {
  --grid: #1c1c20;      /* chart gridlines: visible, never assertive */
  --panel-2: #17171a;   /* one step up from --panel, for rows inside a card */
}

.content-wide { max-width: 1280px; }

/* ---------- card grid ---------- */

.grid { display: grid; gap: 14px; margin-bottom: 14px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-charts { grid-template-columns: 1.6fr 1fr; }

.card {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;                       /* lets grid children actually shrink */
  animation: fade-in 0.25s ease both;
}

a.card { text-decoration: none; color: var(--text); transition: border-color 0.15s ease; }
a.card:hover { border-color: var(--accent); }
a.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.card-label {
  font-family: var(--mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.card-link {
  font-family: var(--mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-decoration: none;
}
.card-link:hover { color: var(--accent); }

.card-foot {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--muted);
  letter-spacing: 0.03em;
  margin-top: auto;
}
.card-foot-empty { color: #5a5a64; }

/* ---------- the big numbers ---------- */

.figure {
  font-family: var(--mono);
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.figure-sm { font-size: 1.9rem; }
.figure-accent { color: var(--accent); }
.figure-down { color: var(--danger); }

.stat-card { min-height: 148px; }

.delta-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.delta { display: inline-flex; align-items: center; gap: 4px; }
.delta svg { width: 10px; height: 10px; fill: none; stroke-width: 1.6; }
.delta b { font-family: var(--mono); font-size: 0.68rem; font-weight: 600; }
.delta-up { color: var(--accent); }
.delta-up svg { stroke: var(--accent); }
.delta-down { color: var(--danger); }
.delta-down svg { stroke: var(--danger); }
.delta-flat { color: var(--muted); }
.delta-flat svg { stroke: var(--muted); }
.delta-label { font-family: var(--mono); font-size: 0.68rem; color: var(--muted); }

/* Status ribbon under the pipeline number: share of the board per stage. */
.ribbon { display: flex; gap: 3px; margin-top: 2px; }
.ribbon-seg { height: 3px; min-width: 3px; }
.ribbon-0 { background: var(--accent); }
.ribbon-1 { background: rgba(0, 227, 127, 0.6); }
.ribbon-2 { background: rgba(244, 244, 242, 0.5); }
.ribbon-3 { background: rgba(244, 244, 242, 0.28); }
.ribbon-4 { background: #3a3a42; }

/* ---------- charts ---------- */

.chart-card { min-height: 300px; }
.chart-hold { position: relative; height: 220px; }
.chart-hold canvas { display: block; width: 100% !important; }
.chart-fallback { display: none; }

/* Failed to load: swap the canvas for a sentence rather than a blank box. */
.chart-hold.is-failed canvas { display: none; }
.chart-hold.is-failed .chart-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
  border: 1px dashed var(--line);
}

.legend { display: flex; gap: 12px; flex-wrap: wrap; }
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.swatch { width: 8px; height: 8px; display: inline-block; }
.swatch-1 { background: var(--accent); }
.swatch-2 { background: rgba(244, 244, 242, 0.62); }
.swatch-3 { background: #5a5a64; }

/* Skeletons, never spinners: the shape of what is coming, not a wait cursor. */
.skeleton {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, var(--panel) 20%, var(--panel-2) 40%, var(--panel) 60%);
  background-size: 220% 100%;
  animation: skeleton-sweep 1.1s ease-in-out infinite;
}
.skeleton-chart { border-bottom: 1px solid var(--line); }

@keyframes skeleton-sweep {
  from { background-position: 140% 0; }
  to   { background-position: -40% 0; }
}

/* ---------- funnel ---------- */

.funnel { display: flex; flex-direction: column; gap: 9px; }
.funnel-row { display: flex; align-items: center; gap: 10px; }
.funnel-label {
  font-family: var(--mono);
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  width: 84px;
  flex: none;
}
.funnel-track { flex: 1; height: 12px; background: var(--panel-2); min-width: 0; }
.funnel-bar { height: 100%; transition: width 0.3s ease; }
.funnel-0 { background: var(--accent); }
.funnel-1 { background: rgba(0, 227, 127, 0.72); }
.funnel-2 { background: rgba(0, 227, 127, 0.5); }
.funnel-3 { background: rgba(244, 244, 242, 0.42); }
.funnel-4 { background: rgba(244, 244, 242, 0.24); }
.funnel-count {
  font-family: var(--mono);
  font-size: 0.8rem;
  width: 26px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  flex: none;
}

/* ---------- activity feed ---------- */

.feed {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-height: 232px;
  overflow-y: auto;
  margin: 0;
  padding-right: 4px;
}
.feed:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.feed-row { display: flex; gap: 9px; align-items: baseline; }
.feed-time {
  font-family: var(--mono);
  font-size: 0.58rem;
  color: var(--muted);
  width: 34px;
  flex: none;
  font-variant-numeric: tabular-nums;
}
.feed-body { font-size: 0.85rem; min-width: 0; }
.feed-body b { font-weight: 600; }
.feed-body a { color: var(--accent); text-decoration: none; }
.feed-body a:hover { text-decoration: underline; }

/* ---------- goals + due list ---------- */

.goals { display: flex; flex-direction: column; gap: 14px; }
.goal-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.goal-title { font-size: 0.88rem; }
.goal-num {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.goal-track { height: 4px; background: var(--panel-2); margin-top: 6px; }
.goal-fill { height: 100%; background: var(--accent); transition: width 0.3s ease; }

.due-row { display: flex; align-items: baseline; gap: 9px; border-left: none; padding-left: 0; }
.due-row a { color: var(--accent); text-decoration: none; }
.due-row a:hover { text-decoration: underline; }

.pill-high { border-color: var(--danger); color: var(--danger); }
.pill-med { border-color: var(--line); color: var(--muted); }
.pill-low { border-color: var(--line); color: #5a5a64; }

.head-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- shared polish ---------- */

/* Every wide table scrolls inside its own box; the page never scrolls sideways. */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-compact { font-size: 0.84rem; }
.table-compact th, .table-compact td { padding: 7px 10px 7px 0; }
.num-accent { color: var(--accent); }

.empty { padding: 32px 20px; gap: 10px; }
.empty-mark {
  width: 26px; height: 26px;
  stroke: var(--line); stroke-width: 1.6; fill: none; stroke-linecap: square;
}
.empty-title { font-size: 0.94rem; color: var(--text); margin: 0; }
.empty-hint { font-size: 0.84rem; color: var(--muted); margin: 0; max-width: 34ch; }

/* ---------- dashboard on a phone: one column, charts stay readable ------- */

@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-charts { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 800px) {
  .grid-4, .grid-3, .grid-charts { grid-template-columns: 1fr; }
  .content-wide { max-width: 100%; }
  .figure { font-size: 2.9rem; }        /* fewer cards on screen, so go bigger */
  .stat-card { min-height: 0; }
  .chart-hold { height: 200px; }
  .feed { max-height: 300px; }
  .head-actions { width: 100%; }
  .head-actions .btn { flex: 1; min-height: 44px; }
  .funnel-label { width: 72px; }
}

/* ==========================================================================
   PHONE ERGONOMICS
   The three screens that get used away from a desk — the walking route, Today,
   and the objection drill — plus a floor under every tap target.
   ========================================================================== */

@media (max-width: 800px) {
  /* Apple's 44px floor. Buttons in this app are text-sized by default, which
     is fine with a mouse and not fine with a thumb on a sidewalk. */
  .btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .btn-tiny { min-height: 40px; padding: 8px 14px; }

  /* Today: one card at a time, and "Mark done" big enough to hit while walking. */
  .today-card { padding: 18px 16px; gap: 8px; }
  .today-card .btn-tiny { width: 100%; min-height: 44px; margin-top: 6px; }
  .today-group { gap: 12px; }

  /* The drill is one question and one answer box — nothing else on screen. */
  .drill-form .btn, .objection-form .btn { width: 100%; min-height: 52px; font-size: 0.86rem; }
  .objection-text { line-height: 1.35; }
  textarea { min-height: 140px; }

  /* The route view is full-bleed: it is the only thing you look at. */
  .route-view { padding-top: 4px; }
  .route-stop { padding: 20px 0; }
  .outcome-grid { gap: 10px; }

  /* Forms: labels and controls stack, and nothing sits in a cramped row. */
  .form-actions { flex-direction: column; align-items: stretch; }
  .form-actions .btn { width: 100%; }
  .head-actions .btn { flex: 1; }
}

/* Nothing in the app may push the page sideways. Wide content scrolls inside
   its own container (.table-wrap), never by moving the whole document. */
html, body { max-width: 100%; overflow-x: clip; }
