/* LinkedIn Outreach AI screens. Plain CSS, no build step.
   Colours and type follow docs/mockups: IBM Plex Sans/Mono, #F3F4F6 ground, white cards,
   #4338CA accent. Layouts wrap, so every page works at phone width. */

:root {
  --ground: #F3F4F6; --card: #FFFFFF; --line: #E2E4E9; --soft: #F7F7FB; --hair: #F0F1F4;
  --ink: #14161B; --ink-2: #3F4451; --ink-3: #5B6170;
  --accent: #4338CA; --accent-dark: #312E81; --accent-soft: #E0E7FF; --accent-ink: #3730A3;
  --good: #166534; --good-soft: #DCFCE7; --good-line: #86EFAC;
  --warn: #92400E; --warn-soft: #FEF3C7; --warn-line: #F59E0B; --amber: #B45309;
  --stop: #991B1B; --stop-soft: #FEE2E2;
  --calm: #075985; --calm-soft: #E0F2FE;
  --plain-soft: #EEF0F4;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--ground); color: var(--ink);
  font-family: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 14px; }
a { color: var(--accent); } a:hover { color: var(--accent-dark); }
h1 { margin: 0; font-size: 30px; line-height: 38px; font-weight: 700; }
h2 { margin: 0; font-size: 17px; font-weight: 600; }
p { margin: 0; }
.page { max-width: 1280px; margin: 0 auto; padding: 24px 16px 64px; display: flex;
  flex-direction: column; gap: 20px; }
.row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.between { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 6px; }
.muted { color: var(--ink-3); } .small { font-size: 12px; } .mono { font-family: var(--mono); }
.grow { flex: 999 1 560px; min-width: 0; } .side { flex: 1 1 300px; min-width: 0; }

/* banner: what is switched off */
.banner { border-radius: 12px; padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 4px 12px;
  align-items: baseline; border: 1px solid; }
