/* home.css -- the /home landing page (docs/briefs/roofer-home-page-2026-09-14.md).
   Two halves:
     1. the dashboard shell (sidebar, footer, glow, mobile rows) -- the same
        recipe calculator.html/site.html carry inline. Kept in a real file
        here because home.html has three cards of its own to style and the
        brief asked for home.css; nothing else loads this file.
     2. the three cards themselves.
   Two colours only: indigo (--w-accent) and warm amber (--w-accent-2), both
   straight from theme.css. Statuses are a dot plus words -- never colour
   alone, never a red-for-bad pill. */

* { box-sizing: border-box; }
body { margin: 0; background: var(--w-bg); color: var(--w-body);
  font: 15px/1.55 var(--w-font); position: relative; }
h1, h2, h3 { color: var(--w-ink); margin: 0 0 0.25rem; }
a { color: inherit; }

body::before {
  content: ""; position: absolute; inset: 0; height: 420px; z-index: 0;
  background: var(--w-glow-soft); pointer-events: none;
}

.app { display: flex; min-height: 100vh; position: relative; z-index: 1; }

/* ---------- sidebar ---------- */
.sidebar { width: var(--sidebar-w); flex: 0 0 auto; background: var(--w-surface);
  border-right: 1px solid var(--w-border); display: flex; flex-direction: column;
  padding: 1.1rem 0.9rem; position: sticky; top: 0; height: 100vh; }
.sidebar-header { margin-bottom: 1.25rem; }
.workspace-name { font-weight: 700; font-size: 0.95rem; color: var(--w-ink);
  padding: 0.3rem 0.4rem 0.9rem; }
.w-btn { font: 600 13px/1 var(--w-font); border-radius: 10px; cursor: pointer;
    padding: 0.6rem 1rem; border: 1px solid transparent; display: inline-flex;
  align-items: center; justify-content: center; gap: 0.4rem; text-decoration: none; }
/* (Dashboard cleanup, 7 Nov 2026: the sidebar's + New site button is gone;
   the button shadow is skin.css's, the same as every other page.) */
.w-btn-primary { background: var(--w-accent); color: var(--w-accent-ink); width: 100%; }
.w-btn-primary:hover { filter: brightness(1.08); }

.sidebar-nav { list-style: none; margin: 0; padding: 0; flex: 1; }
.sidebar-nav li { margin-bottom: 0.1rem; }
.nav-item { display: flex; align-items: center; gap: 0.55rem; padding: 0.4rem 0.6rem; min-height: 32px;
    border-radius: var(--w-radius-sm); font-size: 13px; font-weight: 500; color: var(--w-body);
  text-decoration: none; }
.nav-item .ic { width: 16px; text-align: center; display: inline-flex; align-items: center; justify-content: center; }
.nav-item.active { background: var(--w-accent-soft); color: var(--w-accent); }

.sidebar-footer { border-top: 1px solid var(--w-border); padding-top: 0.7rem; margin-top: 0.7rem; }
.footer-item { display: flex; align-items: center; gap: 0.6rem; padding: 0.4rem 0.6rem; min-height: 32px;
  border-radius: var(--w-radius-sm); font-size: 13px; color: var(--w-muted); cursor: pointer;
  background: none; border: none; width: 100%; text-align: left; font-family: inherit;
  text-decoration: none; }
.footer-item:hover { background: var(--w-accent-soft); color: var(--w-accent); }
.footer-item .ic { width: 16px; text-align: center; display: inline-flex; align-items: center; justify-content: center; }
.ic svg { width: 16px; height: 16px; display: block; }
  .nav-group { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--w-muted); padding: 0.85rem 0.6rem 0.25rem; }
  .nav-group-gap { padding: 0.35rem 0; }
.toggle-pill { margin-left: auto; width: 30px; height: 17px; border-radius: 999px;
  background: var(--w-border); position: relative; }
