/* ==========================================================================
   zeeroleekz dashboard — same tokens as the marketing site, denser layout
   ========================================================================== */

:root{
  --bg:#F7FBFF;
  --surface:#FFFFFF;
  --ink:#0A0D12;
  --body:#344054;
  --soft:#475467;
  --muted:#667085;
  --line:rgba(10,13,18,.10);
  --line-strong:rgba(10,13,18,.16);
  --tint:#E8F7FF;
  --accent:#0099FF;
  --accent-deep:#0B5E7E;

  --hot:#B42318;    --hot-bg:#FEF3F2;
  --warm:#B54708;   --warm-bg:#FFFAEB;
  --good:#067647;   --good-bg:#ECFDF3;
  --cool:#475467;   --cool-bg:#F2F4F7;

  --shadow:0 16px 40px rgba(2,40,60,.08);
  --shadow-lg:0 28px 70px rgba(2,40,60,.16);
  --r-pill:999px; --r-lg:20px; --r-md:14px; --r-sm:10px;
  --font:"Noto Sans","Helvetica Neue",Helvetica,Arial,sans-serif;
}

*,*::before,*::after{box-sizing:border-box}

/* Any rule that sets `display` outranks the UA's [hidden]{display:none},
   which would otherwise leave the sign-in card and the drawer permanently
   on screen. */
[hidden]{display:none !important}

body{
  margin:0;background:var(--bg);color:var(--body);
  font-family:var(--font);font-size:14px;line-height:1.55;
  -webkit-font-smoothing:antialiased;
}

h1,h2,h3{color:var(--ink);font-weight:800;margin:0;letter-spacing:-.02em}
h1{font-size:22px}
h2{font-size:18px}
h3{font-size:13px;text-transform:uppercase;letter-spacing:.1em;color:var(--accent-deep)}
p{margin:0}
a{color:var(--accent-deep)}
.muted{color:var(--muted);font-size:13px}
button{font:inherit;cursor:pointer}
table{border-collapse:collapse;width:100%}

/* ------------------------------------------------------------- topbar -- */

.topbar{
  position:sticky;top:0;z-index:20;background:rgba(247,251,255,.94);
  backdrop-filter:blur(12px);border-bottom:1px solid var(--line);
}
.topbar__inner{
  max-width:1280px;margin:0 auto;padding:0 20px;height:62px;
  display:flex;align-items:center;gap:14px;
}
.topbar__actions{margin-left:auto;display:flex;align-items:center;gap:12px}

.brand{display:flex;align-items:center;flex:none}
/* the logo PNG has the artwork in a 1116x194 band; crop in CSS */
.logo{--logo-h:26px;--k:calc(var(--logo-h)/194);
  display:block;position:relative;overflow:hidden;
  width:calc(1116*var(--k));height:var(--logo-h)}
.logo img{position:absolute;width:calc(1536*var(--k));max-width:none;height:auto;
  left:calc(-206*var(--k));top:calc(-379*var(--k))}

.tenant{font-weight:800;color:var(--ink);font-size:14px;letter-spacing:-.01em}

.lang{display:inline-flex;padding:3px;border-radius:var(--r-pill);background:var(--tint);gap:2px}
.lang button{padding:5px 11px;border:0;background:none;border-radius:var(--r-pill);
  font-size:11px;font-weight:800;letter-spacing:.05em;color:var(--accent-deep)}
.lang button[aria-pressed="true"]{background:var(--surface);color:var(--ink)}

/* ------------------------------------------------------------ buttons -- */

