/* Leadsheet — hand-written CSS, no framework/build step.

   Colors, type and radii come from the tenrok brand layer in
   assets/brand/tokens.css, which is loaded first. This file only maps those
   brand tokens onto app-level semantics and styles components; it must not
   introduce new brand colors. Tinted surfaces are mixed from approved tokens
   with color-mix() so they follow whichever theme is active. */

:root {
  /* Brand tokens -> app semantics */
  --color-text: var(--color-text-primary);
  --color-text-muted: var(--color-text-secondary);
  --color-danger: var(--color-error-text);

  /* Tinted surfaces, derived from the semantic colors above */
  --color-danger-bg: color-mix(in srgb, var(--color-error) 12%, var(--color-surface));
  --color-warning-bg: color-mix(in srgb, var(--color-warning) 14%, var(--color-surface));
  --color-success-bg: color-mix(in srgb, var(--color-success) 14%, var(--color-surface));
  --color-info-bg: color-mix(in srgb, var(--color-text-secondary) 10%, var(--color-surface));
  --color-accent-bg: color-mix(in srgb, var(--color-accent) 40%, var(--color-surface));
  --color-primary-bg: color-mix(in srgb, var(--color-primary) 14%, var(--color-surface));
  /* A surface a step off white, for panel insets, table heads and past days. */
  --color-raised: color-mix(in srgb, var(--color-bg) 60%, var(--color-surface));
  --color-border-strong: color-mix(in srgb, var(--color-border) 70%, var(--color-text-secondary));

  --sidebar-width: 232px;

  --radius: var(--radius-md);
  --shadow-sm: 0 1px 2px rgba(20, 20, 15, 0.06);
  --shadow-md: 0 4px 16px rgba(20, 20, 15, 0.08);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;

  /* Brand type is Inter; fall back to the system stack where it is not
     installed, so the app stays dependency-free. */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  color-scheme: light dark;
}

* { box-sizing: border-box; }

/* Alpine hides [x-cloak] itself once it initializes, but hide it up front too
   so a slow script load never flashes a dropdown open before Alpine attaches. */
[x-cloak] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
}

a { color: var(--color-action); }

h1, h2, h3 { line-height: 1.25; margin: 0 0 var(--space-3); }
h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 var(--space-3); }

/* Two page widths: reading pages (detail pages, settings) keep a 1160px
   column, forms narrower still (.narrow); work pages (the contacts grid,
   the boards, companies) pass `width: 'full'` to the layout and use the
   whole screen. */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 28px 32px var(--space-6);
}
.container-full { max-width: none; }
@media (max-width: 640px) {
  .container { padding: var(--space-4) var(--space-4) var(--space-6); }
}

/* --- Brand logo -------------------------------------------------------- */

/* The wordmark is inlined as SVG so it inherits the theme: the word takes
   currentColor, the period takes the identity plum. */
.logo { display: block; }
.logo svg { display: block; height: 100%; width: auto; }
.auth-logo { height: 30px; margin: 0 auto var(--space-5); color: var(--color-text); }

.icon { flex-shrink: 0; vertical-align: middle; }

/* --- Shell: a sidebar on desktop; a top bar and a tab bar on phones ------- */

.has-sidebar { padding-left: var(--sidebar-width); }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: 20px 14px;
  overflow-y: auto;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
}
.sidebar-brand { display: block; padding: 4px 10px; }
.sidebar-brand .logo { height: 22px; color: var(--color-text); }
.sidebar-new > summary { height: 38px; }
.sidebar-new .menu-items { left: 0; right: auto; min-width: 240px; }
.sidebar-links, .sidebar-foot { display: flex; flex-direction: column; gap: 2px; }
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-size: 0.93rem;
  font-weight: 500;
  text-decoration: none;
}
.sidebar-link:hover { background: var(--color-bg); }
.sidebar-link.active { background: var(--color-primary-bg); color: var(--color-action); font-weight: 600; }
.sidebar-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--color-border); }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 10px; }
.sidebar-user-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sidebar-user-name { overflow: hidden; font-size: 0.87rem; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.sidebar-user form { margin: 0; }
.sidebar-user .sidebar-logout { color: var(--color-text-muted); font-size: 0.8rem; text-decoration: none; }
.sidebar-user .sidebar-logout:hover { color: var(--color-text); text-decoration: underline; }

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--color-primary-bg);
  color: var(--color-action);
  font-size: 0.82rem;
  font-weight: 600;
}
.avatar-lg { width: 52px; height: 52px; font-size: 1.1rem; }
.avatar-square { border-radius: 10px; background: var(--color-info-bg); color: var(--color-text-muted); }
.avatar-button { cursor: pointer; list-style: none; }
.avatar-button::-webkit-details-marker { display: none; }

.quickadd-form { display: flex; gap: var(--space-2); }
.quickadd-form input { flex: 1; min-width: 0; }
/* Fill from URL: a tick and the suggested value, editable, on one line. */
.fill-row { display: grid; grid-template-columns: 9rem 1fr; align-items: center; gap: var(--space-2); }
@media (max-width: 639px) { .fill-row { grid-template-columns: 1fr; } }

.topbar, .tabbar { display: none; }

@media (max-width: 640px) {
  .has-sidebar { padding-left: 0; }
  .sidebar { display: none; }
  .container { padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-4);
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
  }
  .topbar .sidebar-brand { padding: 0; }
  .topbar .sidebar-brand .logo { height: 20px; }
  .topbar-actions { display: flex; align-items: center; gap: var(--space-2); }

  .tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
  }
  .tabbar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 56px;
    padding: var(--space-1) 0;
    border: none;
    background: none;
    color: var(--color-text-muted);
    font: inherit;
    font-size: 0.7rem;
    text-decoration: none;
    cursor: pointer;
    list-style: none;
  }
  .tabbar-item::-webkit-details-marker { display: none; }
  .tabbar-item.active, .tabbar-new[open] > .tabbar-item { color: var(--color-action); font-weight: 600; }
  .tabbar-new { position: static; }
  .tabbar-new .menu-items {
    position: absolute;
    left: auto;
    right: var(--space-2);
    bottom: calc(100% + var(--space-2));
    top: auto;
    min-width: 260px;
  }
}

/* --- Search page --------------------------------------------------------- */

.search-page-form { margin-bottom: var(--space-4); }
.search-field.search-field-lg { width: 100%; min-height: 50px; border-width: 1.5px; border-radius: 10px; font-size: 1rem; }
.search-total { margin: 0 0 var(--space-2); font-size: 0.85rem; }
.search-results { padding-top: var(--space-3); }
.search-results .section-label { margin-top: var(--space-3); }
.search-results .section-label:first-child { margin-top: 0; }
.row-list-note { font-size: 0.9rem; }
mark { padding: 0 1px; border-radius: 2px; background: var(--color-accent-bg); color: inherit; }

/* --- Theme toggle ------------------------------------------------------ */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text-muted);
  cursor: pointer;
  line-height: 0;
}
.theme-toggle:hover { color: var(--color-text); border-color: var(--color-text-muted); }
.theme-toggle svg { width: 16px; height: 16px; }
/* Show the icon for the theme currently in effect. */
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
}

