/* Company Console HQ — a dark desk for a laptop. */
:root {
  --bg: #0e1013; --panel: #161a20; --panel-2: #1c2129; --line: #262c36; --line-2: #313a47;
  --text: #e6e9ee; --muted: #8b95a5; --dim: #5e6878;
  --accent: #f5a524; --accent-2: #ffc35c; --accent-ink: #1a1200;
  --ok: #34c77b; --warn: #f5a524; --bad: #ef5a5a; --info: #5ea6ff;
  --font: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --radius: 6px; --sidebar: 224px;
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 var(--font); }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
button.as-link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-2); cursor: pointer; }
button.as-link:hover { text-decoration: underline; }
h1, h2, h3 { font-weight: 600; letter-spacing: -.01em; margin: 0 0 .5rem; }
h1 { font-size: 22px; } h2 { font-size: 16px; color: var(--text); } h3 { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
p { margin: 0 0 .75rem; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }

/* shell */
.shell { display: flex; min-height: 100vh; }
.side { width: var(--sidebar); flex: 0 0 var(--sidebar); background: #0b0d10; border-right: 1px solid var(--line); padding: 18px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.brand .mark { width: 28px; height: 28px; border-radius: 7px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; font-family: var(--mono); }
.brand .name { font-weight: 600; line-height: 1.1; }
.brand .name small { display: block; color: var(--dim); font-weight: 400; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius); color: var(--muted); }
.nav a:hover { background: var(--panel); color: var(--text); text-decoration: none; }
.nav a.on { background: var(--panel-2); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
.nav a .badge { margin-left: auto; }
.nav .sep { height: 1px; background: var(--line); margin: 10px 8px; }
.side .who { margin-top: auto; padding: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 8px; }
.side .who b { color: var(--text); display: block; font-weight: 600; }
.side .who form { margin-left: auto; }
.main { flex: 1; min-width: 0; padding: 26px 32px 60px; }
.topbar { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.topbar h1 { margin: 0; }
.topbar .sub { color: var(--muted); }
.topbar .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }

/* bits */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); font: inherit; cursor: pointer; line-height: 1.2; white-space: nowrap; }
.btn:hover { border-color: var(--dim); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.primary:hover { background: var(--accent-2); }
.btn.danger { color: var(--bad); }
.btn.small { padding: 4px 8px; font-size: 12.5px; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); border-color: var(--line-2); }
.badge { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--panel-2); color: var(--muted); border: 1px solid var(--line-2); line-height: 1.5; }
.badge.ok { color: var(--ok); border-color: rgba(52,199,123,.35); background: rgba(52,199,123,.08); }
.badge.bad { color: var(--bad); border-color: rgba(239,90,90,.35); background: rgba(239,90,90,.08); }
.badge.warn { color: var(--warn); border-color: rgba(245,165,36,.4); background: rgba(245,165,36,.08); }
.badge.info { color: var(--info); border-color: rgba(94,166,255,.4); background: rgba(94,166,255,.08); }
.badge.accent { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.muted { color: var(--muted); } .dim { color: var(--dim); } .ok { color: var(--ok); } .bad { color: var(--bad); } .warn { color: var(--warn); }
.small { font-size: 12.5px; }
.right { text-align: right; }
.flash { background: rgba(245,165,36,.1); border: 1px solid rgba(245,165,36,.4); color: var(--accent-2); padding: 10px 14px; border-radius: var(--radius); margin-bottom: 16px; }

/* layout */
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; }
.panel > h2, .panel > h3 { margin-bottom: 10px; }
.panel .head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.panel .head .right { margin-left: auto; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; }
.stat .label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.stat .value { font-family: var(--mono); font-size: 26px; font-weight: 600; margin-top: 4px; letter-spacing: -.02em; }
.stat .value.bad { color: var(--bad); } .stat .value.ok { color: var(--ok); } .stat .value.accent { color: var(--accent-2); }
.stat .note { color: var(--dim); font-size: 12px; margin-top: 2px; }