.toggle-pill::after { content: ""; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px;
  border-radius: 50%; background: #fff; transition: left 0.15s; }
.toggle-pill.on { background: var(--w-accent); }
.toggle-pill.on::after { left: 15px; }
#version-stamp { display: none; padding: 0.55rem 0.7rem 0; font-size: 0.72rem; color: var(--w-muted); }

/* ---------- main column ---------- */
.main { flex: 1 1 auto; min-width: 0; padding: 1.75rem 2rem 4rem; max-width: 1180px; margin: 0 auto; }
/* The roofer's three cards keep their narrow column (home.js adds this for
   a calc account); the agency overview below uses the full width. */
.main.is-roofer { max-width: 760px; }
.home-head { margin-bottom: 1.4rem; }
.home-head h1 { font-size: 1.4rem; }
.home-head p { color: var(--w-muted); font-size: 0.88rem; margin: 0.15rem 0 0; }
.muted-text { color: var(--w-muted); font-size: 0.85rem; }

/* ---------- the three cards ---------- */
.home-card { background: var(--w-surface); border: 1px solid var(--w-border);
  border-radius: var(--w-radius); box-shadow: var(--w-shadow); padding: 1.3rem 1.4rem;
  margin-bottom: 1.1rem; }
.home-card-head { display: flex; align-items: baseline; justify-content: space-between;
  gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.15rem; }
.home-card h2 { font-size: 1rem; }
.home-card .card-sub { color: var(--w-muted); font-size: 0.83rem; margin: 0 0 1rem; }

/* dot + text status -- the dot never carries the meaning on its own. */
.home-status { display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.8rem; font-weight: 600; color: var(--w-muted); white-space: nowrap; }
.home-status .status-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto;
  display: inline-block; background: var(--w-dot-off); }
.home-status .status-dot.dot-live { background: var(--w-dot-live); }
.home-status .status-dot.dot-busy { background: var(--w-dot-busy);
  animation: home-dot-pulse 1.6s ease-in-out infinite; }
a.home-status-link { text-decoration: underline; text-underline-offset: 2px; }
a.home-status-link:hover { color: var(--w-ink); }
@keyframes home-dot-pulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }

/* numbers row */
.home-stats { display: flex; gap: 1.6rem; flex-wrap: wrap; margin: 0 0 1rem; }
.home-stat { min-width: 110px; }
.home-stat .home-stat-value { font-size: 1.5rem; font-weight: 700; color: var(--w-ink);
  line-height: 1.15; display: block; }
.home-stat .home-stat-value.is-checking { font-size: 0.95rem; font-weight: 600; color: var(--w-muted); }
.home-stat .home-stat-label { font-size: 0.76rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.03em; color: var(--w-muted); }

/* the one line a roofer pastes into their site */
.home-embed { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
  border: 1px solid var(--w-border); border-radius: var(--w-radius-sm);
  background: var(--w-bg); padding: 0.55rem 0.7rem; margin: 0 0 0.9rem; }
.home-embed code { flex: 1 1 260px; min-width: 0; overflow-x: auto; white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem; color: var(--w-ink); }
.home-embed-label { flex: 0 0 100%; font-size: 0.76rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.03em; color: var(--w-muted); }
.cred-btn { border: 1px solid var(--w-border); background: var(--w-surface); color: var(--w-body);
  font: 600 0.78rem/1 var(--w-font); padding: 0.4rem 0.7rem; border-radius: 999px; cursor: pointer;
  flex: 0 0 auto; }
.cred-btn:hover { background: var(--w-accent-soft); color: var(--w-accent); border-color: var(--w-accent); }
.copy-status { font-size: 0.76rem; color: var(--w-accent); }

/* buttons under a card */
.home-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.home-actions .w-btn { width: auto; }
.w-btn-quiet { background: var(--w-surface); border-color: var(--w-border); color: var(--w-body); }
.w-btn-quiet:hover { background: var(--w-accent-soft); color: var(--w-accent); border-color: var(--w-accent); }

/* a line of plain words under the status, e.g. where leads get texted */
.home-line { display: flex; align-items: center; gap: 0.45rem; font-size: 0.85rem;
  color: var(--w-body); margin: 0 0 0.9rem; }
.home-line .status-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto;
  display: inline-block; background: var(--w-dot-off); }
.home-line .status-dot.dot-live { background: var(--w-dot-live); }

/* building progress */
.home-progress { height: 6px; border-radius: 999px; background: var(--w-border);
  overflow: hidden; margin: 0 0 0.9rem; }
.home-progress > span { display: block; height: 100%; background: var(--w-accent-2); }

/* the one quiet line under all three cards */
.home-foot { color: var(--w-muted); font-size: 0.85rem; margin: 1.4rem 0 0; }