/* --- Buttons ----------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
  white-space: nowrap;
}
.btn:hover { border-color: var(--color-border-strong); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--color-bg); border-color: transparent; }
.btn-icon { width: 36px; padding: 0; }
.btn-sm.btn-icon { width: 30px; }
.btn-primary {
  background: var(--color-action);
  border-color: var(--color-action);
  color: var(--color-on-action);
  font-weight: 500;
}
.btn-primary:hover { background: var(--color-action-hover); border-color: var(--color-action-hover); }
.btn-danger { color: var(--color-danger); border-color: var(--color-danger); background: transparent; }
.btn-danger:hover { background: var(--color-danger-bg); }
.btn-sm { min-height: 30px; padding: 0 10px; font-size: 0.85rem; }
.btn-block { width: 100%; justify-content: center; }

:where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* --- Forms --------------------------------------------------------------- */

label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: var(--space-1); color: var(--color-text-muted); }

input[type="text"], input[type="search"], input[type="email"], input[type="password"],
input[type="date"], input[type="url"], input[type="tel"], input[type="number"],
input[type="file"], select, textarea {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  font-family: inherit;
  font-size: 0.95rem;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: -1px;
}
textarea { resize: vertical; min-height: 5rem; }

.field { margin-bottom: var(--space-4); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.field-hint { font-size: 0.8rem; color: var(--color-text-muted); margin-top: var(--space-1); }

.checkbox-field { display: flex; align-items: center; gap: var(--space-2); }
.checkbox-field input { width: auto; }
.checkbox-field label { margin: 0; font-weight: 400; color: var(--color-text); }

.radio-group { display: flex; gap: var(--space-4); flex-wrap: wrap; }
.radio-option { display: flex; align-items: center; gap: var(--space-2); }
.radio-option input { width: auto; }
.radio-option label { margin: 0; font-weight: 400; color: var(--color-text); }

.form-actions { display: flex; gap: var(--space-2); align-items: center; margin-top: var(--space-5); }

/* --- Rate calculator --------------------------------------------------- */

.commission-rows { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-3); }
.commission-row {
  display: grid;
  grid-template-columns: 1fr 90px 110px auto;
  gap: var(--space-2);
  align-items: start;
}
.commission-row .field { margin-bottom: 0; }

.rate-summary {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-4);
}
.rate-summary-steps { list-style: none; margin: 0 0 var(--space-3); padding: 0; font-size: 0.9rem; }
.rate-summary-steps li { display: flex; justify-content: space-between; padding: var(--space-1) 0; color: var(--color-text-muted); }
.rate-summary-steps li strong { color: var(--color-text); font-weight: 500; }
.rate-summary-final { display: flex; justify-content: space-between; align-items: baseline; padding-top: var(--space-3); border-top: 1px solid var(--color-border); }
.rate-summary-final .value { font-size: 1.4rem; font-weight: 700; color: var(--color-text); }
.rate-diff { margin-top: var(--space-2); font-size: 0.88rem; padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); }
.rate-diff-above { color: var(--color-success-text); background: var(--color-success-bg); }
.rate-diff-below { color: var(--color-danger); background: var(--color-danger-bg); }
.rate-summary-empty { color: var(--color-text-muted); font-size: 0.9rem; }

/* --- Cards / panels -------------------------------------------------- */

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: var(--space-4);
}
.card h2 { font-size: 1rem; font-weight: 600; }
.card-header h2 { margin: 0; }
.card-inset { padding: var(--space-3); border-radius: var(--radius-sm); background: var(--color-raised); }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}

/* --- Page header: a page's title with its actions on the right ------- */

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.page-header h1 { margin: 0; }
.page-header-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.page-count { margin: 0; font-size: 0.93rem; font-weight: 500; }
.page-header .page-subtitle { margin: 0; font-size: 0.87rem; }
/* Detail pages: a back link above the header, and an icon or initials
   beside the title. */
.back-link { display: inline-flex; align-items: center; gap: 4px; margin-bottom: var(--space-2); font-size: 0.87rem; text-decoration: none; }
.back-link:hover { text-decoration: underline; }
.page-header-identity { display: flex; align-items: flex-start; gap: 14px; min-width: 0; }
.page-header-badges { display: flex; flex-wrap: wrap; gap: 6px; }

/* --- Panels: a main column and a side column of panels (detail pages) --- */

.detail { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.detail-main { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.detail-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.detail .card { margin: 0; }
.facts { margin: 0; display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px 12px; font-size: 0.9rem; }
.facts dt { color: var(--color-text-muted); }
.facts dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.detail-side .snooze { margin-top: var(--space-3); }
.avatar-green { background: var(--color-success-bg); color: var(--color-success-text); }
.narrow { max-width: 720px; }
.narrow-wide { max-width: 880px; }
.section-label, .card .section-label { margin: 0 0 var(--space-2); color: var(--color-text-muted); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }

/* Events: a row per event with a date block. */
.event-section { display: flex; flex-direction: column; gap: 10px; margin-bottom: var(--space-5); }
.event-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-4); padding: 14px 16px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); }
.event-row.is-highlighted { background: var(--color-primary-bg); border-color: var(--color-primary-light); }
.event-row.is-past { background: var(--color-raised); }
.event-row form { margin: 0; }
.event-row-main { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; }
.event-row-title { font-weight: 600; }
.event-row-title a { color: var(--color-text); text-decoration: none; }
.event-row-title a:hover { text-decoration: underline; }
.event-row-sub { color: var(--color-text-muted); font-size: 0.82rem; }
.event-row .event-person-form { flex-basis: 100%; }
.date-block { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; width: 52px; padding: 6px 0; border: 1px solid var(--color-info-bg); border-radius: var(--radius-sm); background: var(--color-raised); line-height: 1.1; }
.date-block span { color: var(--color-text-muted); font-size: 0.7rem; font-weight: 600; }
.date-block strong { font-size: 1.25rem; }
.card-raised { background: var(--color-raised); }
.form-panels .card > .segmented { margin-bottom: var(--space-4); }
.form-panels h2 label { margin: 0; font: inherit; color: inherit; }
.form-actions-end { justify-content: flex-end; }
.quickadd-wide input { flex: 1; }
.prose { margin: 0; line-height: 1.6; }

/* Application page: how far along the open stages it got. */
.stage-progress { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.stage-progress li { display: flex; flex-direction: column; gap: 6px; color: var(--color-text-muted); font-size: 0.8rem; }
.stage-progress li > span { height: 6px; border-radius: 3px; background: var(--color-info-bg); }
.stage-progress li.is-done > span { background: var(--color-primary); }
.stage-progress li.is-current { color: var(--color-text); font-weight: 600; }
.stage-progress li.is-current > span { background: var(--color-action); }
.stage-outcome { margin: var(--space-3) 0 0; font-size: 0.9rem; }
.rate-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); margin-bottom: var(--space-3); }
.rate-tiles .card-inset { display: flex; flex-direction: column; gap: 2px; font-size: 0.8rem; }
.rate-tiles strong { font-size: 1.2rem; }
.rate-tiles .rate-you { color: var(--color-success-text); }

/* Segmented control: Board / List, Lead / Network, Going / Maybe / No. */
.segmented { display: inline-flex; gap: 2px; padding: 3px; border-radius: 8px; background: var(--color-info-bg); }
.segmented > a, .segmented > button, .segmented > label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  margin: 0;
  padding: 0 12px;
  border: none;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--color-text-muted);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}
