/* Pipelify dashboard. A work tool read all day: quiet surfaces, one action colour (the pine of
   the logo), colour reserved for lists and states, numbers set in tabular figures. */

@font-face { font-family: "Plex"; src: url(fonts/plex-latin-400.woff2) format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2199, U+2212, U+2215; }
@font-face { font-family: "Plex"; src: url(fonts/plex-latin-500.woff2) format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2199, U+2212, U+2215; }
@font-face { font-family: "Plex"; src: url(fonts/plex-latin-600.woff2) format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2199, U+2212, U+2215; }
@font-face { font-family: "Plex"; src: url(fonts/plex-latin-ext-400.woff2) format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1EFF, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Plex"; src: url(fonts/plex-latin-ext-500.woff2) format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1EFF, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Plex"; src: url(fonts/plex-latin-ext-600.woff2) format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1EFF, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --paper: #e9eeeb;      /* app background, cool porcelain */
  --rail: #dfe6e2;       /* side menu */
  --sheet: #fbfcfb;      /* work surfaces */
  --sunken: #f1f4f2;     /* wells, hovered rows, bar tracks */
  --ink: #15201b;
  --ink-2: #56635c;      /* secondary text */
  --rule: #d3dbd6;
  --rule-strong: #b9c4be;
  --pine: #1f5a47;       /* actions, links, focus */
  --pine-ink: #ffffff;
  --pine-wash: #dcebe4;
  --bar: #74807a;        /* neutral data bars: colour is kept for signals */
  --a: #1d7449; --b: #9a6200; --c: #3d5b98; --x: #7d8782;
  --good: #1d7449; --warn: #9a6200; --bad: #b3261e;
  --shadow: 0 1px 2px rgb(21 32 27 / .06), 0 10px 28px rgb(21 32 27 / .14);
  --r-sm: 5px; --r: 8px;
  --font: "Plex", ui-sans-serif, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f1412; --rail: #131917; --sheet: #171e1b; --sunken: #1d2622;
    --ink: #e4ebe7; --ink-2: #9aa8a1; --rule: #28322e; --rule-strong: #3a4641;
    --pine: #6cc3a0; --pine-ink: #0d1f18; --pine-wash: #1c3029; --bar: #8a9690;
    --a: #74cf9a; --b: #e2b553; --c: #9db3ef; --x: #8f9994;
    --good: #74cf9a; --warn: #e2b553; --bad: #f18b80;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 12px 32px rgb(0 0 0 / .45);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 14px/1.5 var(--font); font-variant-numeric: tabular-nums; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
a:hover { text-decoration-color: currentColor; }
td a, .todo a, .card a, .fsub a, .chips a { text-decoration: none; color: var(--ink); }
td a:hover, .todo a:hover, .card a:hover, .fsub a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.012em; line-height: 1.25; }
h1 { font-size: 24px; margin: 0; }
h2 { font-size: 16px; margin: 28px 0 10px; }
h3 { font-size: 14px; margin: 16px 0 6px; }
p { margin: 0 0 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--pine); outline-offset: 2px; border-radius: 3px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- Shell: side menu on a laptop, a top bar with a drawer on a phone ---------- */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh;
  background: linear-gradient(90deg, var(--rail) 231px, var(--rule) 231px 232px, transparent 232px); }