.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  padding:9px 16px;border-radius:var(--r-pill);border:0;
  font-size:13px;font-weight:700;line-height:1;white-space:nowrap;
  transition:background-color .15s ease,border-color .15s ease,transform .15s ease;
}
.btn:active{transform:translateY(1px)}
.btn--primary{background:var(--ink);color:#fff}
.btn--primary:hover{background:#000}
.btn--ghost{background:var(--surface);color:var(--ink);border:1px solid var(--line)}
.btn--ghost:hover{border-color:var(--line-strong)}
.btn--block{width:100%;padding:13px 16px;font-size:14px}
.btn:disabled{opacity:.55;cursor:default}

.iconbtn{background:none;border:0;font-size:16px;color:var(--muted);padding:6px;
  border-radius:var(--r-sm)}
.iconbtn:hover{background:var(--tint);color:var(--ink)}

/* ------------------------------------------------------------- layout -- */

main{max-width:1280px;margin:0 auto;padding:24px 20px 80px}

.card{
  background:var(--surface);border:1px solid var(--line);
  border-radius:var(--r-lg);box-shadow:var(--shadow);padding:24px;
}

.loading,.signin{display:grid;place-items:center;min-height:50vh}
.signin__card{width:100%;max-width:380px}
.signin__card h1{margin-bottom:8px}
.signin__card label{display:block;margin:20px 0 6px;font-size:12px;font-weight:700;color:var(--soft)}
.signin__card input{
  width:100%;padding:12px 14px;border:1px solid var(--line);border-radius:var(--r-sm);
  background:var(--bg);font:inherit;color:var(--ink);
}
.signin__card input:focus{outline:none;border-color:var(--accent);
  box-shadow:0 0 0 4px rgba(0,153,255,.12);background:var(--surface)}
.signin__card .btn{margin-top:18px}

.status{margin-top:14px;font-size:13px;font-weight:600;min-height:1.2em}
.status.ok{color:var(--good)}
.status.err{color:var(--hot)}

/* --------------------------------------------------------------- kpis -- */

/* auto-fit, not a hard count. It was repeat(5,1fr) and a sixth tile was
   added for agent chats, which left one tile alone on a second row. Letting
   the grid choose means the next tile does not need a CSS change either. */
.kpis{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
  gap:12px;margin-bottom:20px;
}
@media (max-width:560px){.kpis{grid-template-columns:1fr}}

.kpi{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r-md);
  padding:16px 18px;
}
.kpi__label{font-size:11px;font-weight:800;letter-spacing:.09em;text-transform:uppercase;
  color:var(--muted)}
.kpi__value{margin-top:6px;font-size:28px;font-weight:800;letter-spacing:-.03em;
  color:var(--ink);line-height:1;font-variant-numeric:tabular-nums}
.kpi--alert{border-color:rgba(180,35,24,.35);background:var(--hot-bg)}
.kpi--alert .kpi__value{color:var(--hot)}

/* ------------------------------------------------------------ toolbar -- */

.toolbar{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin-bottom:14px}
.toolbar__right{margin-left:auto;display:flex;gap:10px;align-items:center}

.chips{display:flex;flex-wrap:wrap;gap:7px}
.chip{
  padding:7px 14px;border-radius:var(--r-pill);border:1px solid var(--line);
  background:var(--surface);font-size:12.5px;font-weight:700;color:var(--soft);
}
.chip:hover{border-color:var(--line-strong)}
.chip[aria-pressed="true"]{background:var(--ink);border-color:var(--ink);color:#fff}
.chip .n{opacity:.6;margin-left:5px;font-variant-numeric:tabular-nums}

.search{
  padding:9px 14px;border:1px solid var(--line);border-radius:var(--r-pill);
  background:var(--surface);font:inherit;font-size:13px;color:var(--ink);min-width:230px;
}
.search:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 4px rgba(0,153,255,.12)}

/* -------------------------------------------------------------- table -- */

.tablewrap{
  background:var(--surface);border:1px solid var(--line);
  border-radius:var(--r-lg);box-shadow:var(--shadow);overflow-x:auto;
}
.inbox th{
  text-align:left;font-size:11px;font-weight:800;letter-spacing:.09em;
  text-transform:uppercase;color:var(--muted);padding:14px 18px;
  border-bottom:1px solid var(--line);white-space:nowrap;
}
.inbox td{padding:14px 18px;border-bottom:1px solid var(--line);vertical-align:top}
.inbox tr:last-child td{border-bottom:0}
.inbox tbody tr{cursor:pointer}
.inbox tbody tr:hover{background:var(--tint)}

.who{font-weight:800;color:var(--ink);letter-spacing:-.01em}
.sub{font-size:12.5px;color:var(--muted);margin-top:2px}
.about{max-width:380px;font-size:13px;color:var(--soft)}
.nowrap{white-space:nowrap}
.num{font-variant-numeric:tabular-nums}

.empty{padding:42px;text-align:center;color:var(--muted)}

/* ------------------------------------------------------------ metrics -- */
.dash--metrics h2{margin:25px 0 12px;font-size:17px;letter-spacing:-.02em}
.metrics__filters label{display:grid;gap:5px;color:var(--muted);font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.05em}
.metrics__filters select{min-width:145px;padding:9px 30px 9px 12px;border:1px solid var(--line);border-radius:var(--r-pill);background:var(--surface);color:var(--ink);font:inherit;font-size:13px;text-transform:none;letter-spacing:normal}
.metrics__note{max-width:920px;margin:0 0 8px;font-size:13px}
.metric-friction{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:14px 18px}
.dash--metrics .playbook-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:10px}
@media(max-width:560px){.metrics__filters label,.metrics__filters select{width:100%}}

/* --------------------------------------------------------------- tags -- */

.tag{
  display:inline-block;padding:3px 9px;border-radius:var(--r-pill);
  font-size:11px;font-weight:800;letter-spacing:.01em;white-space:nowrap;
  background:var(--cool-bg);color:var(--cool);
}
.tag+.tag{margin-left:5px}
.tag--hot{background:var(--hot-bg);color:var(--hot)}
.tag--warm{background:var(--warm-bg);color:var(--warm)}
.tag--good{background:var(--good-bg);color:var(--good)}
.tag--accent{background:var(--tint);color:var(--accent-deep)}

.dot{display:inline-block;width:7px;height:7px;border-radius:50%;
  background:var(--hot);margin-right:7px;vertical-align:middle}

/* ------------------------------------------------------------- drawer -- */

.scrim{position:fixed;inset:0;background:rgba(10,13,18,.35);z-index:30;
  animation:fade .18s ease}
@keyframes fade{from{opacity:0}to{opacity:1}}

.drawer{
  position:fixed;top:0;right:0;bottom:0;width:min(560px,100vw);z-index:31;
  background:var(--surface);border-left:1px solid var(--line);
  box-shadow:var(--shadow-lg);display:flex;flex-direction:column;
  animation:slide .22s cubic-bezier(.4,0,.2,1);
}
@keyframes slide{from{transform:translateX(24px);opacity:.6}to{transform:none;opacity:1}}

.drawer__head{
  display:flex;align-items:flex-start;gap:14px;padding:20px 22px;
  border-bottom:1px solid var(--line);
}
.drawer__head h2{letter-spacing:-.025em}
.drawer__head .iconbtn{margin-left:auto}
.drawer__body{overflow-y:auto;padding:22px;display:flex;flex-direction:column;gap:26px}

.block h3{margin-bottom:12px}
.rowline{display:flex;gap:12px;justify-content:space-between;padding:9px 0;
  border-bottom:1px solid var(--line);font-size:13px}