.segmented > .is-current, .segmented > label:has(input:checked) {
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
}
.segmented input { position: absolute; opacity: 0; width: 0; height: 0; }
.segmented > label:has(input:focus-visible) { outline: 2px solid var(--color-primary); outline-offset: 1px; }
.page-header-actions, .card-header-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }

/* --- Toolbar: one row of controls above a grid or list ---------------- */

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-bottom: var(--space-3); }
.toolbar input[type="search"], .toolbar input[type="text"] { width: auto; flex: 1 1 220px; max-width: 340px; padding: 7px var(--space-3); font-size: 0.9rem; }
.toolbar-select { width: auto; min-height: 30px; padding: 0 var(--space-2); border-radius: 999px; font-size: 0.85rem; }
/* A search box with its icon inside. */
.search-field {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 280px;
  max-width: 100%;
  min-height: 36px;
  margin: 0;
  padding: 0 var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-weight: 400;
}
.search-field:focus-within { border-color: var(--color-primary); }
.toolbar .search-field input, .search-field input { flex: 1; min-width: 0; max-width: none; padding: 0; border: none; background: transparent; outline: none; box-shadow: none; }
.toolbar-end { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; margin-left: auto; }

/* --- Chips: a small rounded label, removable or linking somewhere ------ */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
}
a.chip:hover, button.chip:hover { border-color: var(--color-border-strong); cursor: pointer; }
.chip.is-current { background: var(--color-text); border-color: var(--color-text); color: var(--color-surface); }
.chip .badge { min-height: 18px; padding: 0 6px; }
.chip-attention { color: var(--color-warning-text); background: var(--color-warning-bg); border-color: transparent; }
.chip-remove { color: var(--color-text-muted); font-size: 0.95em; line-height: 1; }

/* --- List rows: title and meta on the left, one main action and a ⋯ menu
   on the right. The dashboard's agenda and the phone lists use them. ----- */

.list { list-style: none; margin: 0; padding: 0; }
.list-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
}
.list-row:last-child { border-bottom: none; }
.list-row-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.list-row-title { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); font-weight: 600; }
.list-row-title a { color: var(--color-text); text-decoration: none; }
.list-row-title a:hover { text-decoration: underline; }
.list-row-meta { font-size: 0.85rem; color: var(--color-text-muted); }
.list-row-actions { display: flex; align-items: center; gap: var(--space-2); flex-shrink: 0; }
.list-row-extra { flex-basis: 100%; }
a.list-row { color: inherit; text-decoration: none; }

/* What kind of item a mixed list's row is ("Lead", "Routine", …). */
.kind-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* --- Menu: a ⋯ button opening a list of actions ------------------------- */
/* A <details class="menu"> so it opens without script; app.js closes it on
   a click elsewhere or Escape. */

.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-trigger { min-width: 2rem; justify-content: center; font-weight: 700; letter-spacing: 0.05em; }
.menu-items {
  position: absolute;
  right: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  min-width: 200px;
  margin-top: var(--space-1);
  padding: var(--space-1);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  font-size: 0.88rem;
}
.menu-items form { margin: 0; }
.menu-item {
  display: block;
  width: 100%;
  padding: var(--space-2);
  border: none;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--color-text);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.menu-item:hover { background: var(--color-bg); }
.menu-label { padding: var(--space-2) var(--space-2) var(--space-1); color: var(--color-text-muted); font-size: 0.78rem; font-weight: 600; }
.menu-divider { height: 1px; margin: var(--space-1) 0; background: var(--color-border); }
.menu-section { padding: var(--space-1) var(--space-2) var(--space-2); }

/* --- Split: a main column with a side column beside it on wide screens,
   stacked above it on narrow ones. --------------------------------------- */

.split { display: grid; gap: var(--space-4); max-width: 720px; margin: 0 auto; }
.split-main { min-width: 0; }
.split-side { display: grid; gap: var(--space-4); align-content: start; }
@media (min-width: 1100px) {
  .split { grid-template-columns: minmax(0, 720px) 300px; max-width: 1044px; gap: var(--space-5); }
  .split-main { grid-column: 1; grid-row: 1; }
  .split-side { grid-column: 2; grid-row: 1; }
}

/* --- Strip: a slim line of figures, such as today's progress ----------- */

.strip {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text-muted);
  font-size: 0.88rem;
  text-decoration: none;
}
a.strip:hover { border-color: var(--color-text-muted); }
.strip-title { color: var(--color-text); font-weight: 600; }
.strip-item strong { color: var(--color-text); font-variant-numeric: tabular-nums; }
.strip-item.is-met strong { color: var(--color-success-text); }

.page-subtitle { margin: var(--space-1) 0 0; color: var(--color-text-muted); font-size: 0.9rem; }

/* --- Badges / pills ---------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--color-info-bg);
  color: var(--color-text-muted);
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
}
.badge-plum, .badge-lead { color: var(--color-action); background: var(--color-primary-bg); }
.badge-overdue { color: var(--color-danger); background: var(--color-danger-bg); }
.badge-high, .badge-warm { color: var(--color-danger); background: var(--color-danger-bg); }
.badge-medium { color: var(--color-warning-text); background: var(--color-warning-bg); }
.badge-low, .badge-cold { color: var(--color-text-muted); background: var(--color-info-bg); }
.badge-active, .badge-stage-won { color: var(--color-success-text); background: var(--color-success-bg); }
.badge-stage-open { color: var(--color-action); background: var(--color-primary-bg); }
.badge-do_not_contact, .badge-stage-lost { color: var(--color-danger); background: var(--color-danger-bg); }
.badge-going-yes { color: var(--color-success-text); background: var(--color-success-bg); }
.badge-going-maybe { color: var(--color-warning-text); background: var(--color-warning-bg); }
.badge-going-no { color: var(--color-text-muted); background: var(--color-info-bg); }
.badge-relevance-relevant { color: var(--color-success-text); background: var(--color-success-bg); }
.badge-relevance-neutral { color: var(--color-text); background: var(--color-info-bg); }
.badge-relevance-low { color: var(--color-danger); background: var(--color-danger-bg); }
.badge-relevance-unknown { color: var(--color-text-muted); background: transparent; box-shadow: inset 0 0 0 1px var(--color-border); }
.badge-review { color: var(--color-warning-text); background: var(--color-warning-bg); }
.badge-network { color: var(--color-text-muted); background: var(--color-info-bg); }

/* --- Tags (contacts) ----------------------------------------------------- */

.tag {
  display: inline-block;
  padding: 1px var(--space-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-text);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.tag:hover { border-color: var(--color-primary); }
.tag-list { display: flex; flex-wrap: wrap; gap: var(--space-1); margin-top: var(--space-2); }
.tag-count { color: var(--color-text-muted); }

/* Tag filter on the contacts list: each tag is a checkbox dressed as a chip. */
.tag-filter { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1); flex-basis: 100%; }
.tag-filter-label { font-size: 0.85rem; font-weight: 600; color: var(--color-text-muted); margin-right: var(--space-1); }
.tag-toggle { margin: 0; }
.tag-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.tag-toggle:has(input:checked) { background: var(--color-action); border-color: var(--color-action); color: var(--color-on-action); }
.tag-toggle:has(input:checked) .tag-count { color: inherit; }
.tag-toggle:has(input:focus-visible) { outline: 2px solid var(--color-primary); outline-offset: 2px; }

/* --- Tables ------------------------------------------------------------ */

