/* ─────────────────────────────────────────────────────────────────────────
   Greenhouse — admissions pipeline. Custom (non-MudBlazor) UI built on the
   shared .leaf-ds design tokens (warm-neutral + green accent). Scoped to .gh
   inside a .leaf-ds wrapper.
   ───────────────────────────────────────────────────────────────────────── */

.leaf-ds.gh, .leaf-ds .gh { color: var(--ink-1); }
.gh-page { padding: 20px 24px 48px; }

/* Board page: the shell hands it a fixed viewport (.lf-content-fixed) and it divides
   that between a pinned toolbar and the board. No page padding — the shell already
   gutters, and doubling it was eating ~40px on each side. */
.gh-page.gh-page-board { padding: 0; height: 100%; display: flex; flex-direction: column; gap: 10px; min-height: 0; }

/* ── Pinned toolbar ───────────────────────────────────────────────────────
   Filters + stats on their own surface, distinct from the board beneath, and
   collapsible: on a board the content is the point, so the chrome should get out
   of the way. Collapsed keeps a one-line summary — hiding the numbers entirely
   would just make people expand it again. */
.gh-toolbar { flex: 0 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.gh-toolbar-head { display: flex; align-items: center; gap: 12px; padding: 7px 10px 7px 10px; }
.gh-toolbar.is-open .gh-toolbar-head { border-bottom: 1px solid var(--line-2); }
.gh-toolbar-toggle {
    display: inline-flex; align-items: center; gap: 6px; cursor: pointer; flex: 0 0 auto;
    background: transparent; border: 0; padding: 3px 6px; border-radius: 6px;
    font: 700 10.5px/1 var(--font-ui); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3);
}
.gh-toolbar-toggle:hover { background: var(--surface-2); color: var(--ink-1); }
.gh-toolbar-toggle .chev { display: inline-block; transition: transform .18s; font-size: 9px; }
.gh-toolbar.is-open .gh-toolbar-toggle .chev { transform: rotate(90deg); }
.gh-toolbar-spacer { flex: 1 1 auto; }

/* One-line summary shown while collapsed. */
.gh-toolbar-summary { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-2); }
.gh-toolbar-summary b { font-family: var(--rv-font-mono); font-size: 13px; font-weight: 700; color: var(--ink-1); margin-right: 3px; }
.gh-toolbar-summary .is-alert b { color: var(--c-conf-fg); }
.gh-toolbar-summary .filtered { font-weight: 700; color: var(--accent-ink); }

.gh-toolbar-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 12px; }

/* Inside the toolbar the KPIs are a compact strip on the panel's own surface, not
   a row of floating cards — cards read as content, and these are chrome. */
.gh-toolbar .gh-kpis { gap: 0; margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; align-items: stretch; }
.gh-toolbar .gh-kpi { border: 0; border-right: 1px solid var(--line-2); border-radius: 0; padding: 8px 14px; min-width: 104px; background: var(--surface-2); }
.gh-toolbar .gh-kpi:last-child { border-right: 0; }
.gh-toolbar .gh-kpi .k-value { font-size: 20px; margin-top: 2px; }
.gh-toolbar .gh-kpi.is-alert .k-value { color: var(--c-conf-fg); }
.gh-toolbar .gh-filters { margin: 0; gap: 10px; }
.gh-toolbar .gh-filter label { font-size: 10px; }

/* ── Collapsed column ─────────────────────────────────────────────────────
   A stage with nothing in it still matters (it's part of the funnel), but it
   shouldn't cost a full column of width. Collapsed it becomes a narrow spine with
   a vertical title; empty stages start collapsed so the eye goes to the work. */
.gh-col.is-collapsed { flex: 0 0 44px; padding: 8px 4px; cursor: pointer; }
.gh-col.is-collapsed:hover { background: var(--surface); border-color: var(--ink-4); }
.gh-col.is-collapsed .gh-col-body { display: none; }
.gh-col.is-collapsed .gh-col-head { flex-direction: column; align-items: center; gap: 8px; height: 100%; margin: 0; padding: 0; min-height: 0; }
.gh-col.is-collapsed .c-title {
    writing-mode: vertical-rl; text-orientation: mixed; transform: rotate(180deg);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1 1 auto; min-height: 0;
    color: var(--ink-3);
}
.gh-col.is-collapsed .c-count { color: var(--ink-2); }
.gh-col.is-collapsed .gh-col-toggle { transform: rotate(180deg); }