.rowline:last-child{border-bottom:0}
.rowline dt{color:var(--muted);flex:none}
.rowline dd{margin:0;text-align:right;color:var(--ink);font-weight:600;
  word-break:break-word}

.item{border:1px solid var(--line);border-radius:var(--r-md);padding:14px;
  margin-bottom:10px}
.item:last-child{margin-bottom:0}
.item__top{display:flex;justify-content:space-between;gap:10px;align-items:baseline;
  margin-bottom:6px}
.item__title{font-weight:800;color:var(--ink);font-size:13.5px}
.item__meta{font-size:12px;color:var(--muted);white-space:nowrap}
.item p{font-size:13px;color:var(--soft);margin-top:4px}

.transcript{
  margin-top:8px;max-height:220px;overflow-y:auto;white-space:pre-wrap;
  font-size:12.5px;line-height:1.5;color:var(--soft);
  background:var(--bg);border-radius:var(--r-sm);padding:12px;
}

.actions{display:flex;flex-wrap:wrap;gap:8px}

@media (max-width:640px){
  /* The second column used to be hidden here so a five-column table would
     fit - "Why them" on prospects, "About" on leads, which is the column
     you most want on a phone. Rows stack into cards further down instead,
     so nothing has to be thrown away to make room. */
  .toolbar__right{width:100%}
  .search{flex:1;min-width:0}
}


/* ------------------------------------------------------------ prospects --

   Styled as a different place, not another list. Leads are people who came
   to you; prospects are businesses you found, and blurring the two visually
   would undo the separation the schema goes to some trouble to keep. */

.tabs{display:flex;flex-wrap:wrap;gap:4px;margin-bottom:18px}
.tab{
  font:inherit;cursor:pointer;
  padding:8px 16px;border-radius:999px;
  background:transparent;border:1px solid transparent;
  color:var(--muted);
}
.tab:hover{color:var(--ink)}
.tab.is-on{
  background:var(--surface);border-color:var(--line);color:var(--ink);
  font-weight:600;
}
.tab:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

/* A standing reminder of what these rows are. Quiet, but always present. */
.notice{
  margin:0 0 16px;padding:12px 14px;
  border-radius:var(--r-sm,8px);
  background:var(--tint,#f4f7fb);
  border:1px solid var(--line);
  color:var(--muted);font-size:13px;line-height:1.5;
}

.dash--prospects .inbox td.why,
.dash--field .inbox td.why,
.dash--consults .inbox td.why{
  max-width:380px;font-size:13px;color:var(--muted);line-height:1.5;
}

/* Ranked manual calling view. Let the table scroll on narrow screens rather
   than hiding the review signal or phone number. */
.call-sheet__table{min-width:760px}
.call-sheet__table tbody tr{cursor:default}
.call-sheet__table th:nth-child(2),
.call-sheet__table td:nth-child(2){display:table-cell}
.call-sheet__phone{font-weight:800;text-decoration:none;white-space:nowrap}
.call-sheet__phone:hover{text-decoration:underline}
.call-sheet__status{min-height:1.2em;margin:0 0 10px}

/* Email sequence activity needs all three columns on phones; keep the
   business, schedule, and attempt history available by scrolling sideways. */
.outreach__table{min-width:780px}
.outreach__table tbody tr{cursor:default}
.outreach__table th:nth-child(2),
.outreach__table td:nth-child(2){display:table-cell}
.outreach__attempt{padding:7px 0;border-bottom:1px solid var(--line)}
.outreach__attempt:last-child{border-bottom:0}
.outreach__attempt .muted{margin-top:3px}

/* Conversation tracker: compact cards keep the sales context and timeline
   readable without squeezing a four-column CRM table onto a phone. */
.messaging-list{display:grid;gap:12px}

@media(max-width:760px){.campaigns__layout{grid-template-columns:1fr}}
.messaging-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);box-shadow:var(--shadow);padding:18px}
.messaging-card__head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}
.messaging-card__head h2{font-size:16px;letter-spacing:-.02em}
.messaging-card__head .muted{margin-top:4px;font-size:12.5px}
.messaging-card__tags{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:5px}
.messaging-card__facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:15px 0}
.messaging-card__facts>div{padding:11px 12px;background:var(--bg);border-radius:var(--r-sm);min-width:0}
.messaging-card__facts b{font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted)}
.messaging-card__facts p{margin-top:5px;font-size:13px;white-space:pre-wrap;overflow-wrap:anywhere}
.messaging-card__details{border-top:1px solid var(--line);padding-top:10px;margin-top:10px}
.messaging-card__details summary{cursor:pointer;color:var(--soft);font-size:13px;font-weight:700}
.messaging__timeline{padding:8px 0 0 8px}
.messaging__event{padding:9px 0;border-bottom:1px solid var(--line)}
.messaging__event:last-child{border-bottom:0}
.messaging__time{margin-left:8px;color:var(--muted);font-size:12px}
.messaging__body{margin-top:5px;font-size:13px;color:var(--soft);white-space:pre-wrap;overflow-wrap:anywhere}
.messaging-update{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;align-items:end;padding-top:10px}
.messaging-update label{display:grid;gap:5px;font-size:12px;color:var(--muted);font-weight:700}
.messaging-update input{width:100%;padding:9px 10px;border:1px solid var(--line);border-radius:var(--r-sm);font:inherit;font-size:13px;color:var(--ink);background:var(--surface)}
.messaging-update [role="status"]{grid-column:1/-1}
.messaging__starter-note{margin:8px 0}
.messaging__starter-tabs{display:flex;flex-wrap:wrap;gap:7px;margin:10px 0}
.messaging__starter-tab:disabled{opacity:.45;cursor:not-allowed}
.messaging__starter-tab[aria-pressed="true"]{background:var(--ink);border-color:var(--ink);color:#fff}
.messaging__draft{display:block;width:100%;max-width:760px;resize:vertical;margin:8px 0;padding:12px;border:1px solid var(--line);border-radius:var(--r-sm);font:inherit;font-size:13px;line-height:1.5;color:var(--ink);background:var(--bg);white-space:pre-wrap}
@media(max-width:640px){.messaging-card__head{display:block}.messaging-card__tags{justify-content:flex-start;margin-top:10px}.messaging-card__facts{grid-template-columns:1fr}.messaging-update{grid-template-columns:1fr}}

.btn--sm{padding:5px 10px;font-size:12.5px}

/* ------------------------------------------------------------- the week ---
   Bookings by time rather than by person. Reads as a list on a phone the
   morning of, which is when it is actually opened. */

.week__day{margin-bottom:26px}

.week__date{
  margin:0 0 10px;
  font-size:13px;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:var(--muted);
}

.week__slot{
  display:grid;
  grid-template-columns:92px 1fr;
  gap:16px;
  padding:14px 16px;
  margin-bottom:8px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--r-md);
  cursor:pointer;
  transition:border-color .15s ease, box-shadow .15s ease;
}
.week__slot:hover,
.week__slot:focus-visible{border-color:var(--accent);box-shadow:var(--shadow)}
.week__slot:focus-visible{outline:none}