.table-wrap { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius); }

table { width: 100%; border-collapse: collapse; background: var(--color-surface); font-size: 0.9rem; }
th, td { text-align: left; padding: var(--space-3); border-bottom: 1px solid var(--color-border); vertical-align: middle; }
thead th { background: var(--color-raised); color: var(--color-text-muted); font-weight: 600; font-size: 0.8rem; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--color-bg); }
td.actions { white-space: nowrap; text-align: right; }
th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.rate { color: var(--color-success-text); font-weight: 600; }
td.muted, .muted { color: var(--color-text-muted); }
a.text-link { color: var(--color-text); text-decoration: none; }
a.text-link:hover { text-decoration: underline; }
td a.row-link { color: var(--color-text); text-decoration: none; font-weight: 600; }
td a.row-link:hover { text-decoration: underline; }
tr.is-today td { font-weight: 600; }
tr.week-total td { font-weight: 700; border-top: 2px solid var(--color-border); }

.empty-state { padding: var(--space-6); text-align: center; color: var(--color-text-muted); }

/* --- Filters --------------------------------------------------------- */

.filters { display: flex; gap: var(--space-3); flex-wrap: wrap; align-items: end; margin-bottom: var(--space-4); }
.filters .field { margin-bottom: 0; min-width: 140px; }

/* --- Action rows, show more ---------------------------------------------- */

.followup-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.expand-toggle { margin-top: var(--space-3); }

/* Applications: List / Board toggle. */
.view-switch { display: inline-flex; }
.view-switch .btn { border-radius: 0; }
.view-switch .btn:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.view-switch .btn:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin-left: -1px; }
.view-switch .btn.is-current { background: var(--color-info-bg); font-weight: 600; }

/* Applications board: a panel column per stage, scrolling sideways when
   they don't fit. The top border marks the kind: plum for open, green for
   won, red for lost. */
.board-status { min-height: 1.4em; margin: 0 0 var(--space-2); font-size: 0.88rem; color: var(--color-text-muted); }
.board-status.is-error, .close-dialog-error { color: var(--color-danger); }
.board {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  overflow-x: auto;
  padding-bottom: var(--space-3);
  min-height: calc(100vh - 220px);
}
.board-column {
  flex: 0 0 260px;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-top: 4px solid var(--color-primary-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.board-column-won { border-top-color: var(--color-success); background: var(--color-raised); }
.board-column-lost { border-top-color: var(--color-error); background: var(--color-raised); }
.board-column.is-drop-target { border-color: var(--color-primary); background: var(--color-primary-bg); }
.board-column-header { display: flex; align-items: center; gap: var(--space-1); }
.board-column-toggle {
  display: flex;
  flex: 1;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  padding: 0;
  border: none;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: default;
  pointer-events: none;
}
.board-column-header h2 { margin: 0; font-size: 0.93rem; font-weight: 600; }
.board-column-menu .menu-items { min-width: 240px; }
.board-column-menu .menu-item[disabled] { color: var(--color-text-muted); cursor: not-allowed; }
.stage-rename .menu-label { display: block; padding: 0 0 var(--space-1); margin: 0; }
.board-cards { display: flex; flex-direction: column; gap: var(--space-2); min-height: 48px; }
.board-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
}
.board-card:hover { border-color: var(--color-border-strong); box-shadow: var(--shadow-sm); }
.board.is-enhanced .board-card { cursor: grab; }
.board-card.is-dragging { opacity: 0.5; }
.board-card.is-saving { opacity: 0.6; pointer-events: none; }
.board-card-head { display: flex; align-items: flex-start; gap: var(--space-2); }
.board-card-head > .icon { margin-top: 2px; color: var(--color-text-muted); }
.board-card-title { flex: 1; min-width: 0; color: var(--color-text); font-weight: 600; line-height: 1.35; text-decoration: none; overflow-wrap: anywhere; }
.board-card-title:hover { color: var(--color-action); text-decoration: underline; }
.board-card-menu { margin: -4px -6px 0 0; }
.board-card-company { padding-left: 24px; color: var(--color-text-muted); font-size: 0.8rem; }
.board-card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.board-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-top: 4px;
  padding-top: var(--space-2);
  border-top: 1px dashed var(--color-border);
}
.board-card-rate { color: var(--color-success-text); font-weight: 600; font-variant-numeric: tabular-nums; }
.board-card-rate.is-empty { color: var(--color-text-muted); font-size: 0.8rem; font-weight: 500; }
.board-card-days { color: var(--color-text-muted); font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.board-older { font-size: 0.82rem; padding: 0 var(--space-1); }
.board-add-stage {
  flex: 0 0 200px;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3);
  border: 1.5px dashed var(--color-border-strong);
  border-radius: var(--radius);
}
.board-add-stage label { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--color-text-muted); font-weight: 500; }
.board-add-stage .field-hint { margin: 0; }

/* Phones: the columns stack as groups that fold away from their header. */
@media (max-width: 640px) {
  .board { flex-direction: column; align-items: stretch; overflow-x: visible; min-height: 0; }
  .board-column, .board-add-stage { flex: none; }
  .board-cards:not(:has([data-board-card])) { min-height: 0; }
  .board-column-toggle { pointer-events: auto; cursor: pointer; }
  .board-column-toggle::after {
    content: '';
    width: 7px;
    height: 7px;
    margin: 0 var(--space-1) 0 auto;
    border-right: 2px solid var(--color-text-muted);
    border-bottom: 2px solid var(--color-text-muted);
    transform: translateY(-3px) rotate(45deg);
  }
  .board-column.is-collapsed .board-column-toggle::after { transform: rotate(-45deg); }
  .board-column.is-collapsed .board-cards, .board-column.is-collapsed .board-older { display: none; }
}

.close-dialog {
  width: min(420px, calc(100vw - 32px));
  padding: var(--space-4);
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}
.close-dialog::backdrop { background: rgb(0 0 0 / 0.4); }
.close-dialog h2 { margin-top: 0; }
.close-dialog-error { min-height: 1.2em; margin: 0; font-size: 0.88rem; }

/* Companies: cards with relevance and counts, and a banner per pair of
   look-alike names. */
.banner { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-bottom: var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--radius); font-size: 0.9rem; }
.banner form { margin: 0; }
.banner-text { flex: 1 1 300px; }
.banner-warning { background: var(--color-warning-bg); color: var(--color-text); }
.banner-warning > .icon { color: var(--color-warning-text); }
.banner-warning a { color: inherit; }
.company-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
.company-card { display: flex; flex-direction: column; gap: 10px; padding: var(--space-4); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); }
.company-card:hover { border-color: var(--color-border-strong); box-shadow: var(--shadow-sm); }
.company-card-head { display: flex; align-items: flex-start; gap: 10px; }
.company-card-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.company-card-name a { color: var(--color-text); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.company-card-name a::after { content: ''; position: absolute; inset: 0; }
.company-card { position: relative; }
.company-card-name a:hover { text-decoration: underline; }
.company-card-sub { color: var(--color-text-muted); font-size: 0.78rem; }
.company-card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); padding-top: 10px; border-top: 1px dashed var(--color-border); color: var(--color-text-muted); font-size: 0.82rem; }
.company-card-foot strong { color: var(--color-text); }
.company-card-foot form { position: relative; z-index: 1; margin: 0 0 0 auto; }
.company-card .badge { position: relative; z-index: 1; }