/* Header controls: "open this stage in the table" + collapse.
   Both are always visible with a real resting appearance (border + fill) rather than a
   bare glyph — a control nobody can find is a control that doesn't exist. The table
   button carries the accent tint because it's the less guessable of the two. */
.gh-col-actions { display: inline-flex; align-items: center; gap: 3px; flex: 0 0 auto; }
.gh-col-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; border-radius: 6px; cursor: pointer; flex: 0 0 auto;
    border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
    transition: background .12s, color .12s, border-color .12s;
}
.gh-col-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.gh-col-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.gh-col-btn.is-focus { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent-ink); }
.gh-col-btn.is-focus:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.gh-col-head .c-title { cursor: pointer; }
.gh-col-head .c-title:hover { color: var(--accent-ink); }

/* Header */
.gh-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.gh-head h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; margin: 0; }
.gh-head .gh-sub { font-size: 13px; color: var(--ink-2); margin-top: 2px; }

/* Buttons */
.gh-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-1);
          padding: 7px 14px; border-radius: 8px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s; }
.gh-btn:hover { background: var(--surface-2); border-color: var(--ink-4); }
.gh-btn:disabled { opacity: .5; cursor: not-allowed; }
.gh-btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.gh-btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.gh-btn-ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.gh-btn-ghost:hover { background: var(--surface-2); }

/* KPI strip */
.gh-kpis { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.gh-kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; min-width: 120px; }
.gh-kpi .k-label { font-size: 10.5px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; }
.gh-kpi .k-value { font-family: var(--rv-font-mono); font-size: 26px; font-weight: 700; line-height: 1.1; margin-top: 4px; }
.gh-kpi .k-foot { font-size: 11px; color: var(--ink-2); margin-top: 2px; }

/* ── Kanban board ─────────────────────────────────────────────────────────
   ONE SCROLL AXIS PER ELEMENT. This is the whole trick, and it's what every
   mature board UI (Trello, Jira, Linear, GitHub Projects) does:

     .gh-board      overflow-x: auto;  overflow-y: hidden   -> sideways only
     .gh-col-body   overflow-y: auto;  overflow-x: hidden   -> up/down only
     the document                                            -> doesn't scroll at all

   When a single element can scroll both ways, a trackpad gesture is ambiguous:
   macOS picks an axis from the dominant direction and can switch mid-gesture, so
   "scroll down" sometimes slides the board sideways. Splitting the axes across two
   elements removes the ambiguity — a vertical gesture lands on a column that can
   only go up and down; a horizontal one falls through to the board.

   overscroll-behavior: contain stops a column that has hit its end from chaining
   its momentum into the board (the other half of the same problem). */
.gh-board {
    flex: 1 1 auto; min-height: 0;
    display: flex; gap: 14px; align-items: stretch;
    overflow-x: auto; overflow-y: hidden;
    overscroll-behavior-x: contain;
    padding-bottom: 10px;
}
.gh-col {
    flex: 0 0 252px; align-self: stretch; min-height: 0;
    display: flex; flex-direction: column;
    background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px;
}
.gh-col-head { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; margin-bottom: 8px; padding: 0 2px 0 4px; min-height: 26px; }
.gh-col-head .c-title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gh-col-head .c-title { font-size: 12px; font-weight: 700; color: var(--ink-1); }
.gh-col-head .c-count { font-family: var(--rv-font-mono); font-size: 12px; color: var(--ink-3); }
.gh-col-body {
    flex: 1 1 auto; min-height: 0;
    display: flex; flex-direction: column; gap: 8px;
    overflow-y: auto; overflow-x: hidden;
    overscroll-behavior: contain;
    padding-right: 2px;                 /* room for the scrollbar so cards don't sit under it */
}
.gh-col-empty { font-size: 11.5px; color: var(--ink-4); text-align: center; padding: 10px 0; }