/* tables */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
tr.dimmed td { color: var(--dim); }
.table-wrap { overflow-x: auto; }

/* forms */
label { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
input[type=text], input[type=search], input[type=email], input[type=password], input[type=number], input[type=date], input[type=month], input[type=url], select, textarea {
  width: 100%; background: #0f1216; color: var(--text); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 7px 9px; font: inherit; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(245,165,36,.15); }
textarea { min-height: 80px; resize: vertical; }
.field { margin-bottom: 10px; }
.row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.row .field { flex: 1 1 140px; margin-bottom: 0; }
.row .field.narrow { flex: 0 1 110px; }
.row .field.wide { flex: 2 1 240px; }
.inline { display: inline; }
.check { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 13.5px; }
.check input { width: auto; }
.deal-form [hidden] { display: none !important; }
.module-pick .checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px 14px; margin: 8px 0 6px; }
form.stack .row { margin-bottom: 10px; }
details { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; margin-bottom: 10px; background: var(--panel); }
details summary { cursor: pointer; color: var(--muted); font-weight: 500; }
details[open] summary { margin-bottom: 10px; color: var(--text); }

/* board */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.col { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px; min-height: 200px; }
.col h3 { display: flex; align-items: center; gap: 8px; margin: 2px 4px 10px; }
.col h3 .count { margin-left: auto; font-family: var(--mono); color: var(--dim); }
.col .total { color: var(--dim); font-size: 12px; margin: -6px 4px 10px; font-family: var(--mono); }
.card { background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 9px 10px; margin-bottom: 8px; display: block; color: var(--text); }
.card:hover { border-color: var(--dim); text-decoration: none; }
.card .t { font-weight: 600; }
.card .m { color: var(--muted); font-size: 12px; margin-top: 3px; display: flex; gap: 8px; flex-wrap: wrap; }
.card .m .v { font-family: var(--mono); color: var(--accent-2); }
.card .stale { color: var(--warn); }
.card select { margin-top: 6px; font-size: 12px; padding: 4px 6px; }

/* progress */
.bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); }
.bar.ok i { background: var(--ok); }