/* Row lists: an avatar or title, a line under it and a badge on the right,
   each row a link (a company's contacts and applications). */
.row-list { margin: 0; padding: 0; list-style: none; }
.row-list li + li { border-top: 1px solid var(--color-info-bg); }
.row-list-item { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-1); color: var(--color-text); text-decoration: none; }
.row-list-item:hover { background: var(--color-raised); }
.row-list-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-list-title { font-size: 0.9rem; font-weight: 600; }
.row-list-sub, .row-list-meta { color: var(--color-text-muted); font-size: 0.8rem; }
.row-list .avatar { width: 32px; height: 32px; font-size: 0.75rem; }

/* Companies: merge picker on a company page. */
.merge-form { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; margin-top: var(--space-4);
  padding-top: var(--space-3); border-top: 1px solid var(--color-border); font-size: 0.9rem; }
.merge-form select { flex: 1; min-width: 0; max-width: none; }
.detail-side .merge-form { margin-top: 0; padding-top: 0; border-top: none; }
.duplicate-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.duplicate-list li { display: grid; gap: var(--space-1); }
.duplicate-merge { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; padding-left: var(--space-3); font-size: 0.9rem; }

.error-details pre { overflow-x: auto; font-size: 0.78rem; white-space: pre-wrap; }

/* A command to copy, e.g. connecting an agent in Settings → Agent API. */
.code-block {
    margin: var(--space-2) 0;
    padding: var(--space-2) var(--space-3);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: ui-monospace, monospace;
    font-size: 0.8rem;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* Outcome report. */
.outcome-table .num { text-align: right; width: 6rem; font-variant-numeric: tabular-nums; }
.inline-filter { display: flex; gap: var(--space-1); align-items: center; }

/* Settings: a list of the sections beside their panels. */
.settings-layout { display: flex; flex-wrap: wrap; gap: var(--space-5); align-items: flex-start; }
.settings-nav { position: sticky; top: var(--space-5); flex: 1 1 180px; max-width: 220px; display: flex; flex-direction: column; gap: 2px; }
.settings-nav a { padding: 8px 12px; border-radius: var(--radius-sm); color: var(--color-text); font-size: 0.9rem; font-weight: 500; text-decoration: none; }
.settings-nav a:hover { background: var(--color-surface); }
.settings-panels { flex: 999 1 520px; min-width: 0; max-width: 820px; }
.settings-panels .card { scroll-margin-top: var(--space-5); }
@media (max-width: 640px) {
  .settings-nav { position: static; max-width: none; flex-direction: row; flex-wrap: wrap; }
}

/* Settings: the application stages editor. */
.stages-table input[type="text"] { width: 100%; min-width: 140px; }
.stages-table td.actions { white-space: nowrap; }
.routines-table input[type="text"] { min-width: 160px; width: 100%; }
.routines-table input[type="url"] { min-width: 140px; width: 100%; }
.routines-table input[type="number"] { width: 5.5rem; }

/* Outcome fields when an application is closed (page form and board dialog). */
.close-fields, .choice-fieldset { border: none; padding: 0; margin: 0 0 var(--space-3); }
.close-fields legend, .choice-fieldset legend { font-weight: 600; font-size: 0.9rem; margin-bottom: var(--space-1); padding: 0; }
.radio-row { display: flex; gap: var(--space-4); }
.radio-row label { display: flex; gap: var(--space-1); align-items: center; font-weight: normal; cursor: pointer; }

/* Agenda board: a column per day (Agenda::days, agenda.js). Seven columns
   fit side by side on a wide screen; narrower, the days wrap into rows, and
   on a phone they stack as a list. */
.goals-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-bottom: var(--space-3); }
.goals-strip { flex: 1 1 auto; }
.meter { display: inline-block; width: 64px; height: 6px; margin: 0 6px; border-radius: 3px; background: var(--color-info-bg); vertical-align: middle; overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 3px; background: var(--color-primary); }
.strip-item.is-met .meter > span { background: var(--color-success); }
.text-danger { color: var(--color-danger); }
.agenda-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-3); align-items: start; }
@media (min-width: 1360px) {
  .agenda-board { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  /* Today holds the overdue items too, so it gets more room. */
  .agenda-board.starts-today { grid-template-columns: minmax(0, 1.7fr) repeat(6, minmax(0, 1fr)); }
}
.agenda-day {
  min-width: 0;
  padding: var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-top: 4px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.agenda-day.is-today { border-top-color: var(--color-primary); }
.agenda-day.is-drop-target { border-color: var(--color-primary); background: var(--color-primary-bg); }
.agenda-day-header { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.agenda-day-header h2 { margin: 0; font-size: 0.93rem; font-weight: 600; }
.agenda-day-count { margin-left: auto; color: var(--color-text-muted); font-size: 0.8rem; font-weight: 500; }
.agenda-cards { display: flex; flex-direction: column; gap: var(--space-2); min-height: 60px; }
.agenda-empty { margin: 0; padding: 14px 8px; border: 1px dashed var(--color-border); border-radius: var(--radius-sm); color: var(--color-text-muted); font-size: 0.8rem; text-align: center; }
.agenda-more { margin-top: var(--space-2); width: 100%; }
.agenda-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 10px 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}
.agenda-card[draggable="true"] { cursor: grab; }
.agenda-card:hover { border-color: var(--color-border-strong); box-shadow: var(--shadow-sm); }
.agenda-card.is-dragging { opacity: 0.5; }
.agenda-card.is-saving { opacity: 0.6; pointer-events: none; }
.agenda-card-labels { display: flex; flex-wrap: wrap; gap: 4px; }
.agenda-card-title { color: var(--color-text); font-size: 0.88rem; font-weight: 600; line-height: 1.35; text-decoration: none; overflow-wrap: anywhere; }
a.agenda-card-title:hover { color: var(--color-action); text-decoration: underline; }
.agenda-card-sub { margin: 0; color: var(--color-text-muted); font-size: 0.78rem; line-height: 1.45; }
.agenda-card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 2px;
  padding-top: var(--space-2);
  border-top: 1px dashed var(--color-border);
}
.agenda-card-foot form { margin: 0; }
.agenda-card-foot > details:first-child, .agenda-card-foot > form:first-child { min-width: 0; }
.agenda-card-foot .btn-sm:not(.btn-icon) { max-width: 100%; padding-block: 4px; white-space: normal; text-align: center; }
.agenda-card .event-person-form { display: grid; gap: var(--space-1); }
.touchpoint-form { display: grid; gap: var(--space-2); padding: var(--space-3); min-width: 260px; }
.touchpoint-form .checkbox-field { margin: 0; font-weight: 400; color: var(--color-text); }
.touchpoint-form input[type="text"] { padding: var(--space-1) var(--space-2); font-size: 0.88rem; }
.touchpoint-channels { display: flex; flex-wrap: wrap; gap: var(--space-1); }
.agenda-card .menu-items { right: auto; left: 0; }
.agenda-card-foot .menu:last-child .menu-items { left: auto; right: 0; }

/* Dashboard events: "who did you meet?" after an event. */
.event-person-form { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.event-person-form input { flex: 1 1 140px; min-width: 0; }

/* Relevance: the reasons behind a contact's or company's level. */
.relevance-reasons { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-1); }
.relevance-points { display: inline-block; min-width: 2.2em; font-weight: 600; font-variant-numeric: tabular-nums; }
.relevance-reasons .is-for .relevance-points { color: var(--color-success-text); }
.relevance-reasons .is-against .relevance-points { color: var(--color-danger); }
.relevance-reason { color: var(--color-text-muted); }

/* Dashboard routines: the recruiters a "Contact recruiters" routine lists. */
.routine-recruiters { list-style: none; margin: 0; padding: 0 0 0 var(--space-3); display: grid; gap: var(--space-1); font-size: 0.9rem; }
.routine-recruiters .subtitle { color: var(--color-text-muted); font-size: 0.85rem; }
.link-button { background: none; border: none; padding: 0; font: inherit; color: var(--color-primary); text-decoration: underline; cursor: pointer; }

/* Snooze popover, same pattern as the contacts grid's column picker. */
.snooze { position: relative; }
.snooze summary { list-style: none; }
.snooze summary::-webkit-details-marker { display: none; }
.snooze-menu {
  position: absolute;
  right: 0;
  z-index: 20;
  display: grid;
  gap: var(--space-2);
  min-width: 220px;
  margin-top: var(--space-1);
  padding: var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
}
.snooze-label { color: var(--color-text-muted); }
.snooze-presets { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-1); }
.snooze-date { display: flex; gap: var(--space-2); align-items: center; }
.snooze-date input { flex: 1; min-width: 0; }
.snooze-form { display: grid; gap: var(--space-2); }
.snooze-inline { display: flex; gap: var(--space-2); flex-wrap: wrap; align-items: flex-start; }