.rail { padding: 14px 10px; display: flex; flex-direction: column; gap: 14px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 9px; padding: 4px 8px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 16px; letter-spacing: -0.02em; }
.brand .mark { color: var(--ink); flex: none; }
.vert { position: relative; }
.vert summary { list-style: none; display: flex; flex-direction: column; padding: 8px 10px; border: 1px solid var(--rule-strong); border-radius: var(--r); background: var(--sheet); cursor: pointer; }
.vert summary::-webkit-details-marker { display: none; }
.vert summary small { color: var(--ink-2); font-size: 12px; }
.vert summary strong { font-weight: 600; display: flex; justify-content: space-between; }
.vert summary strong::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid var(--ink-2); border-bottom: 1.5px solid var(--ink-2); transform: translateY(4px) rotate(45deg); }
.vert[open] summary { border-color: var(--ink-2); }
.vert nav { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); box-shadow: var(--shadow); padding: 4px; }
.vert nav a { display: block; padding: 7px 10px; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; }
.vert nav a:hover { background: var(--sunken); }
.vert nav a[aria-current] { font-weight: 600; }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav + .nav { padding-top: 12px; border-top: 1px solid var(--rule); }
.nav a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: var(--r-sm); color: var(--ink-2); text-decoration: none; font-weight: 500; }
.nav a:hover { color: var(--ink); background: rgb(255 255 255 / .45); }
.nav a[aria-current] { color: var(--ink); background: var(--sheet); box-shadow: inset 0 0 0 1px var(--rule); font-weight: 600; }
.badge { min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--ink); color: var(--sheet); font-size: 12px; font-weight: 600; line-height: 19px; text-align: center; }
.badge.bad { background: var(--bad); color: #fff; }
.rail .who { margin-top: auto; padding: 10px; border-top: 1px solid var(--rule); font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }
.rail .who button { padding: 0; margin-top: 2px; }
@media (prefers-color-scheme: dark) { .nav a:hover { background: rgb(255 255 255 / .04); } }

.drawer { display: none; }
main { padding: 28px 32px 96px; max-width: 1320px; width: 100%; }
@media (max-width: 900px) {
  .shell { display: block; background: none; }
  .drawer { display: block; position: sticky; top: 0; z-index: 30; }
  .topbar { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 49px; padding: 0 16px; background: var(--rail); border-bottom: 1px solid var(--rule); cursor: pointer; }
  .topbar::-webkit-details-marker { display: none; }
  .topbar .brand { padding: 0; }
  .topbar > span:last-child { padding: 5px 12px; border: 1px solid var(--rule-strong); border-radius: var(--r-sm); background: var(--sheet); font-weight: 500; }
  .drawer[open] .topbar > span:last-child { border-color: var(--ink-2); }
  .rail { display: none; }
  .drawer[open] + .rail { display: flex; }
  .rail { position: fixed; inset: 49px 0 0 0; height: auto; z-index: 29; background: var(--rail); }
  main { padding: 20px 16px 80px; }
}

/* ---------- Page head ---------- */
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 20px; }
.head p, .head .sub { margin: 6px 0 0; color: var(--ink-2); max-width: 72ch; }
.head .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.crumbs { margin: 0 0 8px; font-size: 13px; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }

/* ---------- Controls ---------- */
button, .btn { font: inherit; font-weight: 500; height: 34px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--ink); background: var(--ink); color: var(--sheet);
  cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; transition: background-color .12s, border-color .12s; }