/* ==========================================================================
   Agency overview (Dashboard cleanup, Hannah approved 7 Nov 2026): credits
   card + "Lead credits used" chart, a strip of four, then Recent searches,
   Hosting trials ending and Campaigns. Colours are theme tokens only.
   ========================================================================== */
.home-head.sf-head { align-items: center; }
.home-head.sf-head p { margin-top: 4px; font-size: 14px; }
.home-head-btns[hidden] { display: none; }
.home-head-btns .w-btn { width: auto; gap: 8px; padding: 9px 14px; font-size: 13.5px; white-space: nowrap; }
.home-head-btns .ic svg { width: 15px; height: 15px; }
.home-btn-outline { background: var(--w-surface); color: var(--w-ink); border-color: var(--w-border); }
.home-btn-outline:hover { border-color: var(--w-accent); color: var(--w-accent); }

.hp { border: 1px solid var(--w-border); border-radius: 14px; background: var(--w-surface);
  padding: 20px 22px; min-width: 0; }
.hp h2 { margin: 0; font-size: 14px; font-weight: 600; color: var(--w-ink); letter-spacing: 0; }
.hp-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.hp-link { color: var(--w-accent); font-weight: 600; font-size: 13px; text-decoration: none; }
.hp-link:hover { text-decoration: underline; }
.hp-sub { color: var(--w-muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }

.home-top { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.6fr); gap: 16px; margin-bottom: 16px; }

/* Lead credits: the soft blue wash */
.hc-credits { position: relative; overflow: hidden;
  background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--w-accent) 15%, var(--w-surface)) 0%, transparent 55%),
    linear-gradient(180deg, color-mix(in srgb, var(--w-accent) 2%, var(--w-surface)), var(--w-surface)); }
.hc-big { margin: 18px 0 4px; line-height: 1; }
.hc-big-num { font-size: 52px; font-weight: 600; letter-spacing: -0.03em; color: var(--w-ink);
  font-variant-numeric: tabular-nums; }