/* An unconfirmed booking is the one thing on this screen worth chasing. */
.week__slot--pending{border-left:3px solid var(--accent)}

.week__time b{display:block;font-size:15px;color:var(--ink);line-height:1.3}
.week__time .tag{margin-top:6px}

.week__who .who{font-weight:700;color:var(--ink)}

.week__said{
  margin:8px 0 0;
  font-size:13px;
  line-height:1.5;
  color:var(--soft);
}
.week__flag{
  margin:6px 0 0;
  font-size:12.5px;
  line-height:1.5;
  color:var(--muted);
}
.week__flag b{color:var(--ink)}

@media (max-width:560px){
  .week__slot{grid-template-columns:1fr;gap:6px}
  .week__time{display:flex;align-items:center;gap:8px}
  .week__time b{display:inline}
  .week__time .tag{margin-top:0}
}

/* The payment link, one tap after the call. */
.week__pay{margin-top:10px}

/* One button per offer rather than a dropdown - three named prices are
   quicker to pick from than a select, and there will never be twenty. */
.pay__row{display:flex;flex-wrap:wrap;gap:8px}
.pay__btn{white-space:nowrap}

/* Searchable sales reference: readable cards, easy copy, comfortable on mobile. */
.playbook__intro{margin-bottom:16px}
.playbook__intro h1{margin-bottom:6px}
.playbook-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,360px),1fr));gap:12px}
.playbook-card{display:flex;flex-direction:column;align-items:flex-start;gap:12px;padding:18px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);box-shadow:var(--shadow)}
.playbook-card__head{display:flex;align-items:center;flex-wrap:wrap;gap:9px}
.playbook-card h2{font-size:16px}
.playbook-card p{flex:1;color:var(--soft);font-size:13px;line-height:1.6;white-space:pre-wrap}
.playbook__source{margin-top:16px}

/* Market and trade, as chips rather than selects. Two markets and four
   trades is a glance; a dropdown hides which one is active behind a click,
   and the whole point is knowing which campaign you are looking at. */
.chips{display:flex;flex-wrap:wrap;gap:6px}
.chip{
  border:1px solid var(--line);
  background:var(--surface);
  color:var(--muted);
  font:inherit;font-size:12.5px;font-weight:700;
  padding:7px 12px;border-radius:999px;cursor:pointer;
  white-space:nowrap;
}
.chip:hover{border-color:var(--line-strong);color:var(--ink)}
.chip[aria-pressed="true"]{
  background:var(--ink);border-color:var(--ink);color:#fff;
}
.chip__n{opacity:.6;margin-left:5px;font-variant-numeric:tabular-nums}
@media (max-width:720px){
  .chips{width:100%}
}

/* Call notes. The composer is always open in the lead drawer - on a call
   that is the thing you are doing - and folded away on a prospect row,
   where it would otherwise be twenty textareas nobody asked for. */
.noteform{display:none;gap:8px;margin-bottom:14px}
.noteform.is-open,
.notewrap.is-open .noteform{display:flex;align-items:flex-start;margin-top:8px}
.noteform__box{
  flex:1;min-width:0;
  font:inherit;font-size:14px;line-height:1.5;
  padding:9px 11px;border:1px solid var(--line);border-radius:12px;
  background:var(--surface);color:var(--ink);resize:vertical;
}
.noteform__box:focus{
  outline:none;border-color:var(--accent);
  box-shadow:0 0 0 4px rgba(0,153,255,.12);
}
.notewrap{display:inline-block}


/* The market buttons under a stuck capture. Tight against the warning they
   answer, and wrapping rather than widening the column - two markets today,
   and the day Provo is its own campaign there will be three. */
.tagrow{display:flex;flex-wrap:wrap;gap:6px;margin-top:7px}
.tagrow .btn{padding:3px 10px;font-size:11px;text-transform:lowercase}

/* Open channels, under the name in the inbox. Deliberately quiet: this says
   what is permitted, not what to do, and a row of loud badges would read as
   advice it is not making. */
.reach .tag{font-size:10px;padding:2px 7px}
.reach .tag+.tag{margin-left:4px}