/* The warm accent, used sparingly for emphasis per the brand guidelines. */
.overdue-tag {
  white-space: nowrap;
  color: var(--color-accent-dark);
  background: var(--color-accent);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px var(--space-2);
  border-radius: 999px;
}

/* Progress: a tile per goal, and a small bar chart per goal for the week
   (the goal as a dashed line; days that met it in full plum). */
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-3); margin-bottom: 20px; }
.stat-tile { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-4); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); font-size: 0.8rem; }
.stat-tile-label { color: var(--color-text-muted); font-size: 0.85rem; }
.stat-tile-value { font-size: 1.75rem; font-weight: 700; line-height: 1.1; }
.stat-tile-value small { color: var(--color-text-muted); font-size: 1rem; font-weight: 500; }
.meter-wide { width: 100%; height: 8px; margin: 0; }
.stat-tile.is-met .meter > span { background: var(--color-success); }
.week-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-5); }
.week-chart { margin: 0; }
.week-chart figcaption { margin-bottom: var(--space-3); font-size: 0.85rem; font-weight: 600; }
.week-chart figcaption .muted { display: block; font-size: 0.78rem; font-weight: 400; }
.week-chart-bars { position: relative; display: flex; align-items: flex-end; gap: 6px; height: 120px; border-bottom: 1px solid var(--color-border); }
.week-chart-bar { flex: 1; min-height: 2px; border-radius: 4px 4px 0 0; background: var(--color-primary-light); }
.week-chart-bar.is-met { background: var(--color-primary); }
.week-chart-bar.is-future { background: none; }
.week-chart-goal { position: absolute; left: 0; right: 0; border-top: 1.5px dashed var(--color-text-muted); }
.week-chart-days { display: flex; gap: 6px; margin-top: 4px; }
.week-chart-days span { flex: 1; color: var(--color-text-muted); font-size: 0.72rem; text-align: center; }
.week-chart-days .is-today { color: var(--color-text); font-weight: 700; }
.table-toggle { margin-top: var(--space-4); }
.table-toggle summary { color: var(--color-action); cursor: pointer; font-size: 0.85rem; margin-bottom: var(--space-2); }
.stat-row { display: flex; gap: var(--space-4); margin-bottom: var(--space-5); flex-wrap: wrap; }
.stat { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: var(--space-4); flex: 1; min-width: 140px; }
.stat .value { font-size: 1.6rem; font-weight: 700; }
.stat .label { color: var(--color-text-muted); font-size: 0.85rem; }

/* --- Flash messages ------------------------------------------------------ */

.flash { padding: var(--space-3); border-radius: var(--radius-sm); margin-bottom: var(--space-4); font-size: 0.9rem; }
.flash-success { background: var(--color-success-bg); color: var(--color-success-text); }
.flash-error { background: var(--color-danger-bg); color: var(--color-danger); }
.flash-warning { background: var(--color-warning-bg); color: var(--color-warning-text); }

/* --- Timeline (interactions) -------------------------------------------- */

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: var(--space-3); padding: var(--space-2) 0; border-bottom: 1px solid var(--color-border); font-size: 0.88rem; }
.timeline li:last-child { border-bottom: none; }
.timeline .when { flex: 0 0 80px; color: var(--color-text-muted); font-size: 0.78rem; padding-top: 2px; }
/* The contact timeline: an icon per entry, the date on the right. */
.timeline-icons li { align-items: flex-start; padding: var(--space-3) 0; border-bottom-color: var(--color-info-bg); }
.timeline-icons .timeline-text { flex: 1; min-width: 0; padding-top: 4px; }
.timeline-icons .when { flex: none; text-align: right; padding-top: 6px; }
.timeline-dot { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--color-info-bg); color: var(--color-text-muted); }
.timeline-dot-message_sent, .timeline-dot-email, .timeline-dot-call, .timeline-dot-meeting { background: var(--color-primary-bg); color: var(--color-action); }
.timeline-dot-reply { background: var(--color-success-bg); color: var(--color-success-text); }
.touchpoint-panel { display: grid; gap: var(--space-3); }
.touchpoint-panel textarea { min-height: 0; }
.touchpoint-panel-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); }
.touchpoint-panel-foot .checkbox-field { margin: 0; font-weight: 400; color: var(--color-text); }
.mini-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); font-size: 0.9rem; }
.mini-list li { display: flex; justify-content: space-between; align-items: center; gap: var(--space-2); }
.mini-list a { color: var(--color-text); font-weight: 500; text-decoration: none; }
.mini-list a:hover { text-decoration: underline; }

/* Appointments card (contact and application pages). */
.appointment-form { display: grid; gap: var(--space-1); margin-bottom: var(--space-4); padding: var(--space-3); border-radius: var(--radius-sm); background: var(--color-raised); }
.appointment-when { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--space-3); }
.appointment-list { list-style: none; margin: 0; padding: 0; }
.appointment-list > li { padding: var(--space-3) 0; border-bottom: 1px solid var(--color-border); }
.appointment-list > li:first-child { padding-top: 0; }
.appointment-list > li:last-child { border-bottom: none; }
.appointment-list > li .appointment-form { margin-bottom: 0; }
.appointment-item { display: flex; align-items: flex-start; gap: var(--space-3); }
.appointment-date {
  flex: 0 0 44px; display: flex; flex-direction: column; align-items: center; padding: 4px 0;
  border: 1px solid var(--color-border); border-radius: var(--radius-sm); line-height: 1.1;
}
.appointment-date span { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text-muted); }
.appointment-date strong { font-size: 1.05rem; }
.appointment-date.is-today { border-color: var(--color-action); color: var(--color-action); }
.appointment-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 0.88rem; overflow-wrap: anywhere; }
.appointment-actions { display: flex; gap: var(--space-1); flex: 0 0 auto; }
.appointment-past { margin-top: var(--space-3); font-size: 0.88rem; }
.appointment-past summary { cursor: pointer; color: var(--color-text-muted); }
@media (max-width: 640px) {
  .appointment-when { grid-template-columns: 1fr 1fr; }
  .appointment-when .field:first-child { grid-column: 1 / -1; }
  .appointment-item { flex-wrap: wrap; }
  .appointment-actions { width: 100%; padding-left: calc(44px + var(--space-3)); }
}