.hc-big-num.is-checking { font-size: 18px; color: var(--w-muted); letter-spacing: 0; }
.hc-big small { font-size: 15px; font-weight: 500; color: var(--w-muted); margin-left: 6px; }
.hc-meters { display: grid; gap: 14px; margin-top: 22px; }
.hc-meter-lab { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; margin-bottom: 6px; color: var(--w-body); }
.hc-meter-lab b { color: var(--w-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.hc-track { height: 6px; border-radius: 99px; background: color-mix(in srgb, var(--w-accent) 9%, var(--w-surface)); overflow: hidden; }
.hc-fill { height: 100%; border-radius: 99px; transform-origin: left;
  background: linear-gradient(90deg, var(--w-accent), color-mix(in srgb, var(--w-accent) 72%, var(--w-surface)));
  animation: hc-grow 1s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes hc-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Lead credits used: the chart */
.hc-used-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.hc-used-big { margin-top: 6px; line-height: 1.1; }
#hc-used-total { font-size: 30px; font-weight: 600; color: var(--w-ink); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.hc-used-across { font-size: 13px; color: var(--w-muted); font-weight: 500; margin-left: 6px; }
.hc-seg { display: flex; border: 1px solid var(--w-border); border-radius: 8px; padding: 2px; }
.hc-seg button { border: 0; background: transparent; font: 500 12px/1 var(--w-font); padding: 6px 9px;
  border-radius: 6px; color: var(--w-muted); cursor: pointer; white-space: nowrap; }
.hc-seg button:hover { color: var(--w-ink); }
.hc-seg button.is-on { background: color-mix(in srgb, var(--w-accent) 8%, var(--w-surface)); color: var(--w-accent); font-weight: 600; }
.hc-chart { padding-top: 30px; margin-top: 10px; border-bottom: 1px solid var(--w-border); }
.hc-plot { position: relative; height: 170px; display: flex; align-items: flex-end; gap: 4px; }
.hc-chart.is-dense .hc-plot { gap: 1px; }
.hc-gl { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--w-border); font-size: 10.5px; color: var(--w-muted); pointer-events: none; }
.hc-gl { z-index: 2; }
.hc-gl i { position: absolute; right: 0; top: -15px; font-style: normal; background: var(--w-surface); padding-left: 4px; }
.hc-bar { flex: 1; min-width: 0; height: 3px; border-radius: 4px 4px 1px 1px; position: relative;
  background: color-mix(in srgb, var(--w-accent) 16%, var(--w-surface)); transform-origin: bottom; }
.hc-chart.is-dense .hc-bar { border-radius: 2px 2px 0 0; }
.hc-bar.is-zero { background: var(--w-border); }
.hc-chart.is-rising .hc-bar:not(.is-zero) { animation: hc-rise .9s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes hc-rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.hc-bar.is-peak { background: linear-gradient(180deg, color-mix(in srgb, var(--w-accent) 75%, var(--w-surface)), var(--w-accent)); }
.hc-bar.is-peak::after { content: attr(data-l); position: absolute; bottom: calc(100% + 6px); left: 50%;
  transform: translateX(-50%); font-size: 11px; font-weight: 600; color: var(--w-ink); white-space: nowrap;
  background: var(--w-surface); border: 1px solid var(--w-border); border-radius: 6px; padding: 2px 6px; z-index: 1; }
.hc-bar.is-peak.lab-left::after { left: 0; transform: none; }
.hc-bar.is-peak.lab-right::after { left: auto; right: 0; transform: none; }
.hc-empty { position: absolute; inset: 0 0 12px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 4px; text-align: center; padding: 0 16px; }
.hc-empty b { color: var(--w-ink); font-size: 13.5px; font-weight: 600; }
.hc-empty span { color: var(--w-muted); font-size: 12.5px; }
.hc-axis { position: relative; height: 14px; font-size: 11px; line-height: 14px; color: var(--w-muted); margin-top: 7px; }
.hc-axis span { position: absolute; top: 0; white-space: nowrap; }
.hc-note { margin: 8px 0 0; font-size: 11.5px; color: var(--w-muted); }

/* the strip of four */
.hs-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--w-border);
  border-radius: 14px; margin-bottom: 16px; overflow: hidden; background: var(--w-surface); }
.hs-strip.hs-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hs-strip.hs-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hs-step { padding: 16px 20px; position: relative; min-width: 0; }
.hs-step + .hs-step { border-left: 1px solid var(--w-border); }
.hs-step + .hs-step::before { content: ""; position: absolute; left: -7px; top: 50%; width: 12px; height: 12px;
  background: var(--w-surface); border-top: 1px solid var(--w-border); border-right: 1px solid var(--w-border);
  transform: translateY(-50%) rotate(45deg); }
.hs-k { display: flex; align-items: center; gap: 8px; color: var(--w-muted); font-size: 12.5px; font-weight: 500; }
.hs-k .ic { display: inline-flex; color: var(--w-accent); }
.hs-k .ic svg { width: 15px; height: 15px; }
.hs-v { font-size: 26px; font-weight: 600; color: var(--w-ink); letter-spacing: -0.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.hs-v small { font-size: 15px; color: var(--w-muted); font-weight: 500; letter-spacing: 0; }
.hs-d { font-size: 12.5px; color: var(--w-muted); }

/* bottom row: lists */
.home-bottom { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.home-stack { display: grid; gap: 16px; align-content: start; min-width: 0; }
.hp-list-head { margin-bottom: 6px; }
.hp-rows { display: flex; flex-direction: column; }
.hp-r { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 14px; align-items: center;
  padding: 11px 0; border-top: 1px solid var(--w-border); color: inherit; text-decoration: none; }
.hp-r:first-child { border-top: 0; }
a.hp-r:hover b { color: var(--w-accent); }
.hp-r b { color: var(--w-ink); font-weight: 600; font-size: 14px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-loc { display: flex; align-items: center; gap: 5px; color: var(--w-muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp-loc svg { width: 13px; height: 13px; flex: 0 0 13px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.hp-when { color: var(--w-muted); font-size: 12.5px; white-space: nowrap; }
.hp-go { width: 16px; height: 16px; stroke: var(--w-ink); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
a.hp-r:hover .hp-go { stroke: var(--w-accent); }
.hp-days { font-size: 12px; font-weight: 600; border-radius: 999px; padding: 2px 9px; white-space: nowrap;
  background: color-mix(in srgb, var(--w-accent) 8%, var(--w-surface)); color: var(--w-accent); }
.hp-days.is-soon { background: var(--w-status-processing-bg); color: var(--w-status-processing-ink); }
.hp-mini-btn { font: 600 12px/1.2 var(--w-font); border: 1px solid var(--w-border); border-radius: 7px; padding: 4px 9px;
  color: var(--w-ink); background: var(--w-surface); white-space: nowrap; cursor: pointer; }
.hp-mini-btn:hover { border-color: var(--w-accent); color: var(--w-accent); }
.hp-mini-btn:disabled { opacity: 0.55; cursor: default; }
.hp-pill { font-size: 12px; font-weight: 600; border-radius: 999px; padding: 2px 9px; white-space: nowrap;
  background: var(--w-pill-neutral-bg); color: var(--w-pill-neutral-ink); }
.hp-pill.is-done { background: var(--w-status-completed-bg); color: var(--w-status-completed-ink); }
.hp-pill.is-running { background: color-mix(in srgb, var(--w-accent) 8%, var(--w-surface)); color: var(--w-accent); }
.hp-pill.is-checking { background: transparent; color: var(--w-muted); font-weight: 500; padding: 2px 0; }
.hp-prog { width: 90px; height: 5px; border-radius: 99px; background: color-mix(in srgb, var(--w-accent) 9%, var(--w-surface)); overflow: hidden; }
.hp-prog[hidden] { display: none; }
.hp-prog i { display: block; height: 100%; width: 0; background: var(--w-accent); }
.hp-r-camp:has(.hp-prog[hidden]) { grid-template-columns: minmax(0, 1fr) auto; }

/* empty states */
.hp-empty-line { margin: 8px 0 2px; color: var(--w-muted); font-size: 13px; line-height: 1.5; }
.hp-empty-line a { color: var(--w-accent); font-weight: 600; text-decoration: none; }
.hp-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 26px 12px 18px; }
.hp-empty-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; margin-bottom: 4px;
  background: color-mix(in srgb, var(--w-accent) 8%, var(--w-surface)); color: var(--w-accent); }
.hp-empty-ic .ic svg { width: 18px; height: 18px; }
.hp-empty b { color: var(--w-ink); font-size: 14px; font-weight: 600; }
.hp-empty > span { color: var(--w-muted); font-size: 13px; max-width: 34ch; }
.hp-empty .w-btn { width: auto; margin-top: 8px; }

/* Add hosting dialog (same words and flow as the Sites page's) */
.hp-modal { position: fixed; inset: 0; z-index: 60; display: none; align-items: center; justify-content: center;
  padding: 1rem; background: color-mix(in srgb, var(--w-ink) 45%, transparent); }
.hp-modal-box { background: var(--w-surface); border: 1px solid var(--w-border); border-radius: var(--w-radius);
  box-shadow: var(--w-shadow); max-width: 380px; width: 100%; padding: 1.4rem 1.5rem; }
.hp-modal-box h3 { margin: 0 0 0.6rem; color: var(--w-ink); font-size: 1.05rem; }
.hp-modal-box p { margin: 0 0 1.2rem; color: var(--w-body); font-size: 0.88rem; line-height: 1.5; }
.hp-modal-actions { display: flex; gap: 0.6rem; justify-content: flex-end; }
.hp-modal-actions .w-btn { width: auto; }

@media (prefers-reduced-motion: reduce) {
  .hc-fill, .hc-chart.is-rising .hc-bar:not(.is-zero) { animation: none; }
}
@media (max-width: 1080px) {
  .home-top, .home-bottom { grid-template-columns: minmax(0, 1fr); }
  .hs-strip, .hs-strip.hs-cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hs-step:nth-child(3) { border-left: 0; }
  .hs-step:nth-child(3)::before { display: none; }
  .hs-step:nth-child(n+3) { border-top: 1px solid var(--w-border); }
}

.dark-only { display: none; }
body.dark .light-only, html.dark .light-only { display: none; }
body.dark .dark-only, html.dark .dark-only { display: inline; }

@media (max-width: 860px) {
  .app { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap;
    align-items: center; padding: 0.75rem 1rem; border-right: none; border-bottom: 1px solid var(--w-border); }
  .sidebar-header { margin: 0; flex: 1 1 auto; }
  .sidebar-header .w-btn-primary { width: auto; }
  /* min-width:0 (not the shell's copy-pasted default): without it the row of
     nav items sets the sidebar's own width and the WHOLE page scrolls
     sideways on a phone instead of just this row. */
  .sidebar { min-width: 0; }
  .sidebar-nav { display: flex; flex: 0 0 100%; min-width: 0; max-width: 100%;
    overflow-x: auto; gap: 0.3rem; margin-top: 0.6rem; }
  .sidebar-nav li { margin: 0; }
  .nav-group { display: none; }
  .sidebar-footer { display: flex; flex: 0 0 100%; min-width: 0; max-width: 100%; gap: 0.3rem; overflow-x: auto;
    margin-top: 0.45rem; padding-top: 0.5rem; -webkit-overflow-scrolling: touch; }
  .sidebar-footer .footer-item { width: auto; white-space: nowrap; padding: 0.45rem 0.6rem; }
  .sidebar-footer .toggle-pill { margin-left: 0.4rem; }
  .sidebar-nav, .sidebar-footer {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 22px), transparent 100%);
    mask-image: linear-gradient(to right, #000 calc(100% - 22px), transparent 100%);
    scrollbar-width: thin; scrollbar-color: var(--w-border) transparent;
  }
  .sidebar-nav::-webkit-scrollbar, .sidebar-footer::-webkit-scrollbar { height: 3px; }
  .sidebar-nav::-webkit-scrollbar-thumb, .sidebar-footer::-webkit-scrollbar-thumb {
    background: var(--w-border); border-radius: 999px; }
  /* max-width:100%, not the shell's `none`: the paste-in line is one long
     unbreakable string, and `none` let it set the width of the whole page so
     a phone scrolled sideways. The line scrolls inside its own box instead. */
  .main, .main.is-roofer { padding: 1.25rem 1rem 3rem; max-width: 100%; min-width: 0; }
  .home-actions .w-btn { flex: 1 1 100%; }
  .hc-big-num { font-size: 42px; }
  .hp { padding: 18px 16px; }
}
@media (max-width: 460px) {
  .hs-strip, .hs-strip.hs-cols-3, .hs-strip.hs-cols-2 { grid-template-columns: minmax(0, 1fr); }
  .hs-step + .hs-step { border-left: 0; border-top: 1px solid var(--w-border); }
  .hs-step + .hs-step::before { display: none; }
  .home-head-btns { width: 100%; }
  .home-head-btns .w-btn { flex: 1; justify-content: center; }
  .hp-r-trial { grid-template-columns: minmax(0, 1fr) auto; }
  .hp-r-trial .hp-mini-btn { grid-column: 1 / -1; justify-self: start; }
  .hp-r { gap: 10px; }
  .hp-prog { width: 44px; }
}

/* ===================== 13 Nov 2026: Home + Analytics pieces =====================
 * Hannah's approved mock-ups (.tmp/mockups-dashboard-2026-11-13, mock-new.css),
 * built from this file's own tokens: the blue top card, the starter searches,
 * Run again and a running search's bar on Recent searches, the "Businesses
 * found" tile, and the "Where you've searched" map (also on Analytics). */

/* "Businesses found" opens the Analytics page: the tile is a link that looks like the others. */
a.hs-step-link { display: block; text-decoration: none; color: inherit; }
a.hs-step-link:hover .hs-v { color: var(--w-accent); }
a.hs-step-link:focus-visible { outline: 2px solid var(--w-accent); outline-offset: -2px; border-radius: 10px; }

/* ---------- top card ("For you" / "Next search") ---------- */
.hi-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 20px;
  background: var(--w-upsell-grad); color: #fff; border-radius: 14px; padding: 22px 26px; margin-bottom: 16px;
  box-shadow: 0 10px 28px rgba(47, 75, 216, 0.22); }
.hi-eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  color: rgba(255,255,255,0.85); margin-bottom: 6px; }
.hi-eyebrow svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.hi-big { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; text-wrap: balance; }
.hi-sub { font-size: 13.5px; color: rgba(255,255,255,0.82); margin-top: 4px; }
.hi-btn { display: inline-flex; align-items: center; gap: 8px; background: #fff; color: var(--w-accent);
  font: 600 14px/1 var(--w-font); padding: 12px 18px; border-radius: 9px; text-decoration: none; white-space: nowrap; }
.hi-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ---------- starter searches in an empty Recent searches ---------- */
.hp-start-note { color: var(--w-muted); font-size: 13px; margin: 2px 0 10px; }
.hp-starters { display: grid; gap: 8px; }
.hp-starter { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px;
  border: 1px solid var(--w-border); border-radius: 10px; padding: 11px 14px; text-decoration: none; }
.hp-starter:hover { border-color: var(--w-accent); }
.hp-starter b { color: var(--w-ink); font-size: 14px; font-weight: 600; display: block; }
.hp-starter span { color: var(--w-muted); font-size: 12.5px; }

/* ---------- Recent searches: Run again, and a running search ---------- */
.hp-r2 { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 14px; align-items: center;
  padding: 12px 2px; border-top: 1px solid var(--w-border); }
.hp-r2:first-child { border-top: 0; }
.hp-r2 a.hp-title { text-decoration: none; min-width: 0; }
.hp-r2 a.hp-title:hover b { color: var(--w-accent); }
.hp-r2 b { color: var(--w-ink); font-weight: 600; font-size: 14px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-go-link { display: inline-flex; }
.hp-go-link:hover .hp-go { stroke: var(--w-accent); }
.hp-again { display: inline-flex; align-items: center; gap: 5px; font: 600 12px/1.2 var(--w-font); color: var(--w-body);
  border: 1px solid var(--w-border); border-radius: 7px; padding: 4px 8px; text-decoration: none; white-space: nowrap; }
.hp-again:hover { border-color: var(--w-accent); color: var(--w-accent); }
.hp-again svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; }
.hp-run { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; margin-top: -2px; }
.hp-run-bar { height: 6px; border-radius: 99px; background: color-mix(in srgb, var(--w-accent) 10%, var(--w-surface)); overflow: hidden; }
.hp-run-bar i { display: block; height: 100%; background: var(--w-accent); border-radius: 99px; }
.hp-run-n { font-size: 12.5px; color: var(--w-body); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hp-run a { color: var(--w-accent); font-weight: 600; font-size: 12.5px; text-decoration: none; white-space: nowrap; }

/* ---------- "Where you've searched" map (Analytics only since 15 Nov 2026) ---------- */
.hm-card { margin-bottom: 16px; }
.hm-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.hm-head-right { display: flex; align-items: center; gap: 12px; }
.hm-count { color: var(--w-muted); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Custom chevron, never touching the border (Hannah, 13 Nov): appearance none + 32px on the right. */
.hm-select { font: 500 13px/1.2 var(--w-font); color: var(--w-ink); border: 1px solid var(--w-border); border-radius: 8px;
  padding: 7px 32px 7px 11px; -webkit-appearance: none; appearance: none; cursor: pointer;
  background: var(--w-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234b5063' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 14px 14px; }
.hm-select:focus-visible { outline: 2px solid var(--w-accent); outline-offset: 1px; }
.hm-body { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 22px; margin-top: 14px; align-items: start; }
.hm-map { position: relative; min-width: 0; }
.hm-map svg { width: 100%; height: auto; display: block; }
.hm-map path { stroke: var(--w-surface); stroke-width: 1.2; cursor: pointer; transition: opacity .15s; }
.hm-map path:hover { opacity: 0.8; }
.hm-map path, .hm-map path.s0 { fill: #e9ebf2; }
.hm-map path.s1 { fill: #c9d2f6; }
.hm-map path.s2 { fill: #98a9ee; }
.hm-map path.s3 { fill: #5f78e2; }
.hm-map path.s4 { fill: #2f4bd8; }
.hm-map path.is-picked { stroke: var(--w-ink); stroke-width: 2; }
.hm-map .an-dot circle.ring { fill: none; stroke: var(--w-ink); stroke-width: 2; }
.hm-map .an-dot circle.core { fill: #f2b84b; stroke: var(--w-ink); stroke-width: 1.5; }
.hm-map .an-dot text { font: 600 13px/1 var(--w-font); fill: var(--w-ink); paint-order: stroke; stroke: #fff; stroke-width: 4px; }
.hm-tip { position: absolute; pointer-events: none; background: var(--w-ink); color: #fff; font-size: 12.5px; font-weight: 500;
  padding: 6px 9px; border-radius: 7px; white-space: nowrap; transform: translate(-50%, calc(-100% - 10px)); }
.hm-tip[hidden] { display: none; }
.hm-legend { display: flex; align-items: center; gap: 8px; color: var(--w-muted); font-size: 12px; margin-top: 8px; }
.hm-legend i { display: block; width: 110px; height: 7px; border-radius: 99px;
  background: linear-gradient(90deg, #e9ebf2, #c9d2f6, #98a9ee, #5f78e2, #2f4bd8); }

@media (max-width: 860px) {
  .hi-card { grid-template-columns: 1fr; padding: 20px; }
  .hi-btn { justify-content: center; }
  .hm-body { grid-template-columns: 1fr; }
  .hp-r2 { grid-template-columns: minmax(0, 1fr) auto; }
  .hp-r2 .hp-when, .hp-r2 .hp-go-link, .hp-r2 > span:empty { display: none; }
}

/* ---------- 15 Nov 2026, approved second pass ----------
 * The graph stays, the map lives on Analytics. Every row ends level: a card
 * beside a taller one stretches to the same bottom line. Blue is kept for the
 * top card, the things you press and the busiest day; amber only for a
 * preview about to come down. */

/* ---- top row: Lead credits | Lead credits used ---- */
.home-top { align-items: stretch; }
.hc-credits { display: flex; flex-direction: column; }
/* the balance sits in the middle of the room above the meters */
.hc-hero { margin-block: auto; padding-block: 6px; }
.hc-hero .hc-big { margin-top: 12px; }
.hc-credits .hc-meters { margin-top: 0; padding-top: 18px; }
/* what the balance buys, and the way to more */
.hc-foot { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--w-border);
  display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.hc-foot-line { font-size: 12.5px; line-height: 1.45; color: var(--w-muted); text-wrap: balance; min-width: 0; }
.hc-more { flex: none; font: 600 13px/1 var(--w-font); padding: 9px 13px; border-radius: 9px; white-space: nowrap;
  text-decoration: none; color: var(--w-accent); background: var(--w-accent-soft);
  transition: background .15s; }
.hc-more:hover { background: color-mix(in srgb, var(--w-accent) 15%, var(--w-surface)); }
.hc-more:focus-visible { outline: 2px solid var(--w-accent); outline-offset: 2px; }
/* too few credits for another search: the button is the solid one */
.hc-more.is-low { background: var(--w-accent); color: var(--w-accent-ink); }
.hc-more.is-low:hover { background: color-mix(in srgb, var(--w-accent) 88%, #000); }
/* the graph card fills its height, so both cards share one bottom line */
.hc-used { display: flex; flex-direction: column; }
.hc-used #hc-chart-host { margin-top: auto; }

/* ---- bottom row: Recent searches | Hosting trials, Campaigns ---- */
.home-bottom { align-items: stretch; }
.home-stack { display: flex; flex-direction: column; gap: 16px; }
.home-stack > .hp:last-child { flex: 1; }
#home-recent-searches { display: flex; flex-direction: column; }
#home-recent-searches .hp-rows { flex: 1; justify-content: space-between; }
/* "Add hosting" is the one thing to press in its card */
.hp-r-trial .hp-mini-btn { background: var(--w-accent-soft); border-color: transparent; color: var(--w-accent); padding: 6px 11px; }
.hp-r-trial .hp-mini-btn:hover { background: color-mix(in srgb, var(--w-accent) 15%, var(--w-surface)); border-color: transparent; }

/* the blue card's lines break evenly, never leaving one word alone */
.hi-big, .hi-sub { text-wrap: balance; }

@media (max-width: 460px) {
  .hc-foot { flex-direction: column; align-items: stretch; }
  .hc-more { text-align: center; padding-block: 11px; }
}

/* the graph reads as a graph: days with searches are a clear tint, the
 * busiest day stays the one solid bar */
.hc-bar:not(.is-zero):not(.is-peak) { background: color-mix(in srgb, var(--w-accent) 30%, var(--w-surface)); }
.hc-bar:not(.is-zero):not(.is-peak):hover { background: color-mix(in srgb, var(--w-accent) 48%, var(--w-surface)); }

/* days left: amber only when a preview is about to come down, quiet otherwise
 * (a blue pill beside the blue button read as two buttons) */
.hp-days:not(.is-soon) { background: color-mix(in srgb, var(--w-ink) 5%, var(--w-surface)); color: var(--w-body); }
