/* Vero Labs dashboard. One stylesheet, phone first.
   Scene: Riplin or his brother, mid-morning, phone in one hand in daylight, scanning who is new and
   who replied, then tapping a number to call and marking it with a thumb. So: warm light paper, high
   contrast ink, the Vero Labs gold kept for the mark, the main action and what needs him. Dark warm
   ground in the evening, like vero-labs.com. Satoshi, the site's own face. */

@font-face { font-family: "Satoshi"; src: url("/static/satoshi-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Satoshi"; src: url("/static/satoshi-medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Satoshi"; src: url("/static/satoshi-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --gold: #c69332;                         /* the brand gold (vero-labs.com) */
  --gold-ink: oklch(0.5 0.1 75);           /* the gold, dark enough for small type on paper */
  --gold-wash: oklch(0.95 0.035 84);
  --paper: oklch(0.968 0.011 84);          /* #f8f4ec */
  --paper-2: oklch(0.94 0.013 82);
  --surface: oklch(0.988 0.005 84);
  --ink: oklch(0.2 0.01 75);
  --ink-2: oklch(0.42 0.014 75);
  --ink-3: oklch(0.53 0.014 75);
  --line: oklch(0.89 0.013 80);
  --line-strong: oklch(0.8 0.015 80);
  --bar: oklch(0.15 0.007 75);             /* #0b0a08, the site's warm near-black */
  --bar-ink: oklch(0.86 0.012 84);
  --good: oklch(0.46 0.08 152);
  --good-wash: oklch(0.94 0.03 152);
  --warn: oklch(0.5 0.1 62);
  --warn-wash: oklch(0.95 0.04 78);
  --bad: oklch(0.5 0.13 28);
  --bad-wash: oklch(0.95 0.025 28);
  --on-gold: oklch(0.17 0.01 75);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --radius: 10px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --gold-ink: #c69332;
    --gold-wash: oklch(0.25 0.035 80);
    --paper: oklch(0.15 0.007 75);
    --paper-2: oklch(0.22 0.01 75);
    --surface: oklch(0.195 0.011 75);      /* #1a1611 */
    --ink: oklch(0.93 0.012 85);
    --ink-2: oklch(0.77 0.013 80);
    --ink-3: oklch(0.64 0.013 80);
    --line: oklch(0.27 0.01 75);
    --line-strong: oklch(0.36 0.012 75);
    --bar: oklch(0.11 0.005 75);
    --good: oklch(0.75 0.1 152);
    --good-wash: oklch(0.25 0.04 152);
    --warn: oklch(0.8 0.11 75);
    --warn-wash: oklch(0.26 0.04 75);
    --bad: oklch(0.74 0.12 28);
    --bad-wash: oklch(0.25 0.04 28);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1rem/1.5 "Satoshi", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased; font-feature-settings: "tnum" 0;
}
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.012em; }
h2 { font-size: 1.125rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: 0.875rem; }
.tiny { font-size: 0.8125rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 16px; }

/* ---------- the top bar and the menu ---------- */
.bar { background: var(--bar); color: var(--bar-ink); }
.bar .wrap { display: flex; align-items: center; gap: 12px; min-height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--gold); }
.brand img { display: block; height: 26px; width: auto; }
.brand span { font-weight: 700; font-size: 0.8125rem; letter-spacing: 0.16em; text-transform: uppercase; }
.who { margin-left: auto; display: flex; align-items: center; gap: 4px; font-size: 0.875rem; }
.who form { margin: 0; }
.linkish {
  appearance: none; background: none; border: 0; font: inherit; color: inherit; cursor: pointer;
  padding: 10px 8px; border-radius: 8px; text-decoration: underline; text-underline-offset: 3px;
}
.bar .linkish { color: var(--bar-ink); text-decoration-color: oklch(0.5 0.01 75); }

.menu { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.menu ul {
  list-style: none; margin: 0 auto; padding: 0 8px; max-width: 72rem; display: flex; gap: 2px;
  overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
}
.menu ul::-webkit-scrollbar { display: none; }
.menu ul { mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
@media (min-width: 1024px) { .menu ul { mask-image: none; } }
.menu a {
  display: flex; align-items: center; gap: 6px; padding: 14px 10px 12px; white-space: nowrap;
  text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: 0.9375rem;
  border-bottom: 2px solid transparent; transition: color 150ms ease;
}
.menu a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--gold); }
.menu .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }

main { padding: 20px 0 64px; }
.head { display: grid; gap: 4px; margin-bottom: 4px; }
.eyebrow { font-size: 0.8125rem; color: var(--ink-3); font-weight: 500; }
.section { margin-top: 36px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.section-head a { font-size: 0.875rem; color: var(--ink-2); }
.lede { margin-top: 6px; color: var(--ink-2); max-width: 62ch; }

/* ---------- notices ---------- */
.flash {
  margin: 16px 0 0; padding: 11px 14px; border-radius: var(--radius); background: var(--good-wash); color: var(--good);
  font-weight: 500; transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out);
}
@starting-style { .flash { opacity: 0; transform: translateY(-4px); } }
.flash.error { background: var(--bad-wash); color: var(--bad); }
.wrap > .flash { margin: 0 0 20px; }  /* room between the notice and the page heading under it */
.notices { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.notices li { background: var(--surface); padding: 11px 14px; display: flex; gap: 12px; justify-content: space-between; }
.notices time { color: var(--ink-3); font-size: 0.8125rem; white-space: nowrap; }

.status { display: flex; align-items: baseline; gap: 10px; margin-top: 14px; font-size: 0.9375rem; flex-wrap: wrap; }
.status .light { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); flex: none; transform: translateY(-1px); }
p.status .light + span:last-child { flex: 1 1 12rem; min-width: 0; }  /* long words wrap beside the light, not under it */
.status.on .light { background: var(--good); }
.status.paused .light { background: var(--warn); }
.status a { color: var(--ink-2); font-size: 0.875rem; }

/* ---------- the numbers ---------- */
.stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line);
  border-block: 1px solid var(--line); margin: 20px 0 12px;
}
.stat { background: var(--paper); padding: 12px 12px 14px 0; display: grid; gap: 2px; text-decoration: none; color: inherit; }
a.stat .stat-label { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.stat:not(:nth-child(3n + 1)) { padding-left: 12px; }
.stat-value { font-size: 1.75rem; font-weight: 500; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.stat-label { font-size: 0.8125rem; color: var(--ink-2); }
.week { color: var(--ink-2); font-size: 0.9375rem; max-width: 70ch; }
.week .stat-value { font-size: inherit; font-weight: 700; color: var(--ink); }
.note-line { margin-top: 10px; }

/* ---------- clinic rows ---------- */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.row {
  display: grid; gap: 6px 14px; padding: 14px 0; border-bottom: 1px solid var(--line);
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "main stage" "who who" "meta meta" "marks marks";
  scroll-margin-top: 64px;
}
.row.hot { background: var(--gold-wash); margin-inline: -16px; padding-inline: 16px; }
.row-main { grid-area: main; min-width: 0; }
.row-stage { grid-area: stage; justify-self: end; }
.row-who { grid-area: who; min-width: 0; display: grid; gap: 2px; }
.row-meta { grid-area: meta; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 0.8125rem; color: var(--ink-2); align-items: center; }
.row-marks { grid-area: marks; }
.name { font-size: 1.0625rem; font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.name:hover { text-decoration: underline; }
.sub { font-size: 0.875rem; color: var(--ink-2); }
.person { font-weight: 500; }
.person .title { color: var(--ink-3); font-weight: 400; }
.contact { display: grid; gap: 0; font-size: 0.9375rem; min-width: 0; }
.contact .line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; min-width: 0; }
.contact .email { overflow-wrap: anywhere; min-width: 0; }
.tel {
  display: inline-flex; align-items: center; min-height: 36px; font-weight: 500; text-decoration: none;
  color: var(--ink); border-bottom: 1px solid var(--gold);
}
.label { font-size: 0.8125rem; color: var(--ink-3); }
.none { font-size: 0.875rem; color: var(--ink-3); }

.pill {
  display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; white-space: nowrap;
  font-size: 0.8125rem; font-weight: 500; background: var(--paper-2); color: var(--ink-2);
}
.pill.hot { background: var(--gold-wash); color: var(--gold-ink); box-shadow: inset 0 0 0 1px oklch(0.85 0.05 82); }
.pill.good { background: var(--good-wash); color: var(--good); }
.pill.warn { background: var(--warn-wash); color: var(--warn); }
.pill.quiet { background: transparent; color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line-strong); }
.flag { display: inline-flex; align-items: center; gap: 6px; color: var(--gold-ink); font-weight: 700; }
.flag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }

/* ---------- buttons ---------- */
.btn {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px; border-radius: var(--radius); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); font: inherit; font-weight: 500; font-size: 0.9375rem;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform 140ms var(--ease-out), background-color 150ms ease, border-color 150ms ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--gold); border-color: var(--gold); color: var(--on-gold); font-weight: 700; }
.btn-quiet { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn-bad { color: var(--bad); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { border-color: var(--ink-3); }
  .btn-primary:hover { background: oklch(0.66 0.125 76); border-color: oklch(0.66 0.125 76); }
  .btn-quiet:hover { background: var(--paper-2); border-color: transparent; }
  .menu a:hover { color: var(--ink); }
}
.marks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0; }
.marks .btn { min-height: 44px; padding: 0 6px; font-size: 0.8125rem; }
.marks > form { margin: 0; display: grid; }
/* Spoke and not interested take a second tap that names what it ends. No motion: it is tapped all day. */
.mark-confirm > summary { display: flex; width: 100%; list-style: none; margin: 0; }
.mark-confirm > summary::-webkit-details-marker { display: none; }
.mark-confirm[open] { grid-column: 1 / -1; }
.mark-confirm[open] > summary { background: var(--paper-2); border-color: var(--ink-3); margin-bottom: 0; }
.mark-confirm .confirm { padding: 10px 0 4px; }
.mark-confirm .confirm .btn { justify-self: start; padding: 0 14px; }
.last-call { font-size: 0.8125rem; color: var(--ink-2); margin-top: 6px; }
/* A lead S4 set aside (CR-S4-6): the reason, in the warn tone the On hold pill uses. */
.hold { font-size: 0.875rem; padding: 10px 12px; border-radius: var(--radius); background: var(--warn-wash); color: var(--ink); }
.hold b { color: var(--warn); font-weight: 700; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- search ---------- */
.search { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 16px 0 20px; align-items: end; }
.search .actions { grid-column: 1 / -1; }
.field { display: grid; gap: 6px; min-width: 0; }
.field > span { font-size: 0.8125rem; font-weight: 500; color: var(--ink-2); }
input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="url"],
input[type="number"], select, textarea {
  font: inherit; font-size: 1rem; width: 100%; min-width: 0; min-height: 44px; padding: 9px 12px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius);
}
input:not([type="checkbox"]), select { height: 44px; }
textarea { min-height: 140px; line-height: 1.55; resize: vertical; }
.panel textarea, .panel input[type="url"], .panel input[type="text"] { max-width: 68ch; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--gold); outline-offset: 0; border-color: transparent; }
input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--gold); margin: 0; }
.check { display: flex; gap: 12px; align-items: flex-start; }
fieldset.plain { border: 0; margin: 0; padding: 0; min-width: 0; }
.field-legend { font-size: 0.8125rem; font-weight: 500; color: var(--ink-2); padding: 0; margin-bottom: 6px; }
.gaps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; max-width: 30rem; }