/* ======================================================= on a phone ===== */
/*
   The dashboard is read on a phone more than at a desk - after a call, in a
   truck, standing in a yard. Three things were wrong there and the first was
   not the tables: .toolbar__right is a nowrap flex row, so three chip groups
   plus a search box pushed the whole PAGE 110px wide. Every screen scrolled
   sideways, not just the table.
*/

@media (max-width:640px){

  /* 1. Nothing may push the page wider than the phone. */
  .toolbar__right{
    margin-left:0;
    width:100%;
    flex-wrap:wrap;
  }
  .toolbar__right .search{flex:1 1 100%;min-width:0}

  /* 2. The three chip groups share one sideways-scrolling row instead of
        claiming one each. Stacked they cost 232px of an 812px screen
        before a single prospect is visible. */
  .filterbar{
    display:flex;gap:14px;width:100%;
    overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;
  }
  .filterbar::-webkit-scrollbar{display:none}
  .filterbar .chips{width:auto;overflow:visible}

  .chips{
    flex-wrap:nowrap;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
    width:100%;
    padding-bottom:2px;
  }
  .chips::-webkit-scrollbar{display:none}
  .chip{flex:0 0 auto}

  /* 3. Rows become cards. A five-column table in 342px put "Why them" -
        the column that says whether somebody is worth calling - entirely
        off screen, along with every button. Stacked, nothing is hidden and
        nothing needs swiping.

        No generated labels: these cells are already self-describing (a name
        in bold, a phone number, a score tag), and labelling them would mean
        a data-label attribute on every td in six different render
        functions. */
  .inbox:not(.call-sheet__table) thead{display:none}
  .inbox:not(.call-sheet__table),
  .inbox:not(.call-sheet__table) tbody,
  .inbox:not(.call-sheet__table) tr,
  .inbox:not(.call-sheet__table) td{display:block;width:auto}
  .inbox:not(.call-sheet__table) tr{
    padding:14px 16px;
    border-bottom:1px solid var(--line);
  }
  .inbox:not(.call-sheet__table) tr:last-child{border-bottom:0}
  .inbox:not(.call-sheet__table) td{
    padding:3px 0;
    border:0;
    max-width:100%;
  }
  .inbox:not(.call-sheet__table) td:first-child{padding-top:0;font-size:15px}
  .inbox:not(.call-sheet__table) td:last-child{
    padding-top:10px;
    display:flex;flex-wrap:wrap;gap:8px;
  }
  /* The call sheet still needs its sideways scroll. */
  .tablewrap:not(:has(.call-sheet__table)){overflow-x:visible}

  /* Long emails and URLs are the one thing that still overflows a card. */
  .inbox td, .why{overflow-wrap:anywhere}

  /* 4. Thumb-sized. btn--sm is a mouse size; 40px is the smallest a thumb
        hits reliably on the first try. */
  .btn--sm{min-height:40px;padding-inline:14px}
  .chip{min-height:38px}
}

/* Installed to a home screen, the page runs under the notch and the home
   indicator. Without this the top row sits behind the status bar. */
@supports (padding:env(safe-area-inset-left)){
  body{
    padding-left:env(safe-area-inset-left);
    padding-right:env(safe-area-inset-right);
    padding-bottom:env(safe-area-inset-bottom);
  }
  .topbar{padding-top:env(safe-area-inset-top)}
}

/* Where to find them. Folded shut by default: the field view's job is the
   captures, and this is the thing you open before you leave the house. */
.spots{
  background:var(--surface);border:1px solid var(--line);
  border-radius:var(--r-lg);box-shadow:var(--shadow);
  padding:14px 18px;margin-bottom:16px;
}
.spots__summary{
  cursor:pointer;font-weight:800;font-size:14px;color:var(--ink);
  display:flex;align-items:center;gap:10px;list-style:none;
}
.spots__summary::-webkit-details-marker{display:none}
.spots__summary::before{content:"▸";color:var(--muted);display:inline-block;transition:transform .18s ease}
.spots[open] .spots__summary::before{transform:rotate(90deg)}
.spots__count{font-weight:700;font-size:12px;color:var(--muted)}
.spots__list{display:grid;gap:10px;margin-top:12px}
/* Not sticky. Each heading is a direct child of a grid, so it would stick
   inside its own one-row area and never travel, and the logo bar is already
   at the top of the viewport for it to slide under. Three headings over a
   list this short do not need it. */
.spots__market{
  display:flex;align-items:baseline;gap:8px;
  margin:6px 0 0;padding:6px 0;
  font-size:12px;font-weight:800;letter-spacing:.04em;
  text-transform:uppercase;color:var(--muted);
}
.spots__market:first-child{margin-top:0}
.spot{
  border:1px solid var(--line);border-radius:var(--r-md,14px);
  padding:12px 14px;
}
.spot__top{display:flex;flex-wrap:wrap;align-items:baseline;gap:8px}
.spot__name{font-weight:800;font-size:14.5px;color:var(--ink)}
.spot__kind{font-size:12px;color:var(--muted)}
.spot__when{
  margin-left:auto;font-size:12px;font-weight:800;color:var(--accent-deep);
  white-space:nowrap;
}
.spot__why{margin:6px 0 0;font-size:13.5px;line-height:1.5;color:var(--body)}
.spot__links{display:flex;flex-wrap:wrap;gap:12px;margin-top:8px;font-size:13px}
.spot__links a{color:var(--accent-deep);font-weight:700;text-decoration:none}
.spot__links a:hover{text-decoration:underline}