/* Slim column scrollbars — one per column would otherwise be visually noisy. */
.gh-col-body::-webkit-scrollbar { width: 6px; }
.gh-col-body::-webkit-scrollbar-track { background: transparent; }
.gh-col-body::-webkit-scrollbar-thumb { background: transparent; border-radius: 999px; }
.gh-col:hover .gh-col-body::-webkit-scrollbar-thumb { background: var(--line); }
.gh-col-body:hover::-webkit-scrollbar-thumb { background: var(--ink-4); }

/* A taller, always-visible scrollbar makes the board's horizontal scroll discoverable */
.gh-board::-webkit-scrollbar { height: 10px; }
.gh-board::-webkit-scrollbar-track { background: transparent; }
.gh-board::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
.gh-board::-webkit-scrollbar-thumb:hover { background: var(--ink-4); }

/* Board viewport wrapper — fills the remaining page height and anchors the rails. */
.gh-board-wrap { position: relative; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }

/* Edge rails: a scroll arrow + the count of prospects in the stages hidden that way.
   Anchored at the TOP rather than spanning the full height — with long columns a
   full-height strip masked a lot of content to say very little, and the arrow ended up
   vertically miles from the column headers it relates to.
   A rail hides (is-off) when the board can't scroll that way. */
.gh-rail { position: absolute; top: 5px; z-index: 3;
           display: flex; align-items: center; gap: 2px;
           padding: 3px; border-radius: 999px;
           background: var(--surface); border: 1px solid var(--line); box-shadow: 0 2px 8px rgba(0,0,0,.10);
           user-select: none; transition: opacity .15s; }
.gh-rail.is-off { opacity: 0; visibility: hidden; }
.gh-rail-left  { left: 5px; }
.gh-rail-right { right: 5px; flex-direction: row-reverse; }

.gh-rail-btn { cursor: pointer;
               display: inline-flex; align-items: center; justify-content: center;
               width: 26px; height: 26px; border-radius: 999px;
               border: 0; background: transparent; color: var(--ink-1);
               font-size: 16px; font-weight: 700; line-height: 1;
               transition: background .15s, color .15s; }
.gh-rail-btn:hover { background: var(--accent); color: #fff; }

.gh-rail-count { font-family: var(--rv-font-mono); font-size: 12px; font-weight: 700; color: var(--ink-2); padding: 0 7px 0 3px; }
.gh-rail-right .gh-rail-count { padding: 0 3px 0 7px; }
.gh-rail-count.is-empty { display: none; }

/* Prospect card */
.gh-card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 11px; cursor: pointer; text-decoration: none; color: inherit; transition: box-shadow .15s, border-color .15s; }
.gh-card:hover { border-color: var(--accent); box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.gh-card .c-name { font-size: 13.5px; font-weight: 700; }
.gh-card .c-meta { font-size: 11px; color: var(--ink-2); margin-top: 2px; }
.gh-card .c-chips { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 7px; }
.gh-card .c-lic { font-size: 10.5px; color: var(--ink-3); margin-top: 6px; }
.gh-card .c-age { font-family: var(--rv-font-mono); font-size: 10.5px; color: var(--ink-3); margin-top: 6px; }

/* Chips */
.gh-chip { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 700; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.gh-chip.lob { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--accent-soft); }
.gh-chip.nh { background: var(--c-warn-bg); color: var(--c-warn-fg); border-color: var(--c-warn-bd); }
.gh-chip.status-won { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--accent-soft); }
.gh-chip.status-inactive { background: var(--c-conf-bg); color: var(--c-conf-fg); border-color: var(--c-conf-bd); }
.gh-chip.status-hold { background: var(--c-warn-bg); color: var(--c-warn-fg); border-color: var(--c-warn-bd); }

/* Board filter bar */
.gh-filters { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; margin-bottom: 16px; }
.gh-filter { display: flex; flex-direction: column; gap: 4px; }
.gh-filter > label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.gh-filter .gh-select { min-width: 180px; }
.gh-filter-clear { align-self: flex-end; }