/* Rate calculator on the application form: minimised to its header and the total. */
.collapsible-header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; }
.collapsible-header h2 { margin: 0; }
.collapsible-summary { flex: 1 1 auto; color: var(--color-text-muted); font-size: 0.88rem; }
.collapsible-toggle svg { transition: transform 0.15s ease; transform: rotate(90deg); }
.collapsible-toggle[aria-expanded="false"] svg { transform: rotate(0deg); }
.collapsible-body { margin-top: var(--space-3); }

/* --- Auth / login page -------------------------------------------------- */

.auth-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}
.auth-card { width: 100%; max-width: 380px; padding: var(--space-5); box-shadow: var(--shadow-sm); }
.auth-card h1 { font-size: 1.3rem; margin-bottom: var(--space-4); }

/* --- Contacts grid (Tabulator, see contacts-grid.js) --------------------- */
/* Tabulator's own stylesheet is light-only; these re-point its colors at
   the theme tokens so the grid follows light and dark mode. */

.tabulator {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--color-text);
}
.tabulator .tabulator-header,
.tabulator .tabulator-header .tabulator-col {
  background: var(--color-raised);
  color: var(--color-text-muted);
  border-color: var(--color-border);
}
.tabulator .tabulator-header .tabulator-col .tabulator-col-content { padding: var(--space-2); }
.tabulator .tabulator-header .tabulator-col .tabulator-col-title {
  font-size: 0.8rem;
  font-weight: 600;
}
@media (hover: hover) and (pointer: fine) {
  .tabulator .tabulator-header .tabulator-col.tabulator-sortable.tabulator-col-sorter-element:hover { background: var(--color-bg); }
}
.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left,
.tabulator-row .tabulator-cell.tabulator-frozen.tabulator-frozen-left { border-right: 2px solid var(--color-border); }
.tabulator .tabulator-tableholder .tabulator-table { background: var(--color-surface); color: var(--color-text); }
.tabulator .tabulator-tableholder .tabulator-placeholder { color: var(--color-text-muted); }
.tabulator-row,
.tabulator-row.tabulator-row-even { background: var(--color-surface); border-bottom: 1px solid var(--color-info-bg); }
.tabulator-row:hover { background: var(--color-bg); }
@media (hover: hover) and (pointer: fine) {
  .tabulator-row.tabulator-selectable:hover { background: var(--color-bg); cursor: text; }
}
.tabulator-row .tabulator-cell { border-right: 1px solid var(--color-info-bg); padding: 10px 12px; cursor: text; }
.tabulator-row .tabulator-cell.tabulator-editing { border: 2px solid var(--color-primary); padding: 0; }
.tabulator-row .tabulator-cell.tabulator-editing input,
.tabulator-row .tabulator-cell.tabulator-editing textarea {
  background: var(--color-surface);
  color: var(--color-text);
  padding: var(--space-2) !important;
  font: inherit;
}
.tabulator-popup-container,
.tabulator-edit-list {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  border-radius: var(--radius-sm);
}
.tabulator-edit-list .tabulator-edit-list-item { color: var(--color-text); }
.tabulator-edit-list .tabulator-edit-list-item.active,
.tabulator-edit-list .tabulator-edit-list-item:hover { background: var(--color-action); color: var(--color-on-action); }

/* A cell the server refused keeps the typed value, outlined in red with
   the reason as its tooltip, until it's fixed. */
.tabulator-row .tabulator-cell.cell-error { box-shadow: inset 0 0 0 2px var(--color-danger); background: var(--color-danger-bg); }

.tabulator .tag { margin: 0; }
.grid-placeholder { color: var(--color-text-muted); font-style: italic; }
.grid-muted { color: var(--color-text-muted); }
.grid-due { color: var(--color-warning-text); font-weight: 600; }
.grid-open { color: var(--color-text-muted); text-decoration: none; font-weight: 600; }
.grid-open:hover { color: var(--color-primary); }

.grid-count { color: var(--color-text-muted); font-size: 0.9rem; font-weight: 400; margin-left: var(--space-2); }
.grid-status { color: var(--color-text-muted); font-size: 0.85rem; text-align: right; }

/* Contacts toolbar: the Filters panel and the active filters as chips. */
.quick-filters { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-3); }
.filters-panel { display: grid; grid-template-columns: repeat(2, minmax(150px, 1fr)); gap: var(--space-3); padding: var(--space-3); min-width: min(380px, calc(100vw - 32px)); left: 0; right: auto; }
.filters-panel .field { margin: 0; }
.filters-panel select { padding: var(--space-1) var(--space-2); font-size: 0.88rem; }
.filters-panel .tag-filter { grid-column: 1 / -1; }
.filters-count:not(:empty) { display: inline-block; min-width: 1.3em; padding: 0 var(--space-1); border-radius: 999px; background: var(--color-action); color: var(--color-on-action); font-size: 0.75rem; text-align: center; }
.filter-chips { display: flex; flex-wrap: wrap; gap: var(--space-1); }
.filter-chips:empty { display: none; }

/* Phones get a plain list of contacts instead of the grid. */
.contact-cards { display: none; padding-block: 0; padding-inline: var(--space-3); }
.contact-cards li { border-bottom: 1px solid var(--color-border); }
.contact-cards li:last-child { border-bottom: none; }
.contact-cards .list-row { border-bottom: none; }
.contact-cards .list-row:hover .list-row-title { text-decoration: underline; }
@media (max-width: 640px) {
  .contact-cards { display: block; }
  #contacts-grid, .contacts-desk-only { display: none !important; }
  .toolbar input[type="search"] { max-width: none; }
}
.grid-status.is-error, .paste-summary.is-error { color: var(--color-danger); }
.grid-help { margin-top: var(--space-2); }

.column-picker { position: relative; }
.column-picker summary { list-style: none; }
.column-picker summary::-webkit-details-marker { display: none; }
.column-picker-menu {
  position: absolute;
  right: 0;
  z-index: 20;
  display: grid;
  gap: var(--space-1);
  min-width: 180px;
  margin-top: var(--space-1);
  padding: var(--space-2);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
}
.column-picker-menu label { display: flex; gap: var(--space-2); align-items: center; white-space: nowrap; cursor: pointer; }