/* timeline */
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { display: grid; grid-template-columns: 74px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.tl li:last-child { border-bottom: 0; }
.tl .k { color: var(--dim); font-size: 12px; font-family: var(--mono); }
.tl .who { color: var(--dim); font-size: 12px; }
.tl .due { color: var(--warn); font-size: 12px; }
.tl .done { color: var(--ok); font-size: 12px; }

/* checklist */
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; border-bottom: 1px solid var(--line); }
.steps li:last-child { border-bottom: 0; }
.steps li.done .t { color: var(--dim); text-decoration: line-through; }
.steps .h { color: var(--dim); font-size: 12px; }
.steps form { margin-top: 2px; }
.steps button.tick { width: 18px; height: 18px; border-radius: 4px; border: 1px solid var(--line-2); background: #0f1216; cursor: pointer; color: var(--ok); font-size: 12px; line-height: 1; padding: 0; }
.steps li.done button.tick { background: rgba(52,199,123,.15); border-color: var(--ok); }
.phase { margin: 12px 0 4px; }

/* tabs within a page */
.subnav { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.subnav a { padding: 8px 12px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.subnav a.on, .subnav a:hover { color: var(--text); border-color: var(--accent); text-decoration: none; }
/* a page's own pick between two views (Sales → Website funnel: Company Console | GPS trackers) */
.pick { display: flex; gap: 6px; flex-wrap: wrap; margin: -6px 0 14px; }
/* the website funnel: a campaign's ads, one line each, under its row (hq/funnel.py _by_ad) */
table.funnel tr.ad td { padding-top: 5px; padding-bottom: 5px; }
table.funnel tr.ad td:first-child { padding-left: 26px; color: var(--muted); overflow-wrap: anywhere; min-width: 9em; }
/* Curro practice's fifteen columns: closer together, so the last one is on the screen of a computer */
table.funnel.wide th, table.funnel.wide td { padding-left: 5px; padding-right: 5px; }
table.funnel.wide tr.ad td:first-child { padding-left: 18px; min-width: 7em; }
table.funnel.wide th { letter-spacing: 0; }
/* the funnel's Ad column: a row a kept ad matches has its name as a link to the ad, and Landing page's Open
   (routes/funnel.py _linked): a comfortable tap that leaves the row's height alone */
table.funnel a.ad-open { display: inline-block; padding: 8px 14px 8px 0; margin: -8px 0; }
/* Sales → Product tests: figures and the funnel stay on one line each, the words get room; the table scrolls in its panel */
table.tests td.num, table.tests td.flow, table.tests th { white-space: nowrap; }
table.tests td.words { min-width: 13em; }
/* a product's ads (hq/product_test_ads.py): the row's "Ads (N)", and on its page one line an ad with its two links, each
   a comfortable tap on a phone */
table.tests a.ads-link { display: inline-block; padding: 8px 12px 8px 0; font-size: 12.5px; }
ul.ads li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
ul.ads .ad-name { flex: 1 1 12em; min-width: 0; overflow-wrap: anywhere; font-weight: 500; }
ul.ads .ad-links { display: flex; gap: 8px; flex-wrap: wrap; }
ul.ads a.tap { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius); white-space: nowrap; }
ul.ads details { flex: 1 1 100%; margin-bottom: 0; }
ul.ads details.ad-text p { margin: 0; overflow-wrap: anywhere; }
ul.ads details.ad-edit:not([open]), ul.ads details.ad-text:not([open]) { border: 0; padding: 0; background: none; }
ul.ads details:not([open]) > summary { display: inline-block; padding: 6px 12px 6px 0; font-size: 12.5px; font-weight: 400; }
li.ad-off { display: flex; align-items: center; gap: 12px; justify-content: space-between; }

/* login */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(1200px 600px at 20% -10%, rgba(245,165,36,.12), transparent 60%), var(--bg); }
.gate .box { width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 26px 26px 22px; }
.gate .brand { padding: 0 0 18px; }
.gate .err { color: var(--bad); margin-bottom: 10px; }
.gate .foot { color: var(--dim); font-size: 12px; margin-top: 14px; }

kbd.key { font-family: var(--mono); background: var(--panel-2); border: 1px solid var(--line-2); padding: 1px 6px; border-radius: 4px; font-size: 12px; }
.empty { color: var(--dim); padding: 14px 0; }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.list-plain li:last-child { border-bottom: 0; }

@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .side { width: auto; flex: none; height: auto; position: static; padding: 10px 12px; }
  .side .nav { display: flex; flex-wrap: wrap; gap: 2px; }
  .side .nav .sep { display: none; }
  .side .who { margin-top: 8px; }
  .main { padding: 16px; }
  .cols-2, .cols-3, .cols-4, .cols-5 { grid-template-columns: minmax(0, 1fr); }
  .panel > table { display: block; overflow-x: auto; }   /* a wide table scrolls inside its panel, never the page */
  .span-2 { grid-column: auto; }
  .topbar, .topbar .right { flex-wrap: wrap; }
  .topbar .right { margin-left: 0; }
  .topbar .right select { max-width: 100%; }
}

/* a lead's / customer's demo panel: each visit's pages, tight (hq/templates/demo/_panel.html) */
.demo-panel details.demo-visit { padding: 6px 10px; margin-bottom: 8px; }
.demo-panel table.small td { padding: 4px 8px; }