/* Checkbox list (multi-select, e.g. potential licensees) */
.gh-checkbox-list { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 8px 0; }
.gh-checkbox { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.gh-checkbox input { cursor: pointer; }

/* Workspace layout */
.gh-ws { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
@media (max-width: 980px) { .gh-ws { grid-template-columns: 1fr; } }
.gh-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-bottom: 16px; }
.gh-panel h2 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin: 0 0 12px; }

/* Stepper */
.gh-stepper { display: flex; flex-wrap: wrap; gap: 6px; }
.gh-step { display: flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-3); }
.gh-step .dot { width: 8px; height: 8px; border-radius: 999px; background: var(--ink-4); }
.gh-step.done { color: var(--accent-ink); border-color: var(--accent-soft); background: var(--accent-soft); }
.gh-step.done .dot { background: var(--accent); }
.gh-step.current { color: var(--ink-1); border-color: var(--accent); background: var(--surface); box-shadow: inset 0 0 0 1px var(--accent); }
.gh-step.current .dot { background: var(--accent); }

/* Next action callout */
.gh-next { background: var(--accent-soft); border: 1px solid var(--accent-soft); border-radius: 10px; padding: 12px 14px; margin: 14px 0; }
.gh-next .n-owner { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-ink); }
.gh-next .n-text { font-size: 13.5px; color: var(--ink-1); margin-top: 3px; line-height: 1.45; }

/* Checklist */
.gh-checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.gh-checklist li { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 8px; }
.gh-checklist li:hover { background: var(--surface-2); }
.gh-checklist input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; }
.gh-checklist .ci-label { font-size: 13px; }
.gh-checklist li.done .ci-label { color: var(--ink-3); text-decoration: line-through; }
.gh-checklist .ci-opt { font-size: 10px; color: var(--ink-3); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }

/* Auto-detected checklist items: system-driven status (no manual checkbox) with an inline editor. */
.gh-checklist li.auto { flex-direction: column; align-items: stretch; gap: 8px; }
.gh-checklist li.auto:hover { background: transparent; }
.ci-head { display: flex; align-items: center; gap: 10px; }
.ci-head .ci-label { flex: 1; }
.ci-mark { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 999px;
           font-size: 12px; font-weight: 700; flex: 0 0 auto; }
.gh-checklist li.auto.done .ci-mark { background: var(--accent); color: #fff; }
.gh-checklist li.auto.todo .ci-mark { background: var(--surface-2); color: var(--ink-4); border: 1px solid var(--line); }
.gh-checklist li.auto.done .ci-label { color: var(--ink-3); text-decoration: line-through; }
.ci-auto { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-ink);
           background: var(--accent-soft); border-radius: 999px; padding: 1px 7px; }
.ci-edit { padding: 4px 10px; font-size: 11.5px; }

.ci-editor { border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); padding: 12px 14px; }
.ci-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
@media (max-width: 640px) { .ci-grid { grid-template-columns: 1fr; } }
.ci-editor-actions { display: flex; gap: 8px; margin-top: 12px; }

/* Timeline */
.gh-timeline { list-style: none; margin: 0; padding: 0; }
.gh-timeline li { position: relative; padding: 0 0 14px 18px; border-left: 2px solid var(--line); }
.gh-timeline li:last-child { border-left-color: transparent; }
.gh-timeline li::before { content: ""; position: absolute; left: -5px; top: 3px; width: 8px; height: 8px; border-radius: 999px; background: var(--accent); }
.gh-timeline .t-title { font-size: 12.5px; font-weight: 600; }
.gh-timeline .t-meta { font-size: 11px; color: var(--ink-3); margin-top: 1px; }
.gh-timeline .t-body { font-size: 12px; color: var(--ink-2); margin-top: 3px; white-space: pre-wrap; }

/* Activity log — contact entries get a solid dot, system entries a hollow, muted one so
   "someone actually reached out" reads differently from "the app recorded something". */