button:hover, .btn:hover { filter: brightness(1.25); }
button.secondary, .btn.secondary { background: var(--sheet); color: var(--ink); border-color: var(--rule-strong); }
button.secondary:hover, .btn.secondary:hover { filter: none; border-color: var(--ink-2); }
button.small, .btn.small { height: 28px; padding: 0 10px; font-size: 13px; }
button.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.danger-outline { color: var(--bad) !important; border-color: color-mix(in srgb, var(--bad) 55%, transparent) !important; background: var(--sheet) !important; }
button.link, .btn.link { background: none; border: 0; color: var(--ink-2); padding: 0 4px; height: auto; font-weight: 400; text-decoration: underline; text-underline-offset: 3px; }
button.link:hover, .btn.link:hover { color: var(--ink); filter: none; }
.btn.phone { font-weight: 600; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--sheet); border: 1px solid var(--rule-strong); border-radius: var(--r-sm); padding: 6px 10px; min-height: 34px; max-width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--pine); outline: none; box-shadow: 0 0 0 3px var(--pine-wash); }
input[type=checkbox], input[type=radio] { min-height: 0; accent-color: var(--pine); width: 15px; height: 15px; margin: 0; }
input.num { width: 88px; }
input.wide, select.wide { width: 100%; }
input.mono { font-family: var(--mono); font-size: 12px; }
textarea { width: 100%; min-height: 96px; line-height: 1.5; }
label { display: block; font-weight: 500; margin: 14px 0 5px; }
label.inline { display: inline-flex; gap: 8px; font-weight: 400; margin: 4px 16px 4px 0; align-items: center; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.hint { color: var(--ink-2); font-size: 13px; font-weight: 400; }
.muted { color: var(--ink-2); }
.ok { color: var(--good); } .bad { color: var(--bad); } .warn { color: var(--warn); }

/* ---------- Surfaces ---------- */
.panel { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); padding: 18px 20px; margin-bottom: 16px; }
.panel > h2:first-child, .panel > h3:first-child, section.panel h2 { margin-top: 0; }
.panel.accent { border-left: 3px solid var(--ink-2); }
.panel.empty { padding: 36px 24px; text-align: left; }
.panel.empty strong { font-size: 16px; }
.narrow { max-width: 780px; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.cols { display: grid; gap: 24px; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); align-items: start; }
@media (max-width: 1000px) { .cols { grid-template-columns: minmax(0, 1fr); } }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row.nowrap { flex-wrap: nowrap; }
.between { justify-content: space-between; }
.nowrap { white-space: nowrap; }
.clamp { max-width: 520px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
[id] { scroll-margin-top: 24px; }
details summary { cursor: pointer; }
details.panel > summary { font-weight: 600; }
details.panel > summary + * { margin-top: 12px; }

/* Figures: a number with what it counts. Linked ones lead to the matching list. */
.reachgrid { display: grid; gap: 1px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); background: var(--rule); border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; margin-bottom: 20px; }
.grid .stat { border: 1px solid var(--rule); border-radius: var(--r); }
.stat { display: block; background: var(--sheet); padding: 14px 18px 16px; color: var(--ink); text-decoration: none; }
a.stat:hover { background: var(--sunken); }
.stat .v { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
.stat .l { color: var(--ink-2); font-size: 13px; margin-top: 2px; }


/* ---------- Tables ---------- */
.tablewrap { overflow-x: auto; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-size: 12px; font-weight: 500; color: var(--ink-2); background: var(--sheet); white-space: nowrap; }
th a { color: inherit; text-decoration: none; }
th a.sorted { color: var(--ink); font-weight: 600; }
tbody tr:hover td, table tr:hover td { background: var(--sunken); }
td.n, th.n { text-align: right; }
td.sel, th.sel { width: 36px; }
tr:last-child td { border-bottom: 0; }
td strong a, td a strong { font-weight: 600; }

/* ---------- Tags ---------- */
.tag { display: inline-block; padding: 0 8px; border-radius: 4px; font-size: 12px; line-height: 20px; background: var(--sunken); color: var(--ink-2); border: 1px solid var(--rule); white-space: nowrap; }
.tags .tag { margin: 0 3px 4px 0; }
.tag[class*="list-"] { font-weight: 600; background: transparent; }
.list-A { color: var(--a); border-color: color-mix(in srgb, var(--a) 45%, transparent); }
.list-B { color: var(--b); border-color: color-mix(in srgb, var(--b) 45%, transparent); }
.list-C { color: var(--c); border-color: color-mix(in srgb, var(--c) 45%, transparent); }
.list-X, .list-new { color: var(--x); }

.tag.ok { color: var(--good); border-color: color-mix(in srgb, var(--good) 40%, transparent); }
.tag.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.tag.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.reach { font-size: 13px; }
span.reach { white-space: nowrap; }

.flash { padding: 10px 14px; border-radius: var(--r-sm); background: var(--sheet); border: 1px solid var(--rule); border-left: 3px solid var(--good); margin-bottom: 16px; }
.flash.error { border-left-color: var(--bad); color: var(--bad); }

/* ---------- Selection: filter bar, active filters, views, actions ---------- */
.filterbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); }
.filterbar .search { flex: 1 1 180px; min-width: 160px; }
.filterbar .search input { width: 100%; padding-left: 32px; background: var(--sunken) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2356635c' stroke-width='1.6'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 3.5 3.5'/%3E%3C/svg%3E") no-repeat 10px 50%; border-color: transparent; }
.filterbar .search input:focus { background-color: var(--sheet); border-color: var(--pine); }
.pick { position: relative; }
.pick > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border: 1px solid var(--rule-strong); border-radius: var(--r-sm); background: var(--sheet); white-space: nowrap; font-weight: 500; }
.pick > summary::-webkit-details-marker { display: none; }
.pick > summary::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid var(--ink-2); border-bottom: 1.5px solid var(--ink-2); transform: translateY(-2px) rotate(45deg); margin-left: 2px; }
.pick > summary:hover { border-color: var(--ink-2); }
.pick > summary .val { color: var(--ink); font-weight: 600; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.pick.on > summary { border-color: var(--ink-2); background: var(--sunken); }
.pick[open] > summary { border-color: var(--ink-2); }
.pick .foot button { background: var(--ink); border-color: var(--ink); color: var(--sheet); }
.pick .pop { position: absolute; z-index: 15; top: calc(100% + 4px); left: 0; width: 280px; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); box-shadow: var(--shadow); }
.pick .opts { max-height: 320px; overflow-y: auto; padding: 6px; }
.pick .opt { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: center; gap: 10px; margin: 0; padding: 6px 8px; border-radius: var(--r-sm); font-weight: 400; cursor: pointer; }
.pick .opt:hover { background: var(--sunken); }
.pick .opt span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick .opt .n { color: var(--ink-2); font-size: 12px; }
.pick .foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border-top: 1px solid var(--rule); }
.pick .more { padding: 4px 14px 12px; }
.pick .more label:first-child { margin-top: 8px; }
.filterbar .pick.right .pop { left: auto; right: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 10px 0 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 6px 0 10px; border: 1px solid var(--rule-strong); border-radius: var(--r-sm); background: var(--sheet); color: var(--ink); text-decoration: none; font-size: 13px; }
.chip b { font-weight: 600; }
.chip .x { width: 18px; height: 18px; display: inline-grid; place-items: center; border-radius: 3px; color: var(--ink-2); }
.chip:hover .x { background: var(--sunken); color: var(--bad); }
.chip.plain { padding-right: 10px; }

.viewbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 20px 0 16px; }
.views { display: inline-flex; padding: 3px; gap: 2px; background: var(--rail); border: 1px solid var(--rule); border-radius: var(--r); }
.views a { padding: 5px 14px; border-radius: var(--r-sm); color: var(--ink-2); text-decoration: none; font-weight: 500; }
.views a:hover { color: var(--ink); }
.views a[aria-current] { background: var(--sheet); color: var(--ink); box-shadow: 0 0 0 1px var(--rule); font-weight: 600; }
.views .n { color: var(--ink-2); font-weight: 400; margin-left: 4px; }
.selactions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.selactions .pick .pop { left: auto; right: 0; width: 320px; padding: 4px 14px 14px; }
.selactions .pick > summary { background: var(--ink); border-color: var(--ink); color: var(--sheet); }
.selactions .pick > summary::after { border-color: var(--sheet); }
.counted { color: var(--ink-2); font-size: 13px; }

/* Facet: a distribution of the selection; each row adds a filter. */
.dims { display: grid; gap: 12px; }
.dim { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); padding: 12px 14px; }
.dim h3 { margin: 0 0 8px; font-size: 13px; color: var(--ink-2); font-weight: 500; }
.dim ol { list-style: none; margin: 0; padding: 0; }
.dim li { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; padding: 3px 0; font-size: 13px; }
.dim li a, .dim li span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dim li a { color: var(--ink); text-decoration: none; }
.dim li a:hover { text-decoration: underline; }
.dim li .n { color: var(--ink-2); }
.dim li i { grid-column: 1 / -1; display: block; height: 3px; margin-top: 3px; border-radius: 2px; background: var(--sunken); }
.dim li i b { display: block; height: 100%; border-radius: 2px; background: color-mix(in srgb, var(--bar) 70%, var(--sheet)); }

/* ---------- Funnel: every bar is measured against the first step ---------- */
.explore { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
@media (max-width: 1100px) { .explore { grid-template-columns: minmax(0, 1fr); } }
.coverage-stats { margin-bottom: 24px; }
.coverage-stats .l a { color: inherit; }
.coverage-stats .hint { margin-top: 6px; }
.coverage-stats .hint a { color: inherit; }
.funnel { list-style: none; margin: 0; padding: 0; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); }
.funnel > li { padding: 16px 22px 18px; border-bottom: 1px solid var(--rule); }
.funnel > li:last-child { border-bottom: 0; }
.fhead { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 8px; }
.fhead .lab { font-weight: 600; color: var(--ink); text-decoration: none; }
a.lab:hover { text-decoration: underline; }
.fhead .num { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.track { position: relative; height: 14px; border-radius: 3px; background: var(--sunken); }
.track > i { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--ink); }
.track > span { display: block; height: 100%; min-width: 3px; max-width: 100%; border-radius: 3px; background: var(--bar); }
.fmeta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; margin-top: 8px; font-size: 13px; color: var(--ink-2); }
.fmeta strong { color: var(--ink); font-weight: 600; }
.fmeta .plan strong.ok { color: var(--good); }
.fmeta .plan strong.warn { color: var(--warn); }
.fsub { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.fsub li { font-size: 13px; color: var(--ink-2); }
.fsub li a { color: var(--ink-2); }
.fsub li a:hover { color: var(--ink); }
.fsub li strong { color: var(--ink); font-weight: 500; margin-left: 4px; }

/* ---------- Lists of things to do ---------- */
.todo { list-style: none; padding: 0; margin: 0; }
.todo li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.todo li:last-child { border-bottom: 0; }
.steps ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.steps li { display: flex; gap: 10px; align-items: center; }
.steps .check { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--rule-strong); display: inline-grid; place-items: center; font-size: 12px; flex: none; }
.steps li.done { color: var(--ink-2); }
.steps li.done .check { border-color: var(--ink-2); background: var(--ink-2); color: var(--sheet); }
.attention { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 10px 14px; margin-bottom: 20px; border: 1px solid color-mix(in srgb, var(--warn) 40%, var(--rule)); border-radius: var(--r); background: color-mix(in srgb, var(--warn) 7%, var(--sheet)); font-size: 13px; }

