/* King Kong tokens, copied from ProjectHQ app/globals.css */
:root {
  --ink: #0a0d08; --ink2: #141a11; --neon: #C3F53C; --neon-d: #7fae00;
  --cream: #f5f7f0; --sage: #eef7e0; --paper: #fff; --read: #22271e; --muted: #5a625c; --line: #e4e8e0;
  --green-solid: #6EE268; --green-pale: #ECFEC6; --red: #b3402a; --red-bg: #fbece9;
  --radius: 12px; --radius-pill: 30px;
  --disp: 'Bebas Neue', Oswald, 'Arial Narrow', sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--cream); color: var(--read); font: 15px/1.6 var(--body); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--neon) 60%, transparent); outline-offset: 2px; }

/* top bar */
.top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding: 14px clamp(16px, 4vw, 40px);
  background: var(--paper); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { height: 28px; width: auto; }
.kk-kicker { font-family: var(--disp); font-size: 17px; letter-spacing: .18em; text-transform: uppercase; color: var(--neon-d); }
.top nav { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
.top nav a { font-family: var(--disp); font-size: 18px; letter-spacing: .06em; text-decoration: none;
  padding: 6px 14px; border-radius: var(--radius-pill); color: var(--read); }
.top nav a[aria-current="page"] { background: var(--ink); color: var(--paper); }
.who { font-size: 13px; color: var(--muted); }

.page { padding: clamp(24px, 4vw, 48px) clamp(16px, 4vw, 40px); max-width: 1480px; margin: 0 auto; display: grid; gap: 22px; }
.eyebrow { font-family: var(--disp); font-size: 16px; letter-spacing: .16em; text-transform: uppercase; color: var(--neon-d); }
.title { font-family: var(--disp); font-weight: 400; font-size: clamp(40px, 6vw, 72px); line-height: .86; color: var(--ink); }
.lead { max-width: 62ch; color: #4a5247; margin: 0; }

/* hero band (summary) */
.band-ink { background: radial-gradient(80% 120% at 82% 6%, rgba(195,245,60,.18), transparent 52%),
  repeating-linear-gradient(-48deg, rgba(195,245,60,.05) 0 14px, transparent 14px 40px),
  linear-gradient(160deg, #16240f, #0a0d08);
  color: #fff; border-radius: 20px; padding: clamp(24px, 4vw, 44px); display: grid; gap: 20px; }
.giant { font-family: var(--disp); font-size: clamp(88px, 14vw, 170px); line-height: .78; color: var(--neon);
  text-shadow: 0 0 32px rgba(195,245,60,.35); }
.band-ink .lead { color: rgba(255,255,255,.72); }
.rail { display: flex; flex-wrap: wrap; gap: 14px 0; border-top: 1px solid rgba(255,255,255,.18); padding-top: 18px; }
.rail .r { display: flex; flex-direction: column; gap: 4px; padding-right: 26px; margin-right: 26px; border-right: 1px solid rgba(255,255,255,.18); }
.rail .r:last-child { border-right: 0; }
.rv { font-family: var(--disp); font-size: 38px; line-height: .9; }
.rl { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; color: rgba(255,255,255,.55); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 22px; text-decoration: none; display: grid; gap: 6px; }
.card h3 { font-family: var(--disp); font-weight: 400; font-size: 28px; color: var(--ink); letter-spacing: .02em; }
.card p { margin: 0; color: var(--muted); font-size: 14px; }

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip { font-family: var(--disp); font-size: 16px; letter-spacing: .06em; padding: 6px 16px; border-radius: var(--radius-pill);
  border: 1px solid var(--line); background: var(--paper); color: var(--read); text-decoration: none; }
.chip[aria-current="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.meta { font-size: 13px; color: var(--muted); }

/* data grid */
.grid { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; overflow-x: auto; }
table.kk { border-collapse: collapse; width: 100%; font-size: 13.5px; font-variant-numeric: tabular-nums; }
table.kk th { font-family: var(--disp); font-weight: 400; font-size: 15px; letter-spacing: .08em; text-transform: uppercase;
  text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--read); white-space: nowrap;
  position: sticky; top: 0; background: var(--paper); }
table.kk td { padding: 10px 14px; border-bottom: 1px solid var(--line); color: #4a5247; vertical-align: top; }
table.kk td.wide { min-width: 280px; max-width: 420px; }
table.kk tr:last-child td { border-bottom: 0; }
table.kk tr.err td { background: var(--red-bg); }
td .none { color: #8a9184; }
td a { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--neon-d); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.tag { display: inline-block; background: var(--sage); color: #3a4a1e; padding: 2px 8px; border-radius: 6px; font-size: 12px; margin: 1px 2px 1px 0; }
.lane { display: inline-block; font-weight: 800; font-size: 11px; letter-spacing: .1em; padding: 3px 11px; border-radius: 20px; }
.lane-A { background: var(--neon); color: var(--ink); }
.lane-S { background: var(--green-pale); color: var(--ink); }
.lane-X { background: var(--cream); color: var(--muted); border: 1px solid var(--line); }
.errtext { color: var(--red); font-weight: 600; }
.empty { background: var(--sage); border-radius: 18px; padding: 28px; font-weight: 600; color: var(--read); }

/* triage form (tenders board) */
.triage { display: grid; gap: 6px; min-width: 220px; }
.triage select, .triage textarea { font: inherit; font-size: 13px; color: var(--read); background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 10px; }
.triage textarea { resize: vertical; min-height: 2.6em; }
.triage button { justify-self: start; font-family: var(--disp); font-size: 15px; letter-spacing: .06em; cursor: pointer;
  padding: 4px 16px; border-radius: var(--radius-pill); border: 0; background: var(--ink); color: var(--paper); }
.triage .by { font-size: 11px; color: var(--muted); }

/* header sign-out */
.who { display: flex; align-items: center; gap: 10px; margin: 0; }
.who button { font: 600 12px var(--body); cursor: pointer; padding: 5px 12px; border-radius: var(--radius-pill);
  border: 1px solid var(--line); background: var(--paper); color: var(--read); }
.who button:hover { border-color: var(--ink); }

/* login */
body.auth { background: var(--ink); min-height: 100vh; }
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; }
.auth-hero { position: relative; overflow: hidden; display: grid; place-items: center; padding: 48px;
  background: radial-gradient(70% 90% at 30% 20%, rgba(195,245,60,.16), transparent 60%),
    repeating-linear-gradient(-48deg, rgba(195,245,60,.04) 0 14px, transparent 14px 40px),
    linear-gradient(160deg, #16240f, #0a0d08); }
.sweep { position: absolute; width: min(78vh, 92%); opacity: .9; }
.sweep .beam { transform-origin: 200px 200px; animation: spin 4s linear infinite; }
.sweep .ping { animation: ping 4s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.sweep .p2 { animation-delay: -1s; } .sweep .p3 { animation-delay: -2.2s; } .sweep .p4 { animation-delay: -.6s; } .sweep .p5 { animation-delay: -3s; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes ping { 0%, 100% { opacity: .25; transform: scale(.8); } 12% { opacity: 1; transform: scale(1.5); } 40% { opacity: .7; transform: scale(1); } }
.auth-copy { position: relative; align-self: end; justify-self: start; display: grid; gap: 10px; max-width: 34ch; }
.auth-logo { height: 34px; width: auto; justify-self: start; }
.auth-copy .eyebrow { color: var(--neon); }
.auth-copy h1 { font: 400 clamp(84px, 11vw, 160px)/.8 var(--disp); color: var(--neon); text-shadow: 0 0 40px rgba(195,245,60,.35); }
.auth-copy p { margin: 0; color: rgba(255,255,255,.72); font-size: 16px; }
.auth-panel { display: grid; place-items: center; padding: 32px 16px; background: var(--cream); }
.auth-card { width: min(400px, 100%); display: grid; gap: 16px; background: var(--paper); border: 1px solid var(--line);
  border-radius: 22px; padding: clamp(24px, 4vw, 40px); box-shadow: 0 30px 60px -30px rgba(10,13,8,.35); }
.auth-card h2 { font: 400 46px/.9 var(--disp); color: var(--ink); margin-bottom: 4px; }
.auth-card label { display: grid; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.auth-card input:not([type=hidden]) { font: 400 16px var(--body); color: var(--read); padding: 12px 14px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--cream); text-transform: none; letter-spacing: 0; }
.auth-card input:focus { outline: none; border-color: var(--neon-d); box-shadow: 0 0 0 4px rgba(195,245,60,.35); background: var(--paper); }
.auth-card button { margin-top: 6px; font: 400 22px var(--disp); letter-spacing: .08em; cursor: pointer; padding: 12px; border: 0;
  border-radius: var(--radius-pill); background: var(--ink); color: var(--neon); transition: transform .15s, box-shadow .15s; }
.auth-card button:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -10px rgba(10,13,8,.6); }
.auth-error { margin: 0; padding: 10px 14px; border-radius: var(--radius); background: var(--red-bg); color: var(--red); font-weight: 600; font-size: 14px; }
.auth-foot { margin: 0; font-size: 12px; color: var(--muted); text-align: center; }
@media (max-width: 820px) { .auth-wrap { grid-template-columns: 1fr; } .auth-hero { min-height: 42vh; padding: 28px 16px; }
  .auth-copy h1 { font-size: 88px; } }
@media (prefers-reduced-motion: reduce) { .sweep .beam, .sweep .ping { animation: none; } }

/* CRM (UNIT-010): pipeline board, cards, panels, forms, timeline, tasks */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.crm-sub { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.crm-btn { display: inline-flex; align-items: center; gap: 6px; font: 400 17px var(--disp); letter-spacing: .06em; cursor: pointer;
  text-decoration: none; padding: 8px 18px; border-radius: var(--radius-pill); border: 1px solid var(--ink); background: var(--ink);
  color: var(--neon); transition: transform .15s, box-shadow .15s; }
.crm-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -12px rgba(10,13,8,.6); }
.crm-btn.ghost { background: var(--paper); color: var(--ink); border-color: var(--line); }
.crm-btn.ghost:hover { border-color: var(--ink); }
.crm-muted { color: var(--muted); font-size: 13px; }
.crm-none { color: var(--muted); font-size: 13px; margin: 0; padding: 14px; text-align: center; list-style: none; }
.crm-pill { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 20px; background: var(--cream); color: var(--muted); border: 1px solid var(--line); }
.crm-money { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink); }

/* board: one column per stage, horizontal scroll when narrow */
.crm-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(196px, 1fr); gap: 14px; overflow-x: auto;
  padding-bottom: 8px; scroll-snap-type: x proximity; }
.crm-col { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; display: flex; flex-direction: column;
  min-height: 220px; scroll-snap-align: start; border-top: 4px solid var(--line); }
.crm-col-qualified { border-top-color: var(--green-pale); } .crm-col-bidding { border-top-color: var(--green-solid); }
.crm-col-submitted { border-top-color: var(--neon); } .crm-col-won { border-top-color: var(--neon-d); }
.crm-col-lost { border-top-color: var(--red); }
.crm-col-head { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 2px 10px; padding: 14px 16px 12px;
  border-bottom: 1px solid var(--line); }
.crm-col-head h2 { font: 400 22px/1 var(--disp); letter-spacing: .06em; color: var(--ink); }
.crm-count { font: 700 12px var(--body); min-width: 24px; text-align: center; padding: 2px 8px; border-radius: 20px;
  background: var(--ink); color: var(--neon); }
.crm-sum { grid-column: 1 / -1; font-size: 13px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.crm-cards { display: grid; gap: 10px; padding: 12px; align-content: start; }
.crm-card { display: grid; gap: 4px; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--cream); text-decoration: none; transition: border-color .15s, transform .15s, box-shadow .15s; }
.crm-card:hover { border-color: var(--ink); transform: translateY(-1px); box-shadow: 0 10px 22px -16px rgba(10,13,8,.6); }
.crm-card-title { color: var(--ink); font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.crm-card-org { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.crm-card-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.crm-owner { color: var(--read); }
.crm-card-date { font-size: 12px; color: var(--muted); }
.crm-card .crm-pill { justify-self: start; }
.crm-card.is-overdue { border-color: color-mix(in srgb, var(--red) 45%, var(--line)); background: var(--red-bg); }
.is-overdue b, .crm-card.is-overdue .crm-card-date { color: var(--red); }

/* detail pages */
.crm-titlebar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.crm-titlebar .title { overflow-wrap: anywhere; }
.crm-titlebar .eyebrow a { color: inherit; }
.crm-titlebar-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.crm-titlebar-actions form, .crm-titlebar > form { margin: 0; }
.crm-link { color: var(--ink); text-decoration: underline; text-decoration-color: var(--neon-d); text-decoration-thickness: 2px; text-underline-offset: 3px; font-weight: 600; margin-right: 12px; overflow-wrap: anywhere; }
.crm-banner { margin: 0; padding: 12px 16px; border-radius: var(--radius); background: var(--ink); color: var(--neon); font-weight: 600; }
.crm-notes { margin: 0; white-space: pre-line; color: var(--read); overflow-wrap: anywhere; }
.crm-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; margin: 0; background: var(--line);
  border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.crm-facts > div { background: var(--paper); padding: 14px 18px; }
.crm-facts .wide { grid-column: span 2; }
.crm-facts dt { font: 400 14px var(--disp); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.crm-facts dd { margin: 2px 0 0; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.crm-stage { display: inline-block; font-weight: 800; font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  padding: 3px 11px; border-radius: 20px; background: var(--cream); color: var(--ink); border: 1px solid var(--line); }
.crm-stage-qualified { background: var(--green-pale); } .crm-stage-bidding { background: var(--green-solid); border-color: transparent; }
.crm-stage-submitted { background: var(--neon); border-color: transparent; }
.crm-stage-won { background: var(--ink); color: var(--neon); border-color: var(--ink); }
.crm-stage-lost { background: var(--red-bg); color: var(--red); }
.crm-split { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.crm-stack { display: grid; gap: 22px; }
.crm-panel { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: clamp(16px, 2.4vw, 24px);
  display: grid; gap: 16px; }
.crm-panel h2 { font: 400 26px/1 var(--disp); letter-spacing: .04em; color: var(--ink); }

/* forms */
.crm-form { display: grid; gap: 14px; margin: 0; }
.crm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px 14px; }
.crm-field { display: grid; gap: 5px; align-content: start; }
.crm-field.wide { grid-column: 1 / -1; }
.crm-field label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.crm-field .req { color: var(--red); }
.crm-field input, .crm-field select, .crm-field textarea, .crm-search input[type=search] { font: 400 15px var(--body);
  color: var(--read); padding: 9px 12px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--cream);
  width: 100%; min-height: 42px; }
.crm-field textarea { resize: vertical; }
.crm-field input:focus, .crm-field select:focus, .crm-field textarea:focus, .crm-search input:focus { outline: none;
  border-color: var(--neon-d); box-shadow: 0 0 0 4px rgba(195,245,60,.35); background: var(--paper); }
.crm-field.has-err input, .crm-field.has-err select, .crm-field.has-err textarea { border-color: var(--red); background: var(--red-bg); }
.crm-err { font-size: 12.5px; font-weight: 600; color: var(--red); }
.crm-alert { margin: 0; padding: 10px 14px; border-radius: var(--radius); background: var(--red-bg); color: var(--red); font-weight: 600; font-size: 14px; }
.crm-alert a { color: inherit; }
.crm-actions { display: flex; gap: 10px; }
.crm-hint { margin: 0; font-size: 13px; color: var(--muted); }
.crm-hint a { color: var(--neon-d); font-weight: 600; }
.crm-search { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.crm-search input[type=search] { flex: 1 1 220px; width: auto; background: var(--paper); }
.crm-check { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); }

/* timeline + lists */
.crm-timeline, .crm-contacts, .crm-rows, .crm-tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.crm-act { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; padding: 12px 14px;
  border-radius: var(--radius); border: 1px solid var(--line); background: var(--cream); }
.crm-act.is-open { background: var(--paper); border-color: var(--neon-d); box-shadow: inset 4px 0 0 var(--neon); }
.crm-act.is-done p { text-decoration: line-through; color: var(--muted); }
.crm-act-stage { background: var(--paper); border-style: dashed; }
.crm-act p, .crm-task p { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.crm-act form, .crm-task form { margin: 0; }
.crm-kind { font: 700 10.5px var(--body); letter-spacing: .1em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px;
  background: var(--sage); color: #3a4a1e; }
.crm-act-stage .crm-kind { background: var(--ink); color: var(--neon); }
.crm-by { font-size: 12px; color: var(--muted); }
.crm-by a { color: var(--neon-d); font-weight: 600; }
.crm-tick { font: 600 12px var(--body); cursor: pointer; padding: 5px 12px; border-radius: var(--radius-pill);
  border: 1px solid var(--line); background: var(--paper); color: var(--read); white-space: nowrap; }
.crm-tick:hover { border-color: var(--ink); }
.crm-tick.on { background: var(--green-pale); border-color: var(--green-solid); }
.crm-contacts > li, .crm-rows > li { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; padding: 10px 0;
  border-bottom: 1px solid var(--line); }
.crm-contacts > li:last-child, .crm-rows > li:last-child { border-bottom: 0; }
.crm-contacts a, .crm-rows a { color: var(--neon-d); font-weight: 600; overflow-wrap: anywhere; }
.crm-contacts details { flex-basis: 100%; }
.crm-contacts .crm-notes { flex-basis: 100%; font-size: 13px; color: var(--muted); }
details > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--neon-d); width: fit-content; }
details[open] > summary { margin-bottom: 10px; }
.crm-add { border-top: 1px solid var(--line); padding-top: 12px; }
.crm-rows .is-overdue { background: var(--red-bg); border-radius: 8px; padding-inline: 8px; }

/* tasks */
.crm-task { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 18px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px; }
.crm-task .crm-tick { width: 26px; height: 26px; padding: 0; border-radius: 50%; border-width: 2px; }
.crm-task .crm-tick:hover { background: var(--green-pale); border-color: var(--green-solid); }
.crm-due { font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.crm-task.is-overdue { border-color: color-mix(in srgb, var(--red) 45%, var(--line)); box-shadow: inset 4px 0 0 var(--red); }
.crm-task.is-overdue .crm-due { color: var(--red); }

@media (max-width: 900px) { .crm-split { grid-template-columns: 1fr; } .crm-facts .wide { grid-column: auto; } }
@media (max-width: 520px) { .crm-act { grid-template-columns: 1fr; } .crm-task { grid-template-columns: auto 1fr; }
  .crm-task .crm-due { grid-column: 2; } }

/* UNIT-012: landing page (open leads, CRM strip, tasks, section cards) */
.hero { gap: 22px; }
.hero-head { display: grid; gap: 12px; }
.home-sec { display: grid; gap: 14px; }
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.sec-title { font: 400 clamp(28px, 3.4vw, 38px)/1 var(--disp); letter-spacing: .03em; color: var(--ink); }
.sec-more { font-weight: 600; font-size: 14px; color: var(--ink); text-decoration: underline; text-decoration-color: var(--neon-d); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.sec-more:hover { text-decoration-color: var(--ink); }
.leads { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.lead-card { background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--neon); border-radius: 18px;
  padding: 16px 20px 18px; display: grid; grid-template-rows: auto auto 1fr auto; gap: 8px; min-width: 0; }
.lead-card.is-soon { border-top-color: var(--red); }
.lead-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 10px; }
.lead-due { font: 400 16px var(--disp); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.lead-left { font: 700 11px var(--body); letter-spacing: .08em; text-transform: uppercase; padding: 3px 10px; border-radius: 20px;
  background: var(--ink); color: var(--neon); white-space: nowrap; }
.lead-card.is-soon .lead-left { background: var(--red-bg); color: var(--red); }
.lead-title { font: 700 17px/1.3 var(--body); color: var(--ink); overflow-wrap: anywhere; }
.lead-buyer { margin: 0; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.lead-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px;
  padding-top: 12px; border-top: 1px solid var(--line); }
.lead-value { font: 400 28px/1 var(--disp); letter-spacing: .03em; color: var(--ink); }
.lead-value.is-none { font: 600 14px var(--body); color: var(--muted); }
.lead-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.lead-notice { color: var(--ink); font-weight: 600; font-size: 14px; text-decoration: underline; text-decoration-color: var(--neon-d); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.lead-actions .crm-link { margin: 0; }
.add-crm { margin: 0; }
.add-crm button { font: 400 15px var(--disp); letter-spacing: .06em; cursor: pointer; padding: 6px 14px; border-radius: var(--radius-pill);
  border: 1px solid var(--ink); background: var(--paper); color: var(--ink); white-space: nowrap; }
.add-crm button:hover { background: var(--ink); color: var(--neon); }
td .add-crm { margin-top: 8px; }
.home-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 280px); gap: 18px; align-items: stretch; }
.home-panel { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: clamp(16px, 2.4vw, 24px);
  display: grid; gap: 14px; min-width: 0; }
.strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.strip-stage { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--cream); border-top: 4px solid var(--line); min-width: 0; }
.strip-qualified { border-top-color: var(--green-pale); } .strip-bidding { border-top-color: var(--green-solid); }
.strip-submitted { border-top-color: var(--neon); } .strip-won { border-top-color: var(--neon-d); } .strip-lost { border-top-color: var(--red); }
.strip-name { font: 400 15px var(--disp); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.strip-stage b { font: 400 40px/.95 var(--disp); color: var(--ink); }
.strip-sum { font-size: 13px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tasks-card { display: grid; align-content: space-between; gap: 6px; padding: 22px 24px; border-radius: 18px; text-decoration: none;
  color: #fff; background: radial-gradient(90% 120% at 90% 0%, rgba(195,245,60,.16), transparent 60%), linear-gradient(160deg, #16240f, #0a0d08);
  transition: transform .15s, box-shadow .15s; }
.tasks-card:hover { transform: translateY(-1px); box-shadow: 0 14px 30px -16px rgba(10,13,8,.7); }
.tasks-card .eyebrow { color: var(--neon); }
.tasks-n { font: 400 96px/.8 var(--disp); color: var(--neon); text-shadow: 0 0 28px rgba(195,245,60,.3); }
.tasks-over { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.6); }
.tasks-card.has-overdue .tasks-over { color: #ff9a85; }
.card { transition: border-color .15s, transform .15s; }
.card:hover { border-color: var(--ink); transform: translateY(-1px); }
.map { height: 70vh; min-height: 420px; border-radius: var(--radius); }
/* the global neon ring is too faint on paper/cream (WCAG 1.4.11): ink ring on the light surfaces */
.home-sec :focus-visible, .home-panel :focus-visible, .tasks-card:focus-visible, .add-crm button:focus-visible,
  table.kk :focus-visible, .crm-link:focus-visible { outline-color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .card, .tasks-card { transition: none; } .card:hover, .tasks-card:hover { transform: none; } }

@media (max-width: 900px) { .home-row { grid-template-columns: 1fr; } .strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* UNIT-013: settings (job schedule cards) */
.sched-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 16px; }
.sched-card { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 22px; display: grid;
  gap: 12px; align-content: start; min-width: 0; }
.sched-card h2 { font: 400 28px var(--disp); letter-spacing: .02em; color: var(--ink); }
.sched-status, .sched-note, .sched-err { margin: 0; font-size: 13px; }
.sched-status { color: var(--muted); }
.sched-note { font-weight: 600; color: var(--neon-d); }
.sched-err { font-weight: 600; color: var(--red); }
.sched-card summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.sched-card pre { margin: 6px 0 0; padding: 10px; border-radius: 10px; background: var(--cream); font-size: 12px;
  white-space: pre-wrap; overflow-wrap: anywhere; max-height: 240px; overflow-y: auto; }
.sched-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 12px; align-items: end; }
.sched-form:has(select[name=every] option[value=daily]:checked) .sched-weekday { display: none; }
.pill-ok { background: var(--green-pale); color: var(--ink); }
.pill-running { background: var(--neon); color: var(--ink); border-color: var(--neon-d); }
.pill-failed { background: var(--red-bg); color: var(--red); border-color: var(--red); }

/* UNIT-012: phones (360-430px). Header: logo + sign-out, nav scrolls sideways; tables stack into labelled cards. */
@media (max-width: 700px) {
  body { font-size: 15px; }
  .top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 10px 16px 0; }
  .brand img { height: 24px; }
  .top nav { grid-column: 1 / -1; order: 3; flex-wrap: nowrap; overflow-x: auto; gap: 2px; margin: 0 -16px;
    padding: 0 16px 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .top nav::-webkit-scrollbar { display: none; }
  .top nav a { flex: none; white-space: nowrap; padding: 10px 14px; font-size: 18px; }
  .who span { display: none; }
  .who button { min-height: 44px; padding: 8px 16px; font-size: 13px; }
  .page { padding: 20px 16px 48px; gap: 16px; }
  .title { font-size: 44px; overflow-wrap: anywhere; }
  .filters { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 2px 16px; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .chip { flex: none; white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center; }
  .crm-sub { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .crm-sub .filters { margin: 0 -16px; }
  .crm-sub .crm-btn { width: 100%; }
  .crm-btn { min-height: 44px; justify-content: center; }
  .band-ink { border-radius: 18px; padding: 22px 20px; }
  .giant { font-size: 104px; }
  .rail { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 12px; }
  .rail .r { border-right: 0; margin: 0; padding: 0; }
  .rv { font-size: 32px; }
  .cards { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card { padding: 16px; border-radius: 16px; }
  .card h3 { font-size: 24px; }
  .card p { font-size: 13px; }
  .tasks-n { font-size: 80px; }
  .lead-foot { display: grid; }
  .lead-actions { justify-content: space-between; }
  .add-crm button, .lead-notice { min-height: 44px; display: inline-flex; align-items: center; }
  .add-crm button { padding: 8px 18px; font-size: 17px; }

  /* tables -> stacked cards: one row per card, each cell "label: value" from data-label */
  .grid { background: transparent; border: 0; border-radius: 0; overflow: visible; }
  table.kk, table.kk tbody, table.kk tr, table.kk td { display: block; width: 100%; }
  table.kk thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.kk tr { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 10px 16px; margin-bottom: 12px; }
  table.kk tr.err { background: var(--red-bg); }
  table.kk tr.err td { background: transparent; }
  table.kk td, table.kk tr:last-child td { position: relative; padding: 7px 0 7px calc(8.5em + 10px); min-height: 2.4em;
    border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
  table.kk tr td:last-child { border-bottom: 0; }
  table.kk td::before { content: attr(data-label); position: absolute; left: 0; top: 7px; width: 8.5em;
    font: 400 14px/1.6 var(--disp); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
  table.kk td.wide { min-width: 0; max-width: none; }
  table.kk td a { display: inline-flex; align-items: center; min-height: 44px; margin: -10px 0; }
  table.kk tr td.m-top { order: -1; padding: 4px 0 10px; font-weight: 700; font-size: 16px; line-height: 1.35; color: var(--ink); }
  table.kk td.m-top::before { display: none; }
  table.kk td.m-hide { display: none; }
  table.kk td.act { padding: 12px 0 4px; }
  table.kk td.act::before { display: none; }
  .sec-more, .crm-hint a { display: inline-flex; align-items: center; min-height: 44px; }
  .brand { min-height: 44px; }
  .crm-check { min-height: 44px; }
  .crm-check input { width: 22px; height: 22px; }

  /* forms: full width, 44px tap targets */
  .triage { min-width: 0; }
  .triage select, .triage textarea { min-height: 44px; font-size: 16px; }
  .triage button { justify-self: stretch; min-height: 44px; font-size: 17px; }
  td .add-crm button { width: 100%; justify-content: center; }
  .crm-grid { grid-template-columns: 1fr; }
  .crm-field input, .crm-field select, .crm-field textarea, .crm-search input[type=search] { min-height: 44px; font-size: 16px; }
  .crm-actions .crm-btn { flex: 1; }
  .crm-tick { min-height: 44px; }
  .crm-task .crm-tick { width: 44px; height: 44px; }
  .crm-search .crm-btn { flex: 1; }

  /* pipeline board: columns swipe sideways, one column plus a peek of the next */
  .crm-board { grid-auto-columns: 84%; margin: 0 -16px; padding: 0 16px 8px; scroll-snap-type: x mandatory; scroll-padding: 0 16px; }

  .sched-card { padding: 16px; }
  .sched-card select, .sched-card input[type=time], .sched-card button, .sched-card summary { min-height: 44px; font-size: 16px; }
  .sched-card summary { display: flex; align-items: center; }
  .sched-card .crm-btn { width: 100%; justify-content: center; }

  .map { height: calc(100svh - 190px); min-height: 360px; margin: 0 -16px; border-radius: 0; }
}