/* ---------- the profile ---------- */
.back { display: inline-flex; min-height: 40px; align-items: center; font-size: 0.875rem; color: var(--ink-2); }
.flags { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-top: 10px; font-size: 0.875rem; }
.reach { margin-top: 20px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); display: grid; gap: 14px; }
.reach + .reach { margin-top: 10px; }
.reach .who-name { font-size: 1.375rem; font-weight: 700; line-height: 1.2; }
.call { width: 100%; min-height: 50px; font-size: 1rem; }
.facts { display: grid; grid-template-columns: minmax(0, 9rem) minmax(0, 1fr); gap: 10px 16px; margin: 0; }
@media (min-width: 1100px) { .facts { grid-template-columns: minmax(0, 12rem) minmax(0, 1fr); } }
.facts dt { color: var(--ink-3); font-size: 0.875rem; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.prose { max-width: 62ch; }
.prewrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.lines { margin: 0 0 14px; padding-left: 20px; display: grid; gap: 4px; max-width: 62ch; }
.score { font-size: 1.125rem; font-weight: 700; color: var(--gold-ink); }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.timeline li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.timeline time { color: var(--ink-3); font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.timeline .planned { color: var(--ink-2); }
.timeline .planned strong { font-weight: 500; }
.letter {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px;
  max-width: 68ch; display: grid; gap: 12px;
}
.letter-head { display: grid; gap: 2px; font-size: 0.875rem; color: var(--ink-2); padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.letter-head b { color: var(--ink); font-weight: 500; }
.letter-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; font-size: 0.9375rem; }
.quote { white-space: pre-wrap; overflow-wrap: anywhere; padding: 12px 14px; background: var(--paper-2); border-radius: var(--radius); max-width: 68ch; }
.questions { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
h3.note-line { margin-top: 20px; }
.question { display: flex; gap: 10px; }
.question::before { content: "?"; flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gold-wash); color: var(--gold-ink); font-weight: 700; font-size: 0.8125rem; }
.stack { display: grid; gap: 14px; }
.item { padding: 16px 0; border-bottom: 1px solid var(--line); display: grid; gap: 10px; scroll-margin-top: 64px; }
.item:first-child { border-top: 1px solid var(--line); }
details summary { cursor: pointer; color: var(--ink-2); font-weight: 500; padding: 9px 0; }
summary.status { display: flex; margin: 0; padding: 0; color: var(--ink); list-style: none; }
summary.status::-webkit-details-marker { display: none; }
summary.status::after { content: "Show"; font-size: 0.875rem; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
details[open] > summary.status::after { content: "Hide"; }
.status-details { margin-top: 14px; }
details[open] summary { margin-bottom: 8px; }
.confirm { display: grid; gap: 10px; padding: 12px 0 0; }

/* ---------- settings, approvals, operator ---------- */
.panel { padding: 22px 0; border-bottom: 1px solid var(--line); display: grid; gap: 12px; scroll-margin-top: 64px; }
.panel:first-of-type { border-top: 1px solid var(--line); }
.panel p { max-width: 62ch; }
.reasons { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.reasons.waiting { margin-top: 6px; gap: 2px; }
.switch-state { font-size: 1.375rem; font-weight: 700; }
.table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.table th, .table td { text-align: left; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--ink-3); font-weight: 500; }
.scroll { overflow-x: auto; }
.empty { padding: 28px 0; color: var(--ink-2); max-width: 52ch; }
.groups { display: grid; gap: 28px; }

/* The one screen a clicked link opens (R5 option A), drawn in the colors S6 serves it in. */
.click-preview {
  background: var(--bar); color: var(--bar-ink); border-radius: 14px; padding: 28px 20px; max-width: 30rem;
  display: grid; gap: 12px; justify-items: center; text-align: center;
}
.click-mark { color: var(--gold); letter-spacing: 0.32em; font-weight: 700; font-size: 0.75rem; }
.click-headline { font-size: 1.375rem; font-weight: 700; line-height: 1.25; color: oklch(0.96 0.01 85); overflow-wrap: anywhere; }
.click-preview p { overflow-wrap: anywhere; }
.click-button { background: var(--gold); color: var(--on-gold); font-weight: 700; padding: 10px 22px; border-radius: 999px; }
.click-onward { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; font-size: 0.875rem; }

/* ---------- sign in ---------- */
.signin { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: var(--bar); }
.signin-box { width: 100%; max-width: 22rem; display: grid; gap: 18px; color: var(--bar-ink); }
.signin-box .brand { justify-content: center; flex-direction: column; gap: 14px; }
.signin-box .brand img { height: 56px; }
.signin-box input { background: oklch(0.2 0.01 75); border-color: oklch(0.32 0.012 75); color: oklch(0.95 0.01 85); }
.signin-box .field > span { color: oklch(0.78 0.012 80); }
.signin-box .flash.error { background: oklch(0.25 0.05 28); color: oklch(0.85 0.08 28); }

/* ---------- wider screens ---------- */
@media (min-width: 640px) {
  .stats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .stat:not(:nth-child(3n + 1)), .stat { padding-left: 14px; }
  .stat:first-child { padding-left: 0; }
  .search { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .marks { display: flex; flex-wrap: wrap; }
  .marks .btn { padding: 0 12px; }
  .mark-confirm > summary { width: auto; }
  .mark-confirm[open] { flex-basis: 100%; }
  .panel > .mark-confirm { justify-self: start; }  /* a confirm step in a panel stays its own size */
  .panel > .mark-confirm > summary { width: fit-content; }
  .call { width: auto; }
}
@media (min-width: 768px) {
  .wrap { padding: 0 32px; }
  .menu ul { padding: 0 22px; }
  main { padding-top: 28px; }
  h1 { font-size: 2rem; }
  .row { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); grid-template-areas: "main who" "meta marks" "stage marks"; align-items: start; }
  .row-stage { justify-self: start; }
  .row.hot { margin-inline: -12px; padding-inline: 12px; border-radius: var(--radius); }
  .row-marks { justify-self: end; align-self: end; }
  .profile { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 0 40px; align-items: start; }
  .profile > .side { position: sticky; top: 64px; }
  .main-col > .section:first-child { margin-top: 0; }
}
@media (min-width: 1100px) {
  .row {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.5fr) minmax(0, 1fr) 17rem;
    grid-template-areas: "main who stage marks" "main who meta marks";
  }
  .row-marks { align-self: center; }
}

@media (prefers-reduced-motion: reduce) {
  .btn, .flash { transition: none; }
  .btn:active { transform: none; }
}