@media (max-width:640px){
  /* A phone in a supply-house car park: the address and the number are the
     two things wanted, and both have to be one tap. */
  .spot__when{margin-left:0;width:100%}
  .spot__links a{min-height:40px;display:inline-flex;align-items:center}
}


/* The line you read in the two seconds before they pick up, so it sits
   above the scoring reasons rather than among them - those explain a
   number, this one is the thing you actually say. */
.pitch{
  font-weight:700;color:var(--ink);
  margin-bottom:4px;line-height:1.4;
}
/* Nothing specific on file. Still shown, because "we know nothing about
   this one" is worth knowing before you dial, but it must not read like
   evidence. */
.pitch--thin{font-weight:500;color:var(--muted)}

/* The research reader. A panel over the dashboard rather than a new tab:
   a popup blocker would leave a dead button, and on a phone a second tab
   is worse than something you can close. */
.reader{
  position:fixed;inset:0;z-index:70;
  display:flex;flex-direction:column;
  background:var(--surface);
}
.reader__bar{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:10px 14px;border-bottom:1px solid var(--line);
  font-weight:800;font-size:13px;color:var(--ink);
  /* Clear of the notch and the home indicator on a phone. */
  padding-top:calc(10px + env(safe-area-inset-top));
  flex:0 0 auto;
}
/* The report brings its own page styling, so the frame gets none - only
   the room to use. */