.paste-panel { margin-bottom: var(--space-4); }
.paste-panel h2 { margin-top: 0; }
.paste-panel textarea { width: 100%; font-family: ui-monospace, monospace; font-size: 0.82rem; }
.paste-summary { min-height: 1.4em; font-size: 0.88rem; }
.paste-actions { display: flex; gap: var(--space-2); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --- Responsive ---------------------------------------------------------- */

@media (max-width: 640px) {
  .agenda-row .list-row-actions { flex-basis: 100%; }
  .list-row-actions .menu-items { right: auto; left: 0; }
  .field-row { grid-template-columns: 1fr; }
  .card-header { flex-direction: column; align-items: flex-start; }
  .container-full { padding-inline: var(--space-4); }
  .menu-items { min-width: min(240px, calc(100vw - 32px)); }
  th, td { padding: var(--space-2); }
  .snooze-menu { right: auto; left: 0; }
}

/* --- Contacts list: contacts grouped by follow-up state, one table on one
   screen, and the contact card drawer (plans/contact-list.md). ----------- */

.contact-list-toolbar .segmented > a { min-height: 30px; font-size: 0.85rem; }
.filters-panel-foot { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: var(--space-2); }

.contact-list-wrap { padding: 0; overflow-x: auto; }
.contact-list { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 0.88rem; }
.contact-list .col-name { width: 30%; }
.contact-list .col-company { width: 18%; }
.contact-list .col-kind { width: 92px; }
.contact-list .col-importance { width: 104px; }
.contact-list .col-relevance { width: 136px; }
.contact-list .col-last { width: 128px; }
.contact-list .col-next { width: 132px; }
.contact-list thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 8px 12px;
  background: var(--color-raised);
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}
.contact-list td { padding: 0 12px; height: 40px; border-bottom: 1px solid var(--color-info-bg); vertical-align: middle; }
.contact-list .cl-ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contact-list .muted { font-size: 0.8rem; }

.contact-group { --tone: var(--color-text-secondary); --on-tone: var(--color-surface); }
.contact-group.tone-danger { --tone: var(--color-error); }
.contact-group.tone-warning { --tone: var(--color-warning-text); }
.contact-group.tone-plum { --tone: var(--color-action); }
.contact-group.tone-success { --tone: var(--color-success-text); }
.contact-group.tone-ink { --tone: var(--color-text-primary); }
.contact-group.tone-accent { --tone: var(--color-accent); --on-tone: var(--color-accent-dark); }
.contact-group-head th { padding: 6px 8px; border-bottom: 1px solid var(--color-info-bg); background: var(--color-surface); text-align: left; font-weight: 400; }
.contact-group + .contact-group .contact-group-head th { border-top: 1px solid var(--color-border); }
.contact-group-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 32px;
  padding: 0 var(--space-2) 0 var(--space-1);
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--color-text-muted);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}
.contact-group-toggle:hover { background: var(--color-bg); }
.contact-group-toggle .icon { transition: transform 0.15s; }
.contact-group-toggle[aria-expanded="false"] .icon { transform: rotate(-90deg); }
.group-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  background: var(--tone);
  color: var(--on-tone);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.group-count { font-weight: 600; color: var(--color-text); }
.group-dot { flex: none; width: 7px; height: 7px; border-radius: 2px; background: var(--tone); }

.contact-row:hover { background: var(--color-primary-bg); background: color-mix(in srgb, var(--color-primary) 6%, var(--color-surface)); }
.contact-row.is-selected { background: var(--color-primary-bg); }
.contact-list td.cl-name { padding-left: 36px; }
.cl-name-inner { display: flex; align-items: center; gap: var(--space-2); min-width: 0; white-space: nowrap; overflow: hidden; }
.cl-name-inner > a { flex: none; max-width: 60%; overflow: hidden; text-overflow: ellipsis; color: var(--color-text); font-weight: 500; text-decoration: none; }
.cl-name-inner > a:hover { color: var(--color-action); text-decoration: underline; }
.cl-role { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--color-text-muted); font-size: 0.8rem; }
.cl-name-inner .badge { flex: none; }
.importance { display: inline-flex; align-items: center; gap: 5px; color: var(--color-text-muted); }
.importance-high .icon { color: var(--color-error); fill: currentColor; }
.importance-medium .icon { color: var(--color-warning); fill: currentColor; }
.cl-next { white-space: nowrap; }
.cl-next.is-overdue { color: var(--color-danger); font-weight: 600; }
.cl-next.is-today { color: var(--color-warning-text); font-weight: 600; }
.cl-next.is-new { color: var(--color-action); font-weight: 500; }
.cl-next.is-muted { color: var(--color-text-muted); }
.contact-group.is-collapsed .contact-row { display: none; }
.contact-row[hidden], .contact-group[hidden] { display: none; }
.contact-list-empty { padding: var(--space-4); margin: 0; text-align: center; }

@media (max-width: 1100px) {
  .contact-list .cl-hide-md { display: none; }
  .contact-list .col-kind, .contact-list .col-importance { width: 0; }
  .contact-list .col-name { width: 40%; }
  .contact-list .col-company { width: 24%; }
}
@media (max-width: 640px) {
  .contact-list .cl-hide-sm { display: none; }
  .contact-list .col-company, .contact-list .col-relevance, .contact-list .col-last { width: 0; }
  .contact-list .col-name { width: auto; }
  .contact-list td.cl-name { padding-left: 12px; }
  .cl-role { display: none; }
  .cl-name-inner > a { max-width: none; flex: 1 1 auto; }
}

/* The contact card: a drawer from the right over the list. */
.contact-card-layer { position: fixed; inset: 0; z-index: 50; }
.contact-card-backdrop { position: absolute; inset: 0; width: 100%; border: 0; padding: 0; background: rgba(20, 20, 15, 0.28); cursor: default; }
.contact-card {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(460px, 100%);
  overflow-y: auto;
  background: var(--color-surface);
  border-left: 1px solid var(--color-border);
  box-shadow: -12px 0 32px rgba(20, 20, 15, 0.14);
  animation: contact-card-in 0.18s ease-out;
}
@keyframes contact-card-in { from { transform: translateX(24px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .contact-card { animation: none; } }
.contact-card-head { display: flex; flex-direction: column; gap: var(--space-3); padding: 20px 22px 16px; border-bottom: 1px solid var(--color-info-bg); }
.contact-card-identity { display: flex; align-items: flex-start; gap: 14px; }
.contact-card-identity > div { flex: 1; min-width: 0; }
.contact-card-identity h2 { margin: 0; font-size: 1.2rem; font-weight: 700; }
.contact-card-identity p { margin: 2px 0 0; font-size: 0.88rem; }
.contact-card-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.contact-card-section { padding: 16px 22px; border-bottom: 1px solid var(--color-info-bg); }
.contact-card-section:last-child { border-bottom: none; }
.contact-card-section h3 { margin: 0 0 10px; color: var(--color-text-muted); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.contact-card-log { display: flex; flex-direction: column; gap: var(--space-2); }
.contact-card-log .segmented { flex-wrap: wrap; align-self: flex-start; }
.contact-card-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); }
.contact-card-stats > div { display: flex; flex-direction: column; padding: 10px; border-radius: var(--radius-sm); background: var(--color-raised); }
.stat-label { color: var(--color-text-muted); font-size: 0.75rem; }
.stat-value { margin-top: 2px; font-weight: 600; }
.stat-note { color: var(--color-text-muted); font-size: 0.75rem; }
.contact-card .facts { grid-template-columns: 92px minmax(0, 1fr); }
.contact-card .tag-list { margin-top: 0; }
.contact-card-reasons { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 0.88rem; }
.reason-points { display: inline-block; min-width: 2.2em; font-weight: 600; font-variant-numeric: tabular-nums; }
.reason-points.is-plus { color: var(--color-success-text); }
.reason-points.is-minus { color: var(--color-danger); }
.contact-card-more { display: inline-flex; align-items: center; gap: 2px; margin-top: var(--space-2); font-size: 0.88rem; }