.banner strong { font-size: 14px; letter-spacing: 0.04em; }
.banner-demo { background: var(--calm-soft); border-color: #7DD3FC; color: var(--calm); }
.banner-dry-run { background: var(--warn-soft); border-color: var(--warn-line); color: var(--warn); }
.banner-paused { background: var(--stop); border-color: var(--stop); color: #FFFFFF; }
.banner-off { background: var(--stop-soft); border-color: #FCA5A5; color: var(--stop); }

/* navigation */
.brand { font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent); }
.nav, .tabs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.nav a, .nav button { min-height: 44px; display: inline-flex; align-items: center; padding: 0 14px;
  border-radius: 8px; font: inherit; font-weight: 600; text-decoration: none; background: var(--card);
  color: var(--ink); border: 1px solid var(--line); cursor: pointer; }
.nav a[aria-current="page"] { background: var(--accent); color: #FFFFFF; border-color: var(--accent); }
.tabs { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 6px; }
.tabs a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 16px;
  border-radius: 8px; font-weight: 600; text-decoration: none; color: var(--ink); }
.tabs a[aria-current="true"] { background: var(--accent); color: #FFFFFF; }

/* cards, chips, buttons */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px;
  display: flex; flex-direction: column; gap: 10px; }
.chip { display: inline-block; font-size: 12px; font-weight: 600; border-radius: 999px;
  padding: 2px 8px; background: var(--plain-soft); color: var(--ink-2); }
.chip.good { background: var(--good-soft); color: var(--good); }
.chip.info { background: var(--accent-soft); color: var(--accent-ink); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.stop { background: var(--stop-soft); color: var(--stop); }
.chip.calm { background: var(--calm-soft); color: var(--calm); }
.btn { min-height: 44px; padding: 0 16px; border-radius: 8px; font: inherit; font-weight: 600;
  cursor: pointer; border: 1px solid var(--line); background: var(--card); color: var(--ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }
.btn.approved { background: var(--good); border-color: var(--good); color: #FFFFFF; }
.btn.danger { color: var(--stop); border-color: #D4D7DE; }
.btn.quiet { color: var(--ink-2); }

/* numbers */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.stat .label { font-size: 13px; font-weight: 500; color: var(--ink-3); }
.stat .value { font-family: var(--mono); font-size: 28px; line-height: 34px; font-weight: 600; }
.stat .note { font-size: 12px; color: var(--ink-3); }
.tone-good { color: var(--good); } .tone-bad, .tone-stop { color: var(--stop); }
.tone-warn { color: var(--amber); } .tone-calm { color: var(--calm); } .tone-info { color: var(--accent-ink); }

/* today's list */
.done { background: var(--good-soft); border: 1px solid var(--good-line); border-radius: 12px;
  padding: 14px 16px; color: var(--good); font-size: 15px; font-weight: 600; }
.notice { background: var(--warn-soft); border: 1px solid var(--warn-line); border-radius: 12px;
  padding: 12px 16px; color: var(--warn); font-weight: 600; }
.person { background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.person.approved { border-color: var(--good-line); }
.person.removed { background: #F9FAFB; }
.person .who { flex: 999 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.person .name { font-size: 16px; font-weight: 600; }
.person .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.person .status { font-size: 13px; font-weight: 600; min-width: 72px; text-align: right; }
.preview { white-space: pre-line; line-height: 22px; background: var(--soft);
  border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
ol.plain { margin: 0; padding-left: 20px; line-height: 22px; color: var(--ink-2); }

/* pipeline */
.board { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px;
  overflow-x: auto; }
.columns { display: grid; grid-template-columns: repeat(8, minmax(170px, 1fr)); gap: 10px;
  min-width: 1400px; }
.column { display: flex; flex-direction: column; gap: 8px; background: var(--soft);
  border-radius: 10px; padding: 10px; }
.column .count { font-family: var(--mono); font-size: 13px; font-weight: 600; background: var(--card);
  border: 1px solid var(--line); border-radius: 999px; padding: 0 8px; color: var(--ink-2); }
.pcard { text-align: left; min-height: 44px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--card); padding: 10px; font: inherit; cursor: pointer; display: flex;
  flex-direction: column; gap: 3px; text-decoration: none; color: var(--ink); }
.pcard[aria-current="true"] { border-color: var(--accent); }
.pcard .n { font-size: 14px; font-weight: 600; } .pcard span { font-size: 12px; }
ol.timeline { margin: 0; padding: 0; list-style: none; }
ol.timeline li { display: grid; grid-template-columns: 104px 22px minmax(0, 1fr); gap: 10px;
  align-items: start; padding: 8px 0; border-bottom: 1px solid var(--hair); }
.dot { width: 12px; height: 12px; margin-top: 4px; border-radius: 999px; background: var(--accent);
  border: 2px solid var(--accent); }
.step-next .dot { background: #FFFFFF; border-color: #A5A8EC; }
.step-next .t { color: var(--ink-3); }
.step-stop.tone-good .dot { background: var(--good); border-color: var(--good); }
.step-stop.tone-stop .dot { background: var(--stop); border-color: var(--stop); }
.step-stop.tone-calm .dot { background: var(--calm); border-color: var(--calm); }
.kv { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--hair);
  padding-bottom: 8px; font-size: 13px; }
.kv b { text-align: right; font-weight: 600; overflow-wrap: anywhere; }

/* KPIs */
.funnel-row { display: grid; grid-template-columns: 130px minmax(0, 1fr) 110px; align-items: center;
  gap: 12px; }
.bar { height: 26px; background: var(--plain-soft); border-radius: 6px; overflow: hidden; }
.bar div { height: 26px; border-radius: 6px; }
.rate { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 0; border-top: 1px solid var(--plain-soft); }
.rate .v { font-family: var(--mono); font-size: 22px; font-weight: 600; }
.scroll { overflow-x: auto; position: relative; }
table { width: 100%; border-collapse: collapse; }
th { padding: 10px 12px; text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: 0.04em; }
td { padding: 12px; border-top: 1px solid var(--plain-soft); }
.num { text-align: right; font-family: var(--mono); }
tr.selected td { background: #F5F5FF; }

/* login */
.login { max-width: 380px; margin: 8vh auto 0; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.field input { min-height: 44px; padding: 0 12px; border: 1px solid #D4D7DE; border-radius: 8px;
  font: inherit; }
.error { background: var(--stop-soft); color: var(--stop); border-radius: 8px; padding: 10px 12px;
  font-weight: 600; }

/* ---- Milestone 7.1 ---------------------------------------------------------------------- */
h3 { margin: 0 0 6px; font-size: 13px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--ink-3); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%);
  white-space: nowrap; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.chips, .acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn.off { color: #9CA3AF; cursor: default; display: inline-flex; align-items: center; }
a.btn, .linkbtn { display: inline-flex; align-items: center; text-decoration: none; }
.empty { align-items: flex-start; padding: 24px; }
.count { font-family: var(--mono); font-size: 13px; font-weight: 600; background: var(--soft);
  border: 1px solid var(--line); border-radius: 999px; padding: 0 8px; color: var(--ink-2); }

/* navigation badges, bottom tab bar */
.navlinks { display: contents; }
.badge { margin-left: 8px; min-width: 22px; padding: 0 6px; border-radius: 999px; font-size: 12px;
  line-height: 20px; text-align: center; font-family: var(--mono); font-weight: 600;
  background: var(--accent-soft); color: var(--accent-ink); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge[hidden] { display: none; }
.tabbar { display: none; }

/* loading bar and toasts */
#loading { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; opacity: 0;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  background-size: 40% 100%; background-repeat: no-repeat; }
body.is-loading #loading { opacity: 1; animation: slide 0.9s linear infinite; }
@keyframes slide { from { background-position: -40% 0; } to { background-position: 140% 0; } }
#toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; z-index: 70;
  display: flex; flex-direction: column; gap: 8px; width: min(440px, calc(100vw - 24px)); }
.toast { background: var(--ink); color: #FFFFFF; border-radius: 10px; padding: 8px 8px 8px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 500;
  box-shadow: 0 6px 24px rgba(20, 22, 27, 0.25); min-height: 52px; }
.toast.error { background: var(--stop); }
.toast button { min-height: 44px; min-width: 44px; padding: 0 12px; border-radius: 8px; font: inherit;
  font-weight: 700; background: transparent; color: #FFFFFF; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.5); }

/* help */
dialog#help { border: 1px solid var(--line); border-radius: 12px; padding: 20px;
  width: min(480px, calc(100vw - 24px)); color: var(--ink); }
dialog#help::backdrop { background: rgba(20, 22, 27, 0.4); }
dialog#help h3 { margin-top: 14px; }
dl.keys { display: grid; grid-template-columns: 96px 1fr; gap: 6px 12px; margin: 0; }
dl.keys dd { margin: 0; }
kbd { font-family: var(--mono); font-size: 12px; background: var(--soft); border: 1px solid var(--line);
  border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; }

/* today's list */
.deadline { background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 16px; font-size: 15px; }
.deadline.closed { background: var(--plain-soft); color: var(--ink-2); }
.person { cursor: default; }
.person.is-current { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.tick { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center;
  justify-content: center; cursor: pointer; }
.tick input { width: 20px; height: 20px; accent-color: var(--accent); }
.actionbar { display: none; }

/* pipeline: needs attention */
.queue { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.qgroup { display: flex; flex-direction: column; gap: 6px; background: var(--soft);
  border-radius: 10px; padding: 10px; min-width: 0; }
.qitem { min-height: 44px; display: flex; flex-direction: column; justify-content: center; gap: 2px;
  background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px;
  text-decoration: none; color: var(--ink); }
.qitem .n { font-weight: 600; }
.qitem[aria-current="true"], .rowlink[aria-current="true"] { border-color: var(--accent); }

/* pipeline: board */
.columns { display: flex; gap: 10px; min-width: 0; grid-template-columns: none; }
.column { flex: 1 0 170px; min-width: 170px; }
.column.collapsed { flex: 0 0 64px; min-width: 64px; align-items: center; text-decoration: none;
  color: var(--ink); padding: 10px 6px; }
.column.collapsed .vertical { writing-mode: vertical-rl; font-size: 13px; font-weight: 600; }
.columns.compact .pcard { padding: 0 10px; justify-content: center; }
.columns.compact .pcard .n { font-size: 13px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }
.pcard[aria-current="true"] { box-shadow: 0 0 0 2px var(--accent-soft); }

/* pipeline: list */
.search { display: flex; gap: 8px; }
.search input { flex: 1 1 auto; min-width: 0; min-height: 44px; padding: 0 12px; font: inherit;
  border: 1px solid #D4D7DE; border-radius: 8px; background: var(--card); }
.filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fchip { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2);
  font-weight: 600; font-size: 13px; text-decoration: none; }
.fchip.on { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }
table.people { min-width: 860px; }
table.people th a { color: inherit; text-decoration: none; display: inline-flex; align-items: center;
  min-height: 44px; gap: 4px; }
table.people th[aria-sort="ascending"] a, table.people th[aria-sort="descending"] a { color: var(--accent); }
table.people th[scope="row"] { text-transform: none; letter-spacing: 0; font-size: 14px; padding: 0 12px;
  border-top: 1px solid var(--plain-soft); }
.rowlink { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
#results.htmx-request, .panel.htmx-request .panel-in { opacity: 0.5; }

/* pipeline: side panel (not modal: the page behind it stays usable) */
.panel { position: fixed; top: 0; right: 0; bottom: 0; width: 480px; max-width: 100vw; z-index: 40;
  background: var(--card); border-left: 1px solid var(--line); overflow-y: auto;
  box-shadow: -8px 0 32px rgba(20, 22, 27, 0.12); }
.panel[hidden] { display: none; }
.panel-in { display: flex; flex-direction: column; gap: 18px; padding: 16px 20px 40px; }
.panel-bar { position: sticky; top: 0; z-index: 1; background: var(--card); display: flex;
  align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0;
  border-bottom: 1px solid var(--hair); }
.panel-steps { display: flex; gap: 6px; }
#panel-title { font-size: 22px; font-weight: 700; }
#panel-title:focus-visible { outline-offset: 4px; }
.panel ol.timeline li { grid-template-columns: 92px 18px minmax(0, 1fr); }
.phone-only { display: none; }
@media (min-width: 1100px) {
  /* Make room, so the panel covers nothing the page still has to show. */
  body.panel-open .page { margin-right: 496px; margin-left: 16px; max-width: none; }
}

/* settings */
summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* notifications */
.note.new { border-color: var(--accent); }
.note h2 { font-size: 16px; }
.nav .bell .badge { margin-left: 4px; }

/* KPIs: numbers that open the people behind them */
a.statlink { text-decoration: none; color: inherit; }
a.statlink:hover, a.funnel-row:hover { border-color: var(--accent); }
a.statlink .label::after { content: " \203A"; color: var(--accent); }
a.funnel-row { text-decoration: none; color: inherit; border: 1px solid transparent; border-radius: 8px;
  min-height: 44px; padding: 0 4px; }
a.v { text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
td.num a { display: inline-block; min-width: 44px; padding: 10px 0; }

@media (max-width: 640px) {
  body { padding-bottom: 72px; }
  .navlinks { display: none; }
  .tabbar { display: grid; grid-template-columns: repeat(3, 1fr); position: fixed; left: 0; right: 0;
    bottom: 0; z-index: 30; background: var(--card); border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a { min-height: 56px; display: flex; align-items: center; justify-content: center;
    font-weight: 600; text-decoration: none; color: var(--ink-2); }
  .tabbar a[aria-current="page"] { color: var(--accent); box-shadow: inset 0 3px 0 var(--accent); }
  #toasts { bottom: 140px; }
  .panel { width: 100vw; border-left: 0; z-index: 50; }
  .phone-only { display: inline; } .desk-only { display: none; }
  body.panel-open { overflow: hidden; }
  /* With the script running, the focused person is decided from one bar above the tabs. */
  html.js body.today .actionbar:not([hidden]) { display: flex; position: fixed; left: 0; right: 0;
    bottom: calc(56px + env(safe-area-inset-bottom)); z-index: 31; background: var(--card);
    border-top: 1px solid var(--line); padding: 8px 12px; gap: 8px; align-items: center;
    justify-content: space-between; box-shadow: 0 -6px 20px rgba(20, 22, 27, 0.08); }
  .actionbar .who { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis;
    white-space: nowrap; }
  .actionbar .acts { flex-wrap: nowrap; }
  html.js body.today .person .actions .btn { display: none; }
  html.js body.today { padding-bottom: 140px; }
  .search { flex-wrap: wrap; }
  h1 { font-size: 24px; line-height: 30px; }
  .page { padding: 16px 12px 48px; }
  .person .actions { width: 100%; }
  .person .actions .btn { flex: 1 1 0; }
  .person .status { min-width: 0; text-align: left; width: 100%; }
  .funnel-row { grid-template-columns: 96px minmax(0, 1fr) 92px; }
  ol.timeline li { grid-template-columns: 84px 18px minmax(0, 1fr); }
}