.reader__frame{flex:1 1 auto;width:100%;border:0;background:#fff}

/* The written opener. Collapsed by default: these run to roughly five
   hundred characters, and the derived angle above it is the part read at a
   glance. Open, it keeps the line breaks the author typed. */
.pitch-written{margin-top:6px}
.pitch-written>summary{
  cursor:pointer;list-style:none;
  font-size:12px;font-weight:700;color:var(--accent-deep);
}
.pitch-written>summary::-webkit-details-marker{display:none}
.pitch-written>summary::before{content:"▸ ";color:var(--muted)}
.pitch-written[open]>summary::before{content:"▾ "}
.pitch-written__body{
  white-space:pre-wrap;
  margin:6px 0;padding:8px 10px;
  border-left:2px solid var(--line-strong);
  font-size:12.5px;line-height:1.5;color:var(--body);
}

/* The house rules. Above the charts on the metrics view, because a broken
   rule outranks a trend. */
.rules{
  background:var(--surface);border:1px solid var(--line);
  border-radius:var(--r-lg);box-shadow:var(--shadow);
  padding:14px 18px;margin-bottom:16px;
}
.rules__head{display:flex;align-items:baseline;gap:10px;margin-bottom:4px}
.rules__head h2{font-size:15px;margin:0;color:var(--ink)}
.rules__score{font-size:12px;font-weight:800;color:var(--muted)}
.rules__list{display:grid;gap:8px;margin-top:12px}
.rule{
  border:1px solid var(--line);border-radius:var(--r-md);
  border-left-width:3px;padding:10px 12px;
}
/* Kept is quiet, broken is not. The list is read to find the broken ones. */
.rule--kept{border-left-color:var(--good);background:var(--good-bg)}
.rule--broken{border-left-color:var(--warm);background:var(--warm-bg)}
.rule__top{display:flex;align-items:baseline;gap:8px}
.rule__mark{font-weight:800}
.rule--kept .rule__mark{color:var(--good)}
.rule--broken .rule__mark{color:var(--warm)}
.rule__text{font-weight:700;font-size:13.5px;color:var(--ink)}
.rule__nums{
  display:flex;flex-wrap:wrap;align-items:baseline;gap:10px;
  margin-top:4px;font-size:12.5px;
}
.rule__actual{font-weight:800;color:var(--ink)}
.rule__note{margin:6px 0 0;font-size:12px;color:var(--soft);line-height:1.45}

/* ------------------------------------------------------------- roofs -- */
/* The sentence first, the streets under it. This panel is read standing
   up, so the one line that can be said out loud gets the size. */
.roof-sum{margin:2px 0 14px}
.roof-line{font-size:17px;line-height:1.45;color:var(--ink)}
.roof-line b{font-variant-numeric:tabular-nums}
.roof-sub{margin-top:5px;font-size:13px;color:var(--muted)}

.spot--street .spot__name{font-variant-numeric:tabular-nums}

/* A button that reads as a link, because it sits in a row of links and
   opening a list is the same kind of act as following one. */
.linkish{
  background:none;border:0;padding:0;margin-right:12px;cursor:pointer;
  font:inherit;color:var(--accent);text-decoration:underline;
  text-underline-offset:2px;
}
.linkish:hover{color:var(--ink)}

.pill{
  display:inline-block;padding:1px 8px;border-radius:999px;
  font-size:12px;border:1px solid var(--line);white-space:nowrap;
}
/* Past thirty is the one worth noticing; due_now is the bulk of the list
   and colouring it the same would flatten the distinction. */
.pill--overdue{background:var(--warn-bg,#fdeceb);border-color:#e3b3ae;color:#8a2c22}
.pill--due_now{background:transparent;color:var(--muted)}

/* The rounds. A counter, then the streets you can name from it - the
   streets are the point, so they get the indent rather than the counter. */
.spot--round .spot__why{font-size:12px;color:var(--muted);margin-top:2px}
.round__blocks{list-style:none;margin:8px 0 6px;padding:0}
.round__block{
  padding:5px 0 5px 12px;border-left:2px solid var(--line);
  font-size:13px;line-height:1.45;color:var(--ink);
}
.round__block + .round__block{margin-top:2px}
.round__block b{font-variant-numeric:tabular-nums}

/* ------------------------------------------------- sales and people -- */
/* A person card leads with how you are allowed to reach them, because
   that differs by population and getting it wrong is the expensive
   mistake, not the rude one. */
.person__reach{
  font-size:12.5px;color:var(--accent-deep);margin-top:3px;
  font-weight:500;
}
.spot--person .spot__why{margin-top:4px}
.person__next{
  margin-top:4px;font-size:13px;color:var(--ink);
  padding-left:10px;border-left:2px solid var(--accent);
}
.spot__kind--warn{color:#8a2c22;background:var(--warn-bg,#fdeceb);
  border-radius:999px;padding:1px 8px}

/* Bought is filled, not-bought is outlined: the outlined ones are the
   conversations nobody has had yet, which is the point of the list. */
.book__trades{display:flex;flex-wrap:wrap;gap:4px;margin:6px 0 4px}

.spot--blocked{border-left:3px solid #c2410c}

.pill--won,.pill--done{background:#e7f6ed;border-color:#9ad3b0;color:#16633a}
.pill--quoted{background:#eef4ff;border-color:#b9ccf3;color:#23457f}
.pill--responded{background:transparent;color:var(--ink)}
.pill--mailed,.pill--knocked{background:transparent;color:var(--muted)}

/* A block already posted to shows what it became, not a button to do it
   again. The tick is the point: this list is worked through once. */
.mailed-mark{font-size:12.5px;color:#16633a;font-weight:500}
.linkish--do{color:var(--accent-deep);font-weight:500}
.linkish:disabled{opacity:.5;cursor:default;text-decoration:none}

/* ---------------------------------------------------------- approach -- */
/* The verdict first, loud when it needs to be. Everything else on this
   tab is a number you can come back to; this is the one line that is
   about today, so it gets the top of the page and a colour. */
.ap-cost{
  background:var(--surface);border:1px solid var(--line);
  border-left:4px solid var(--line-strong);
  border-radius:var(--r-lg);box-shadow:var(--shadow);
  padding:13px 17px;margin-bottom:16px;
}
.ap-cost--ok{border-left-color:var(--good)}
.ap-cost--watch{border-left-color:var(--warm);background:var(--warm-bg)}
.ap-cost--rest{border-left-color:var(--hot);background:var(--hot-bg)}
.ap-cost__verdict{
  font-size:12px;font-weight:800;text-transform:uppercase;
  letter-spacing:.09em;color:var(--muted);
}
.ap-cost--ok .ap-cost__verdict{color:var(--good)}
.ap-cost--watch .ap-cost__verdict{color:var(--warm)}
.ap-cost--rest .ap-cost__verdict{color:var(--hot)}
.ap-cost__note{margin:3px 0 0;color:var(--soft);font-size:13.5px}
.ap-cost--rest .ap-cost__note{color:var(--ink);font-weight:600}
.ap-cost__scale{margin:7px 0 0;color:var(--muted);font-size:11.5px}

.ap-form{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:12px}
.ap-form--thin{margin:0 0 14px}
.ap-field{display:grid;gap:6px;min-width:0}
.ap-field--wide{grid-column:1 / -1}
.ap-field > span{
  font-size:11px;font-weight:800;text-transform:uppercase;
  letter-spacing:.06em;color:var(--muted);
}
.ap-field input[type=text],.ap-field select{
  width:100%;padding:9px 11px;border:1px solid var(--line);
  border-radius:var(--r-sm);background:var(--surface);color:var(--ink);
  font:inherit;font-size:14px;
}
.ap-field input:focus,.ap-field select:focus,.ap-field textarea:focus{
  outline:none;border-color:var(--accent);
  box-shadow:0 0 0 4px rgba(0,153,255,.12);
}
.ap-check{
  display:flex;align-items:center;gap:8px;margin-top:8px;
  font-size:13px;color:var(--soft);font-weight:600;
}
.ap-check input{width:16px;height:16px;accent-color:var(--accent)}
.ap-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
@media(max-width:640px){.ap-form{grid-template-columns:1fr}}

/* A live version is the one you are using; a retired one is kept for its
   numbers and should not look like a choice. */
.ap-row{
  border:1px solid var(--line);border-radius:var(--r-md);
  border-left:3px solid var(--line-strong);padding:10px 12px;
}
.ap-row--live{border-left-color:var(--accent)}
.ap-row--draft{border-left-color:var(--line-strong)}
.ap-row--retired{border-left-color:var(--line-strong);background:var(--cool-bg)}
.ap-row__top{display:flex;flex-wrap:wrap;align-items:baseline;gap:8px}
.ap-row__name{font-weight:800;font-size:13.5px;color:var(--ink)}
.ap-row__v{font-size:11.5px;font-weight:800;color:var(--muted)}
.ap-row__text{margin:6px 0 0;font-size:12.5px;color:var(--soft);line-height:1.45}
.ap-nums{
  display:flex;flex-wrap:wrap;gap:4px 14px;margin-top:6px;
  font-size:12.5px;color:var(--soft);
}
.ap-num b{color:var(--ink);font-weight:800}
.ap-revise{
  display:grid;gap:9px;margin-top:10px;padding-top:10px;
  border-top:1px dashed var(--line);
}

.ap-bar{
  display:grid;grid-template-columns:minmax(110px,1fr) 2fr auto;
  align-items:center;gap:10px;margin-top:8px;font-size:12.5px;
}
.ap-bar__track{
  height:8px;border-radius:999px;background:var(--cool-bg);overflow:hidden;
}
.ap-bar__fill{display:block;height:100%;background:var(--warm);border-radius:999px}
@media(max-width:520px){
  .ap-bar{grid-template-columns:1fr auto}
  .ap-bar__track{grid-column:1 / -1}
}

/* The filter rows elsewhere scroll sideways, which is fine for a filter
   you can discover later. These chips are the answer to a question, and
   an option you have to swipe to find is an option that does not get
   picked - "asked me to stop" least of all. */
.ap-form .chips{flex-wrap:wrap;overflow:visible}

/* ------------------------------------------------------------ closes -- */
.close-h{margin:18px 0 2px}
.close-h:first-of-type{margin-top:14px}

/* The funnel is description; the breakdowns are a judgement. Different
   colours so one is not read as the other. */
.ap-bar__fill--cool{background:var(--accent)}

/* A rate computed over four deals is still shown - hiding it would be
   its own kind of lie - but it must not look like a finding. */
.ap-bar--thin .ap-bar__fill{background:var(--line-strong)}
.ap-bar--thin{color:var(--muted)}

/* At phone width the title and the figure beside it both wrap, and
   without this they interleave. Shared by the rules, approach and
   closes panels. */
@media(max-width:520px){ .rules__head{flex-wrap:wrap} }

/* -------------------------------------------------------- the book -- */

/* The two tallies at the bottom of the book answer opposite questions,
   so they must not read as one longer list. A no at the door is
   information; a client leaving is money gone. */
.ap-bar__fill--hot{background:var(--hot)}

/* A month that went backwards. The minus sign alone is too easy to
   skim past in a row of figures. */
.ap-num--down b{color:var(--hot)}

.bk-missed{margin-top:10px}
.bk-moves{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:8px}

/* The cancellation tally is boxed rather than only tinted. Two lists of
   reason codes one after the other read as one longer list however the
   bars are coloured, and these are opposite questions. */
.bk-churn{
  margin-top:16px;padding:2px 14px 14px;border-radius:12px;
  border-left:3px solid var(--hot);background:var(--hot-bg);
}
.bk-churn .close-h{margin-top:12px}
.bk-churn .ap-bar__track{background:#fff}

/* --------------------------------------------- bench and notebook -- */

/* The approach verdict has ok / watch / rest. The bench needs a fourth
   that means "past the day you gave it" rather than "stop for today",
   so it borrows the block and not the word. */
.ap-cost--hot{border-left-color:var(--hot);background:var(--hot-bg)}
.ap-cost--hot .ap-cost__verdict{color:var(--hot)}

/* A system that has quietly stopped working costs more than a project
   that has not started, so the maintenance list is boxed and sits
   above the open work rather than reading as more of it. */
.bn-check{border-left:3px solid var(--warm);background:var(--warm-bg)}
.bn-check .ap-row{background:#fff}

.bn-moves{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:8px}

/* ------------------------------------------------------- runbook -- */

/* A step inside a run. Indented under its run and separated by a hair
   line rather than a card each: ten of them stacked as cards is a
   page nobody scrolls to the end of. */
.rb-steps{margin-top:10px;border-top:1px dashed var(--line)}
.rb-step{padding:10px 0;border-bottom:1px dashed var(--line)}
.rb-step:last-child{border-bottom:0}

/* Settled steps stay visible - a checklist you cannot see the done
   half of is one you cannot tell you are near the end of - but they
   stop competing for attention with the ones that are not. */
.rb-step--settled{opacity:.55}
.rb-step--plain{padding:8px 0}

.rb-steplist{margin-top:10px}
.rb-steplist>summary{
  cursor:pointer;font-size:12.5px;font-weight:700;color:var(--soft);
  padding:4px 0;
}
.rb-steplist>summary::marker{color:var(--muted)}

/* ---------------------------------------------------------- care -- */

/* Only the two severities that mean work is being lost get the red
   edge. Everything else is a job rather than an emergency, and
   colouring it otherwise is how a board stops being believed. */
.cr-row--bad{border-left-color:var(--hot);background:var(--hot-bg)}

/* ------------------------------------------------- pulse and worth -- */

/* The strip above the inbox. Each line is a button because each line
   already knows which tab answers it, and a sentence that names a
   tab you then have to go and find is half a feature. */
.pu-standing{
  display:flex;flex-wrap:wrap;gap:6px 16px;align-items:baseline;
  margin-bottom:10px;font-size:13px;color:var(--soft);
}
.pu-standing__n{font-weight:800;color:var(--ink)}
.pu-standing__x{color:var(--muted)}
.pu{
  display:flex;width:100%;gap:12px;align-items:baseline;
  justify-content:space-between;text-align:left;cursor:pointer;
  border:1px solid var(--line);border-left:3px solid var(--line-strong);
  border-radius:var(--r-md);background:var(--card);
  padding:10px 12px;margin-bottom:8px;font:inherit;font-size:13px;
}
.pu:hover{border-color:var(--line-strong)}
.pu__says{color:var(--ink)}
.pu__go{color:var(--muted);font-size:11.5px;font-weight:700;
  text-transform:uppercase;letter-spacing:.04em;white-space:nowrap}

/* Only the two that cost money while they sit are red. */
.pu--hot{border-left-color:var(--hot);background:var(--hot-bg)}
.pu--watch{border-left-color:var(--warm);background:var(--warm-bg)}
.pu--ok{border-left-color:var(--line-strong)}

/* The score leads the row, because the whole row is an argument for
   that one number. */
.wo-score{
  display:inline-block;min-width:34px;padding:1px 7px;border-radius:999px;
  background:var(--cool-bg);color:var(--cool);
  font-size:12px;font-weight:800;text-align:center;
}