/* ---------- Forms in pages ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.filters > div { min-width: 120px; }
.filters .grow { flex: 1 1 220px; }
.filters .grow input { width: 100%; }
.formgrid { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: center; }
.formgrid label { margin: 0; font-weight: 400; }
.savebar { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 12px 0; background: var(--paper); border-top: 1px solid var(--rule); z-index: 5; }
.variant { margin-bottom: 14px; }
.variant legend { font-weight: 600; margin-bottom: 4px; }
.variant input { margin-bottom: 6px; }
.segmented { display: inline-flex; flex-wrap: wrap; padding: 3px; gap: 2px; background: var(--rail); border: 1px solid var(--rule); border-radius: var(--r); margin-bottom: 16px; }
.segmented a { padding: 5px 14px; border-radius: var(--r-sm); text-decoration: none; color: var(--ink-2); font-weight: 500; }
.segmented a:hover { color: var(--ink); }
.segmented a[aria-current] { background: var(--sheet); color: var(--ink); box-shadow: 0 0 0 1px var(--rule); font-weight: 600; }
table.rules th[scope=row] { font-size: 14px; color: var(--ink); font-weight: 600; white-space: nowrap; }
.rulelist { margin: 4px 0 0; padding-left: 18px; }

/* ---------- Lead, calls, replies, deals ---------- */
.points { margin: 0; padding-left: 20px; }
.points li { margin: 5px 0; }
.call h3 { margin: 0; font-size: 16px; }
.call h4 { font-size: 13px; color: var(--ink-2); font-weight: 500; margin: 14px 0 4px; }
.outcome input { width: 100%; margin: 10px 0 8px; }
.contact { padding: 10px 0; border-bottom: 1px solid var(--rule); }
.contact:first-child { padding-top: 0; }
.contact:last-child { border-bottom: 0; padding-bottom: 0; }
.danger-zone > summary { color: var(--bad); }
.msg { white-space: pre-wrap; font-size: 13px; line-height: 1.6; background: var(--sunken); padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid var(--rule); max-width: 80ch; }
.timeline { list-style: none; padding: 0; margin: 12px 0 0; }
.timeline li { padding: 9px 0; border-bottom: 1px solid var(--rule); }
.timeline li:last-child { border-bottom: 0; }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.board .col { background: var(--rail); border: 1px solid var(--rule); border-radius: var(--r); padding: 12px; min-height: 160px; }
.colhead { margin: 0; font-size: 14px; display: flex; justify-content: space-between; }
.coltotal { margin: 2px 0 8px; font-weight: 600; }
.card { border: 1px solid var(--rule); border-radius: var(--r-sm); padding: 10px 12px; margin: 8px 0; background: var(--sheet); }
.dealform { margin-top: 8px; }
.dealform select, .dealform input { min-height: 28px; padding: 2px 6px; font-size: 13px; }
.dealform input[type=date] { flex: 1; min-width: 0; }
.bar { height: 6px; background: var(--sunken); border-radius: 3px; overflow: hidden; min-width: 80px; display: inline-block; width: 100px; vertical-align: middle; }
.bar > span { display: block; height: 100%; background: var(--bar); }
dl.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 7px 18px; margin: 0; }
dl.kv dt { color: var(--ink-2); }
dl.kv dd { margin: 0; overflow-wrap: anywhere; }
code { font-family: var(--mono); font-size: 12px; overflow-wrap: anywhere; background: var(--sunken); padding: 1px 4px; border-radius: 3px; }
.coverage .tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tag.have { color: var(--ink); border-color: var(--rule-strong); background: var(--sheet); }
.tag.miss { color: var(--ink-2); border-style: dashed; background: transparent; }

/* ---------- Sign in and public pages ---------- */
.solo { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login { width: 100%; max-width: 360px; }
.login .brand { padding: 0 0 18px; }
.login input { width: 100%; }
.login button { width: 100%; justify-content: center; margin-top: 18px; }

@media (max-width: 600px) {
  dl.kv { grid-template-columns: 1fr; gap: 0; }
  dl.kv dd { margin-bottom: 8px; }
  .filters > div { flex: 1 1 45%; }
  .pick .pop { position: fixed; left: 12px !important; right: 12px !important; width: auto !important; top: auto; bottom: 12px; }
  h1 { font-size: 21px; }
}
.pick a.opt.link { display: block; color: var(--ink); text-decoration: none; }
.pick a.opt.link:hover { text-decoration: underline; }
.pick .foot a { font-size: 13px; color: var(--ink-2); }
.card { overflow-wrap: anywhere; }