/* discovery: the answers by person and by question */
.disc-qa { margin: 0; }
.disc-qa dt { color: var(--muted); font-size: 12px; margin-top: 10px; }
.disc-qa dd { margin: 2px 0 0; white-space: pre-wrap; }
.disc-question { margin-bottom: 16px; }
.disc-side { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.disc-cell { background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 10px 12px; white-space: pre-wrap; }
.disc-cell .who { font-size: 12px; margin-bottom: 4px; white-space: normal; }
/* plan: the owner's goals and steps (hq/plan.py) */
.pl-two { display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-start; }
.pl-two > .pl-main { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.pl-two > .pl-side { flex: 1 1 300px; max-width: 400px; display: flex; flex-direction: column; gap: 16px; }
.pl-sec h2 { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.pl-sec h2 .count { font-family: var(--mono); color: var(--muted); font-size: 12.5px; font-weight: 400; }
.pl-sec h2 .hint { color: var(--muted); font-size: 12.5px; font-weight: 400; }
.pl-step { display: flex; flex-wrap: wrap; gap: 12px 14px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; }
.pl-step.crit { border-color: var(--accent); }
.pl-step .what { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pl-step .t { font-weight: 600; font-size: 15px; color: var(--text); }
.pl-step .n { font-size: 13px; color: #aab3c0; }
.pl-step .n b { color: var(--text); font-weight: 500; }
.pl-step .when { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.pl-step .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.pl-step .acts .btn { min-height: 40px; }
.pl-goal { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.pl-chip { font-size: 12px; font-weight: 600; color: #aab3c0; border: 1px solid var(--line-2); border-radius: 999px; padding: 1px 9px; white-space: nowrap; }
.pl-chip.crit { color: var(--accent-2); border-color: rgba(245,165,36,.5); background: rgba(245,165,36,.1); }
.pl-chip.late { color: #ffb3b3; border-color: rgba(239,90,90,.5); background: rgba(239,90,90,.1); }
.pl-later { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 10px 14px; border: 1px dashed var(--line-2); border-radius: 8px; color: #aab3c0; margin-bottom: 8px; }
.pl-later a { color: var(--text); font-weight: 600; }
.pl-wait { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line-2); margin-bottom: 8px; }
.pl-wait a.t { color: var(--text); font-weight: 600; }
.pl-wait.due { background: #2a1618; border-color: var(--bad); }
.pl-wait.due .w { color: #ffb3b3; }
.pl-wait .w { font-size: 12.5px; color: var(--muted); }
.pl-wait form { display: inline; }
.pl-goalsum { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.pl-goalsum:last-child { margin-bottom: 0; }
.pl-goalsum .top { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--muted); }
.pl-goalsum .why { font-size: 12px; color: var(--muted); }
.pl-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 18px; }
.pl-add input[type=text] { flex: 1 1 300px; min-width: 0; width: auto; padding: 10px 12px; }
.pl-add select { flex: 0 1 280px; width: auto; padding: 10px 12px; }
.pl-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.pl-seg label { display: inline-flex; margin: 0; }
.pl-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pl-seg span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); font-size: 13.5px; cursor: pointer; }
.pl-seg input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.pl-seg input:focus-visible + span { box-shadow: 0 0 0 3px rgba(245,165,36,.35); }
.pl-box { background: var(--panel); border: 1px solid var(--line-2); border-radius: 8px; padding: 12px 14px; }
.pl-deps { max-height: 260px; overflow-y: auto; border: 1px solid var(--line-2); border-radius: var(--radius); padding: 6px 10px; background: #0f1216; }
.pl-deps .gname { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; margin: 8px 0 2px; }
.pl-deps .check { min-height: 32px; }
.pl-math dt { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 10px; }
.pl-math dt:first-child { margin-top: 0; }
.pl-math dd { margin: 2px 0 0; }
.pl-form [hidden] { display: none !important; }
/* the Gantt chart */
.gantt-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.gantt { --gl: 280px; position: relative; padding-bottom: 8px; }
.gantt .grid-line { position: absolute; top: 0; bottom: 0; width: 1px; background: #1c2129; pointer-events: none; }
.gantt .grid-line.jan { background: #3a4250; }
.gantt .today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--bad); z-index: 2; pointer-events: none; }
.gantt .g-head { position: relative; height: 46px; border-bottom: 1px solid var(--line-2); }
.gantt .g-head span { position: absolute; font-size: 12px; color: var(--muted); }
.gantt .g-head .yr { top: 6px; color: var(--text); font-weight: 600; }
.gantt .g-head .mo { top: 24px; }
.gantt .g-row { position: relative; display: flex; height: 40px; border-top: 1px solid #1c2129; }
.gantt .g-lane { position: relative; display: flex; height: 34px; align-items: flex-end; border-top: 1px solid var(--line-2); }
.gantt .g-label { position: sticky; left: 0; z-index: 3; flex: 0 0 var(--gl); width: var(--gl); padding: 3px 12px 0 12px; background: var(--panel); border-right: 1px solid var(--line); overflow: hidden; }
.gantt .g-lane .g-label { padding-bottom: 6px; }
.gantt .g-label .t { display: block; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.gantt .g-label .s { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gantt .g-track { position: relative; flex: 0 0 auto; }
.gantt .bar { position: absolute; top: 9px; height: 22px; border-radius: 5px; display: block; }
.gantt .bar.crit { box-shadow: 0 0 0 2px var(--accent); }
.gantt .bar.done { opacity: .35; }
.gantt .bar.notready { opacity: .55; }
.gantt .dia { position: absolute; top: 13px; width: 13px; height: 13px; transform: rotate(45deg); margin-left: -6px; }
.gantt .lane-mark { position: absolute; bottom: 8px; font-size: 11.5px; white-space: nowrap; }
.gantt .lane-mark .dia { position: static; display: inline-block; margin: 0 6px 0 0; vertical-align: -1px; width: 10px; height: 10px; }
.gantt-key { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12.5px; color: #aab3c0; margin: 10px 0 0; }
.gantt-key span { display: inline-flex; align-items: center; gap: 6px; }
.gantt-key i { display: inline-block; width: 24px; height: 11px; border-radius: 3px; background: var(--info); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 700px) { .gantt { --gl: 132px; } .gantt .g-label .s { display: none; } .gantt .g-row { height: 36px; } .gantt .g-label { padding-top: 4px; } .gantt .g-label .t { font-size: 12px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.2; } }

/* the menu's six areas and each area's tabs (the HQ cleanup, 2026-10-22) */
.side .find { margin: 0 0 12px; }
.side .find input { width: 100%; }
.areatabs { margin-top: -6px; }
.areatabs .was { color: var(--muted); font-size: 11px; opacity: .75; margin-left: 4px; }
@media (max-width: 900px) { .side .find { margin: 8px 0; } }

/* a customer's page in tabs, with what matters at a glance on top (the HQ cleanup, 2026-10-22) */
.glance { margin-bottom: 14px; }
.fb-answer { padding: 8px 0; border-bottom: 1px solid var(--line); }
.fb-answer:last-child { border-bottom: 0; }
.fb-answer > div { margin-top: 3px; overflow-wrap: anywhere; white-space: pre-line; }
.fb-answer .row { white-space: normal; }
.glance .value { font-size: 20px; }
.glance .note { overflow: hidden; text-overflow: ellipsis; }
section.ctab { margin-bottom: 16px; }
.ctabs-on section.ctab:not(.on) { display: none; }
table.facts td:first-child { color: var(--muted); white-space: nowrap; padding-right: 12px; }
details > summary.btn { display: inline-flex; list-style: none; }
details > summary.btn::-webkit-details-marker { display: none; }
/* Settings in tabs, with real switches (the HQ cleanup, 2026-10-22) */
section.ctab, section.ctab-more { margin-bottom: 16px; }
.ctabs-on section.ctab:not(.on), .ctabs-on section.ctab-more:not(.on) { display: none; }
.switch input[type=checkbox] { width: 18px; height: 18px; vertical-align: -3px; accent-color: var(--accent); }
details.advanced { margin-top: 10px; }

/* a table that reads as one card per row on a phone (Security's duties and register) */
@media (max-width: 640px) {
  table.cards-sm, table.cards-sm tbody, table.cards-sm tr, table.cards-sm td { display: block; width: auto; }
  table.cards-sm tr:first-child { display: none; }
  table.cards-sm tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  table.cards-sm td { border: 0; padding: 2px 0; }
  table.cards-sm .sm-only { display: inline; }
}
.sm-only { display: none; }
/* Sales → Website funnel → Live challenges (hq/templates/funnel/challenges.html) */
.challenge-item summary { overflow-wrap: anywhere; }
.challenge-words { margin: 8px 0 0; padding-left: 20px; }
.challenge-words li { margin: 4px 0; overflow-wrap: anywhere; }
/* Sales → Curro app (hq/templates/curro_app): a reported answer and a script, as plain text that wraps */
.curro-answer { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; margin: 6px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; }
.curro-report { padding: 10px 0; border-bottom: 1px solid var(--line); }
.curro-report p { margin: 4px 0; overflow-wrap: anywhere; }

/* Sales → Leads home (hq/leads_home.py): one column, also drawn without the shell inside the owner's CRM */
.lh-plain { max-width: 1000px; margin: 0 auto; padding: 16px; }
.lh { max-width: 960px; display: flex; flex-direction: column; gap: 18px; }
.lh .topbar { margin-bottom: 0; }
.lh-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; position: relative; }
.lh-head h2 { margin: 0; }
.lh-q > summary { list-style: none; cursor: pointer; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-2); color: var(--muted); display: grid; place-items: center; font-size: 12px; }
.lh-q > summary::-webkit-details-marker { display: none; }
.lh-q[open] { flex: 1 1 100%; order: 9; }
.lh-q[open] > summary { margin-bottom: 6px; }
.lh-q p { color: var(--muted); font-size: 13px; margin: 0; max-width: 70ch; }
.lh-need { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.lh-lead { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; min-width: 0; }
.lh-lead > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.lh-lead b, .lh-lead .small { display: block; }
.lh-seg { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.lh-seg a { border: 1px solid var(--line-2); border-radius: 999px; padding: 5px 12px; font-size: 13px; color: var(--muted); }
.lh-seg a.on { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); font-weight: 600; }
.lh-seg a:hover { text-decoration: none; border-color: var(--dim); }
.lh-step { display: grid; grid-template-columns: 150px minmax(0, 1fr) 72px 84px; gap: 12px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); }
.lh-step:first-child { border-top: 0; }
.lh-track { height: 18px; background: var(--panel-2); border-radius: 4px; overflow: hidden; }
.lh-track i { display: block; height: 100%; background: var(--info); border-radius: 4px; }
.lh-n { text-align: right; font-weight: 600; }
.lh-lost { font-size: 12px; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.lh-lost.big { color: var(--bad); font-weight: 600; }
.lh-money { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.lh-money span { display: block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.lh-money b { font-size: 18px; }
.lh-problem { margin: 10px 0 0; }
#lh-table td, #lh-table th { white-space: nowrap; }
#lh-table td:first-child { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
details.lh-q { border: 0; padding: 0; background: none; margin: 0; }
.lh-days { margin-left: 0; }
.lh-seg + .lh-days { padding-left: 10px; border-left: 1px solid var(--line-2); }
/* the drop-off chart alone, with no sign-in, inside the CRM's own page (leads/embed.html): light ink on whatever
   the CRM draws behind it, no margins of its own */
html.lh-embed { color-scheme: light; background: transparent;
  --bg: transparent; --panel: #ffffff; --panel-2: #eceff3; --line: #e3e7ec; --line-2: #c9d0d9;
  --text: #1b2330; --muted: #5b6676; --dim: #7c8796; --accent: #1b2330; --accent-ink: #ffffff; --bad: #c62828; --info: #2f6fd0; }
html.lh-embed body { background: transparent; }
html.lh-embed main { padding: 0; margin: 0; min-width: 0; }
@media (max-width: 640px) {
  .lh-need { grid-template-columns: 1fr; }
  .lh-step { grid-template-columns: 104px minmax(0, 1fr) 52px 66px; gap: 8px; }
  .lh-seg { margin-left: 0; }
  .lh-seg + .lh-days { padding-left: 0; border-left: 0; flex-basis: 100%; }
  .lh-money { gap: 14px 20px; }
}