.gh-activity-log li.sys::before { background: var(--surface-2); border: 2px solid var(--line); }
.gh-activity-log li.sys .t-title { font-weight: 600; color: var(--ink-3); }
.gh-activity-log li.contact::before { background: var(--accent); }
.gh-activity-log .a-tag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 999px; font-size: 10px; font-weight: 700; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-3); }
.gh-activity-log .a-who { font-weight: 500; color: var(--ink-3); }
.gh-activity-log .gh-btn-link { margin-left: 8px; padding: 0; border: 0; background: none; font: inherit; font-size: 11px; color: var(--ink-3); text-decoration: underline; cursor: pointer; }
.gh-activity-log .gh-btn-link:hover { color: var(--c-conf-fg); }

.gh-activity-form { padding: 12px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }

/* Stale = nobody has reached out in 2+ weeks. The one thing the spreadsheet could never show. */
.gh-chip.stale { background: var(--c-conf-bg); color: var(--c-conf-fg); border-color: var(--c-conf-bd); }
.gh-card .c-age.stale { color: var(--c-conf-fg); font-weight: 700; }

/* Tasks */
.gh-tasks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.gh-task { display: flex; align-items: flex-start; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.gh-task.overdue { border-color: var(--c-conf-bd); background: var(--c-conf-bg); }
.gh-task.done { opacity: .55; }
.gh-task .tk-title { font-size: 12.5px; font-weight: 600; }
.gh-task .tk-due { font-size: 11px; color: var(--ink-2); margin-top: 1px; }
.gh-task.overdue .tk-due { color: var(--c-conf-fg); font-weight: 700; }
.gh-task .tk-auto { font-size: 9.5px; font-weight: 700; text-transform: uppercase; color: var(--ink-3); }

/* Forms */
.gh-form { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; max-width: 760px; }
.gh-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
@media (max-width: 640px) { .gh-grid { grid-template-columns: 1fr; } }
.gh-field { display: flex; flex-direction: column; gap: 4px; }
.gh-field.col-span { grid-column: 1 / -1; }
.gh-field label { font-size: 11px; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; }
.gh-field .hint { font-size: 10.5px; color: var(--ink-3); font-weight: 600; }
.gh-input, .gh-select, .gh-textarea { font: inherit; font-size: 13.5px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink-1); width: 100%; box-sizing: border-box; }
.gh-input:focus, .gh-select:focus, .gh-textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.gh-textarea { min-height: 64px; resize: vertical; }
.gh-form-actions { display: flex; gap: 10px; margin-top: 20px; }

/* Alerts */
.gh-alert { border-radius: 8px; padding: 10px 13px; font-size: 13px; margin: 12px 0; }
.gh-alert.err { background: var(--c-conf-bg); color: var(--c-conf-fg); border: 1px solid var(--c-conf-bd); }
.gh-alert.ok { background: var(--accent-soft); color: var(--accent-ink); border: 1px solid var(--accent-soft); }
.gh-alert.info { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }

.gh-detail-row { display: flex; gap: 8px; font-size: 12.5px; padding: 4px 0; }
.gh-detail-row .d-key { color: var(--ink-3); min-width: 110px; }
.gh-detail-row .d-val { color: var(--ink-1); font-weight: 600; }
.gh-muted { color: var(--ink-3); font-size: 12px; }


/* ── Table view ───────────────────────────────────────────────────────────
   The board answers "where is everything?"; the table answers "tell me about
   these people". Same data, same filters — a view toggle, not a separate page.
   Focusing a single stage from the board drops you here scoped to that stage,
   which is what "zoom into a column" actually wants to be: more columns of
   detail per person, not a bigger card.

   Scrolls vertically only — no second axis to fight, so no ambiguity. */
.gh-tablewrap { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain;
                background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.gh-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
.gh-table thead th {
    position: sticky; top: 0; z-index: 1;
    background: var(--surface-2); border-bottom: 1px solid var(--line);
    text-align: left; white-space: nowrap;
    padding: 9px 12px; font-size: 10.5px; font-weight: 700; letter-spacing: .06em;
    text-transform: uppercase; color: var(--ink-3);
}
.gh-table thead th.sortable { cursor: pointer; user-select: none; }
.gh-table thead th.sortable:hover { color: var(--ink-1); }
.gh-table thead th .sort { color: var(--accent-ink); margin-left: 3px; }
.gh-table tbody td { padding: 9px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.gh-table tbody tr:hover { background: var(--surface-2); }
.gh-table tbody tr:last-child td { border-bottom: 0; }
.gh-table .t-name { font-weight: 700; }
.gh-table .t-name a { color: inherit; text-decoration: none; }
.gh-table .t-name a:hover { color: var(--accent-ink); text-decoration: underline; }
.gh-table .t-sub { font-size: 11px; color: var(--ink-3); margin-top: 1px; }
.gh-table .t-num { font-family: var(--rv-font-mono); text-align: right; white-space: nowrap; }
.gh-table .t-stale { color: var(--c-conf-fg); font-weight: 700; }
.gh-table .t-muted { color: var(--ink-3); }
.gh-table-empty { padding: 28px; text-align: center; color: var(--ink-3); font-size: 12.5px; }

/* View switch (cards / table) + the focused-stage pill. */
.gh-viewswitch { display: inline-flex; padding: 2px; gap: 2px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; }
.gh-viewswitch button {
    cursor: pointer; border: 0; background: transparent; color: var(--ink-2);
    padding: 4px 10px; border-radius: 6px; font: 700 11.5px/1.4 var(--font-ui);
    transition: background .12s, color .12s;
}
.gh-viewswitch button:hover { color: var(--ink-1); }
.gh-viewswitch button.is-on { background: var(--surface); color: var(--ink-1); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

.gh-focus-pill {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--accent-soft); color: var(--accent-ink); border: 1px solid var(--accent-soft);
    padding: 3px 6px 3px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
}
.gh-focus-pill button {
    cursor: pointer; border: 0; background: transparent; color: inherit;
    width: 18px; height: 18px; border-radius: 999px; font-size: 13px; line-height: 1;
}
.gh-focus-pill button:hover { background: rgba(0,0,0,.08); }

/* ── Contacts panel ───────────────────────────────────────────────────────
   A prospect has several people around them in non-interchangeable roles, so
   the list leads with the role and keeps phone/e-mail one tap away. */
.gh-contacts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.gh-contact {
    display: flex; align-items: flex-start; gap: 8px;
    padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2);
}
.gh-contact.is-primary { border-color: var(--accent-soft); background: var(--accent-soft); }
.gh-contact .ct-main { flex: 1 1 auto; min-width: 0; }
.gh-contact .ct-name { font-size: 12.5px; font-weight: 700; }
.gh-contact .ct-primary {
    margin-left: 6px; padding: 0 6px; border-radius: 999px;
    font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
    background: var(--accent); color: #fff;
}
.gh-contact .ct-role { font-size: 11px; color: var(--ink-2); margin-top: 1px; }
.gh-contact .ct-org { font-size: 11px; color: var(--ink-3); margin-top: 1px; }
.gh-contact .ct-reach { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.gh-contact .ct-reach a { font-family: var(--rv-font-mono); font-size: 11px; color: var(--accent-ink); text-decoration: none; }
.gh-contact .ct-reach a:hover { text-decoration: underline; }
.gh-contact .gh-btn-link {
    flex: 0 0 auto; padding: 0; border: 0; background: none; font: inherit; font-size: 11px;
    color: var(--ink-3); text-decoration: underline; cursor: pointer;
}
.gh-contact .gh-btn-link:hover { color: var(--c-conf-fg); }

/* Existing-person matches — search before create, so the same social worker doesn't
   end up in the book five times with five spellings. */
.gh-contact-matches { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.gh-contact-matches button {
    width: 100%; text-align: left; cursor: pointer;
    padding: 6px 9px; border-radius: 7px; border: 1px solid var(--line); background: var(--surface);
    font: 600 11.5px/1.3 var(--font-ui); color: var(--ink-1);
    transition: background .12s, border-color .12s;
}
.gh-contact-matches button:hover { border-color: var(--accent); }
.gh-contact-matches button.is-on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }
