/*
 * Cafe AI Visibility - UI styles.
 *
 * DESIGN CHOICES
 * - One hand-written stylesheet, no Bootstrap/Tailwind. WHY: no build step, no CDN at
 *   runtime (works offline in a cafe with bad Wi-Fi), and the whole look fits in one file.
 *   GIVEN UP: ready-made components. We need about eight; writing them is cheaper.
 * - System font stack, no Google Fonts. WHY: zero network requests, instant render on phones.
 * - Mobile first: base rules target a ~380px phone; the @media block widens for laptops.
 *   The main user shows results on her phone across the counter.
 * - Colours: warm "coffee" accent plus a traffic-light scale for scores, so an owner reads
 *   red/amber/green before reading any number.
 */

:root {
    --ink: #1c1917;
    --ink-2: #57534e;
    --ink-3: #a8a29e;
    --bg: #faf7f2;
    --card: #ffffff;
    --line: #ece7df;
    --accent: #b45309;          /* roasted-coffee orange */
    --accent-ink: #ffffff;
    --accent-soft: #fef3e2;
    --good: #15803d;
    --good-soft: #dcfce7;
    --mid: #c2410c;
    --mid-soft: #ffedd5;
    --low: #b91c1c;
    --low-soft: #fee2e2;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(28, 25, 23, .04), 0 4px 16px rgba(28, 25, 23, .06);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- top bar ---------- */
.topbar {
    background: var(--card);
    border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 10;
}
.topbar-inner {
    max-width: 960px; margin: 0 auto; padding: 12px 18px;
    display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; flex: none; }
.brand-mark img { width: 34px; height: 34px; display: block; }
.brand small { display: block; font-weight: 500; color: var(--ink-3); font-size: .72rem; margin-top: -3px; }

.container { max-width: 960px; margin: 0 auto; padding: 20px 18px 60px; }

/* ---------- hero ---------- */
.hero { padding: 18px 0 8px; }
.hero h1 { font-size: 1.7rem; line-height: 1.2; margin: 0 0 8px; letter-spacing: -.02em; }
.hero p { color: var(--ink-2); margin: 0; max-width: 560px; }
.engines-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

/* ---------- cards ---------- */
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
    margin-top: 16px;
}
.card h2 { font-size: 1.02rem; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.card .sub { color: var(--ink-2); font-size: .88rem; margin: -6px 0 12px; }

/* ---------- form ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.field .opt { color: var(--ink-3); font-weight: 400; }
.field input {
    width: 100%; padding: 13px 14px; font-size: 1rem;
    border: 1px solid #d6d0c6; border-radius: 10px; background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(180, 83, 9, .15); }
.field .hint { color: var(--ink-3); font-size: .8rem; margin-top: 5px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 14px 18px; font-size: 1rem; font-weight: 600;
    border: 0; border-radius: 10px; cursor: pointer;
    background: var(--accent); color: var(--accent-ink);
    transition: transform .05s, filter .15s;
}
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: translateY(1px); }
.btn-ghost {
    background: transparent; color: var(--accent); border: 1px solid var(--line);
    width: auto; padding: 8px 12px; font-size: .85rem;
}

.alert { padding: 12px 14px; border-radius: 10px; font-size: .92rem; margin-top: 16px; }
.alert-error { background: var(--low-soft); color: var(--low); }
.alert-warn { background: var(--mid-soft); color: var(--mid); }

/* ---------- chips / badges ---------- */
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600;
    background: var(--accent-soft); color: var(--accent);
}
.chip.muted { background: #f1efeb; color: var(--ink-2); }
.badge {
    display: inline-block; min-width: 46px; text-align: center;
    padding: 3px 8px; border-radius: 8px; font-weight: 700; font-size: .85rem;
}
.good { color: var(--good); } .bg-good { background: var(--good-soft); color: var(--good); }
.mid  { color: var(--mid); }  .bg-mid  { background: var(--mid-soft);  color: var(--mid); }
.low  { color: var(--low); }  .bg-low  { background: var(--low-soft);  color: var(--low); }

/* ---------- recent checks ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list li + li { border-top: 1px solid var(--line); }
.list a.row { display: flex; align-items: center; gap: 12px; padding: 12px 2px; color: var(--ink); }
.list a.row:hover { text-decoration: none; background: #fcfbf8; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-meta { color: var(--ink-3); font-size: .8rem; }
.empty { color: var(--ink-3); text-align: center; padding: 18px 0; font-size: .92rem; }

/* ---------- results header ---------- */
.result-head { display: flex; flex-direction: column; gap: 6px; }
.result-head h1 { margin: 0; font-size: 1.45rem; letter-spacing: -.01em; }
.result-head .addr { color: var(--ink-2); font-size: .9rem; }
.result-head .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 4px; }

/* ---------- score ring ----------
 * Pure CSS conic-gradient: no chart library for one number.
 * --p is set inline from the server (0-100); --c picks the traffic-light colour.
 */
.score-wrap { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.ring {
    --p: 0; --c: var(--low);
    width: 132px; height: 132px; border-radius: 50%; flex: none;
    background: conic-gradient(var(--c) calc(var(--p) * 1%), #f1ede6 0);
    display: grid; place-items: center;
}
.ring.good { --c: var(--good); } .ring.mid { --c: var(--mid); } .ring.low { --c: var(--low); }
.ring-inner {
    width: 104px; height: 104px; border-radius: 50%; background: var(--card);
    display: grid; place-items: center; text-align: center;
}
.ring-value { font-size: 2rem; font-weight: 800; line-height: 1; color: var(--ink); }
.ring-label { font-size: .7rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.score-text { flex: 1; min-width: 200px; }
.score-text .big { font-size: 1.08rem; font-weight: 600; margin: 0 0 4px; }
.score-text p { margin: 0; color: var(--ink-2); font-size: .92rem; }

/* ---------- horizontal bars (engines + competitors) ---------- */
.bars { display: flex; flex-direction: column; gap: 12px; }
.bar-row .bar-top { display: flex; justify-content: space-between; font-size: .9rem; margin-bottom: 5px; gap: 8px; }
.bar-row .bar-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-row .bar-val { color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bar { height: 10px; background: #f1ede6; border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 999px; background: #a8a29e; min-width: 2px; }
.bar-row.you .bar > span { background: var(--accent); }
.bar-row.you .bar-name { color: var(--accent); }
.engine-icon { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px;
    background: #f1efeb; font-size: .75rem; margin-right: 6px; }

/* ---------- fix list ---------- */
.fixes { list-style: none; margin: 0; padding: 0; counter-reset: fix; }
.fixes li { display: flex; gap: 12px; padding: 10px 0; }
.fixes li + li { border-top: 1px dashed var(--line); }
.fixes li::before {
    counter-increment: fix; content: counter(fix);
    flex: none; width: 26px; height: 26px; border-radius: 50%;
    background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: .85rem;
    display: grid; place-items: center;
}

/* ---------- profile health ---------- */
.health { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.health-item { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.health-item .k { color: var(--ink-3); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }
.health-item .v { font-weight: 700; font-size: 1.05rem; margin-top: 2px; word-break: break-word; }
.health-item .v.small { font-size: .85rem; font-weight: 600; }

/* ---------- evidence (raw answers) ---------- */
details.answer { border: 1px solid var(--line); border-radius: 10px; margin-top: 8px; background: #fff; }
details.answer summary {
    list-style: none; cursor: pointer; padding: 11px 12px; display: flex; gap: 10px; align-items: center;
}
details.answer summary::-webkit-details-marker { display: none; }
details.answer summary .q { flex: 1; font-size: .9rem; }
details.answer[open] summary { border-bottom: 1px solid var(--line); }
details.answer .body { padding: 10px 12px; }
details.answer pre {
    white-space: pre-wrap; font-family: inherit; font-size: .86rem; color: var(--ink-2);
    margin: 8px 0 0; max-height: 320px; overflow: auto;
}
.names { display: flex; flex-wrap: wrap; gap: 6px; }
.name-tag { font-size: .78rem; padding: 3px 8px; border-radius: 6px; background: #f1efeb; color: var(--ink-2); }
.name-tag.you { background: var(--accent); color: #fff; font-weight: 700; }
.name-tag.near { background: var(--accent-soft); color: var(--accent); }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dot.hit { background: var(--good); } .dot.miss { background: #d6d3d1; } .dot.fail { background: var(--low); }

.footnote { color: var(--ink-3); font-size: .78rem; margin-top: 22px; line-height: 1.45; }

/* ---------- loading overlay (shown while an audit runs) ---------- */
.overlay {
    position: fixed; inset: 0; background: rgba(250, 247, 242, .94);
    display: none; place-items: center; z-index: 50; text-align: center; padding: 24px;
}
.overlay.show { display: grid; }
.spinner {
    width: 54px; height: 54px; border-radius: 50%; margin: 0 auto 18px;
    border: 5px solid var(--accent-soft); border-top-color: var(--accent);
    animation: spin .9s linear infinite;
}
.overlay h3 { margin: 0 0 6px; }
.overlay p { color: var(--ink-2); margin: 0; min-height: 1.5em; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- wider screens ---------- */
@media (min-width: 760px) {
    .hero h1 { font-size: 2.1rem; }
    .grid-2 { display: grid; grid-template-columns: 1.1fr .9fr; gap: 16px; align-items: start; }
    .grid-2 > .card { margin-top: 16px; }
    .health { grid-template-columns: repeat(4, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    .spinner { animation: none; }
}

/* ---------- login, session features, report actions (Day 3) ---------- */
.topbar-actions { display: flex; gap: 8px; align-items: center; }
.alert-good { background: var(--good-soft); color: var(--good); }

.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: 100%; max-width: 380px; margin: 0; }

/* Archive link: intentionally small and quiet so it isn't tapped during a demo. */
.quiet-link { display: block; text-align: center; margin-top: 26px; font-size: .8rem; color: var(--ink-3); }

.archive-banner { background: #f1efeb; color: var(--ink-2); }

/* Report actions under the score: Download PDF + Email. */
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; margin-top: 16px; }
.actions .btn { width: auto; }
.email-form { display: flex; gap: 8px; flex: 1; min-width: 260px; }
.email-form input {
    flex: 1; min-width: 0; padding: 11px 12px; font-size: .95rem;
    border: 1px solid #d6d0c6; border-radius: 10px;
}
.btn-secondary { background: #fff; color: var(--ink); border: 1px solid #d6d0c6; }

/* Evidence collapsed by default: it's for us, not for the cafe owner across the counter. */
details.evidence > summary {
    list-style: none; cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: 8px;
}
details.evidence > summary::-webkit-details-marker { display: none; }
details.evidence > summary::before { content: "▸"; color: var(--ink-3); transition: transform .15s; }
details.evidence[open] > summary::before { transform: rotate(90deg); }
details.evidence .evidence-body { margin-top: 12px; }

/* =====================================================================
 * Results page v2 - "pitch dashboard" look.
 * Hierarchy, top to bottom: dark hero with the score (the one number the owner remembers)
 * -> KPI strip -> leaderboard -> engines -> fixes -> profile -> evidence (collapsed).
 * ===================================================================== */

.hero-band {
    margin: -20px -18px 0;                  /* bleed to the container edges on phones */
    padding: 26px 18px 30px;
    background: radial-gradient(1200px 400px at 85% -10%, #9a4a12 0%, transparent 60%),
                linear-gradient(135deg, #2a1a12 0%, #3b2418 55%, #5a2f14 100%);
    color: #fff;
}
.hero-band-inner { max-width: 960px; margin: 0 auto; display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.hero-band .eyebrow { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: #f5c99b; font-weight: 700; }
.hero-band h1 { margin: 4px 0 6px; font-size: 1.7rem; line-height: 1.15; letter-spacing: -.02em; }
.hero-band .addr { color: rgba(255,255,255,.72); font-size: .86rem; }
.hero-band .meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.hero-band .pill {
    font-size: .74rem; font-weight: 600; padding: 4px 10px; border-radius: 999px;
    background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.18);
}
.hero-band .pill.warn { background: rgba(251,146,60,.22); border-color: rgba(251,146,60,.5); }
.hero-band .pill.bad  { background: rgba(248,113,113,.25); border-color: rgba(248,113,113,.5); }
.hero-text { flex: 1; min-width: 240px; }
.hero-verdict { margin-top: 14px; font-size: 1.02rem; color: #fff; max-width: 520px; }
.hero-verdict strong { color: #f5c99b; }

/* Score ring on dark background */
.ring.on-dark { width: 150px; height: 150px; background: conic-gradient(var(--c) calc(var(--p) * 1%), rgba(255,255,255,.14) 0); }
.ring.on-dark.good { --c: #4ade80; } .ring.on-dark.mid { --c: #fb923c; } .ring.on-dark.low { --c: #f87171; }
.ring.on-dark .ring-inner { width: 120px; height: 120px; background: #2f1d14; }
.ring.on-dark .ring-value { color: #fff; font-size: 2.4rem; }
.ring.on-dark .ring-label { color: rgba(255,255,255,.6); }

/* KPI strip overlapping the hero edge - gives depth without images */
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: -18px; position: relative; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow); min-width: 0; }
.kpi .k { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 700; }
.kpi .v { font-size: 1.45rem; font-weight: 800; line-height: 1.2; margin-top: 2px; letter-spacing: -.01em; }
.kpi .s { font-size: .78rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.section-title { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); font-weight: 800; margin: 0 0 12px; }

/* Leaderboard */
.board { list-style: none; margin: 0; padding: 0; }
.board li { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 9px 8px; border-radius: 10px; }
.board li + li { margin-top: 2px; }
.board .pos { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .78rem; font-weight: 800; background: #f1ede6; color: var(--ink-2); }
.board li:nth-child(-n+3) .pos { background: #fde7c7; color: #92400e; }
.board .who { min-width: 0; }
.board .who .n { font-weight: 600; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board .track { height: 7px; background: #f1ede6; border-radius: 999px; margin-top: 5px; overflow: hidden; }
.board .track > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #d6cfc4, #b8ad9e); min-width: 3px; }
.board .val { font-weight: 800; font-variant-numeric: tabular-nums; font-size: .95rem; color: var(--ink-2); }
.board li.you { background: var(--accent-soft); outline: 1.5px solid #f3c48a; }
.board li.you .pos { background: var(--accent); color: #fff; }
.board li.you .n { color: var(--accent); }
.board li.you .track > span { background: linear-gradient(90deg, #f59e0b, #b45309); }
.board li.you .val { color: var(--accent); }
.board .tag-near { font-size: .66rem; font-weight: 700; color: var(--ink-3); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; margin-left: 6px; vertical-align: 1px; }
details.more > summary { list-style: none; cursor: pointer; color: var(--accent); font-weight: 600; font-size: .86rem; padding: 8px; }
details.more > summary::-webkit-details-marker { display: none; }
details.more[open] > summary { display: none; }

/* Engine cards */
.engines { display: grid; grid-template-columns: 1fr; gap: 10px; }
.engine-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; gap: 12px; align-items: center; }
.engine-logo { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; color: #fff; flex: none; }
.engine-logo.openai { background: #10a37f; } .engine-logo.gemini { background: linear-gradient(135deg, #4285f4, #9b72cb); } .engine-logo.perplexity { background: #1f6f78; }
.engine-card .meta { flex: 1; min-width: 0; }
.engine-card .name { font-weight: 700; }
.engine-card .detail { font-size: .8rem; color: var(--ink-2); }
.engine-card .pct { font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.engine-card.na { opacity: .6; }
.engine-card.na .pct { font-size: .85rem; font-weight: 700; color: var(--ink-3); }
.engine-logo.google_ai_overview, .engine-logo.google_ai_mode { background: #4285f4; font-size: .85rem; }

/* Where AI gets its information (cited sites). Name | bar | count; wraps cleanly at 360px. */
.source-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.source-list li { display: grid; grid-template-columns: minmax(0, 9rem) 1fr auto; gap: 10px; align-items: center; font-size: .9rem; }
.source-list .src-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.source-list .src-bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.source-list .src-bar span { display: block; height: 100%; background: var(--ink-3); border-radius: 4px; }
.source-list li.yours .src-bar span { background: var(--accent, #d9480f); }
.source-list li.yours .src-name { color: var(--accent, #d9480f); }
.src-group { margin: 12px 0 6px; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.source-list li { grid-template-columns: minmax(0, 14rem) 1fr auto; }
.source-list .src-name .src-you { margin-left: 6px; font-size: .68rem; vertical-align: 1px; }
.source-list .src-count { color: var(--ink-2); font-variant-numeric: tabular-nums; font-size: .8rem; }

/* Fix cards */
.fix-list { list-style: none; margin: 0; padding: 0; counter-reset: fx; display: grid; gap: 10px; }
.fix-list li { counter-increment: fx; display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start;
    border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 10px; padding: 12px 14px; background: #fffdf9; }
.fix-list li::before { content: counter(fx); width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: #fff;
    font-weight: 800; display: grid; place-items: center; font-size: .9rem; }
.fix-list li:first-child { background: #fff7ed; }
.fix-list .first-tag { display: inline-block; font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
    color: #9a3412; background: #ffedd5; border-radius: 5px; padding: 1px 6px; margin-bottom: 4px; }

/* Profile tiles with status pills */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; gap: 10px; align-items: center; }
.tile .ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: #f6f2ec; font-size: 1rem; flex: none; }
.tile .k { font-size: .72rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.tile .v { font-weight: 700; }
.status { font-size: .74rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.status.ok { background: var(--good-soft); color: var(--good); }
.status.bad { background: var(--low-soft); color: var(--low); }
.status.meh { background: var(--mid-soft); color: var(--mid); }

@media (min-width: 760px) {
    .hero-band { margin: -20px calc(50% - 50vw) 0; padding: 34px 18px 44px; }
    .hero-band h1 { font-size: 2.1rem; }
    .kpis { grid-template-columns: repeat(4, 1fr); margin-top: -26px; }
    .engines { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
    .tiles { grid-template-columns: repeat(3, 1fr); }
    .split { display: grid; grid-template-columns: 1.25fr .75fr; gap: 16px; align-items: start; }
    .split > .card { margin-top: 16px; }
}

/* Full-bleed hero uses 100vw, which includes the scrollbar width on Windows - clip the overflow. */
body { overflow-x: hidden; }

/* ---------- customer questions ---------- */
.qlist { list-style: none; margin: 0; padding: 0; }
.qlist li { padding: 10px 0; }
.qlist li + li { border-top: 1px solid var(--line); }
.q-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.q-text { font-size: .9rem; font-weight: 600; }
.q-top .status { flex: none; white-space: nowrap; }
.q-leader { font-size: .8rem; color: var(--ink-2); margin-top: 3px; }
.q-leader strong { color: var(--ink); }

/* ---------- AI recommendations ---------- */
.advice-summary {
    margin: 14px 0 4px; padding: 12px 14px; border-radius: 10px;
    background: linear-gradient(135deg, #fff7ed, #fffbeb); border: 1px solid #fde7c7;
    font-size: .98rem; color: var(--ink);
}
.recs { display: grid; gap: 12px; margin-top: 12px; }
.rec { border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: #fff; border-top: 4px solid #d6d3d1; }
.rec.high { border-top-color: var(--accent); }
.rec.medium { border-top-color: #f59e0b; }
.rec.low { border-top-color: #a3a3a3; }
.rec-head { display: flex; gap: 10px; align-items: center; }
.rec-head h3 { margin: 0; font-size: 1.05rem; line-height: 1.3; }
.rec-num { width: 28px; height: 28px; border-radius: 8px; background: var(--ink); color: #fff; font-weight: 800;
    display: grid; place-items: center; flex: none; font-size: .85rem; }
.rec-tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 6px; }
.impact, .who { font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.impact.high { background: #ffedd5; color: #9a3412; }
.impact.medium { background: #fef3c7; color: #92400e; }
.impact.low { background: #f1efeb; color: var(--ink-2); }
.who.agency { background: var(--good-soft); color: var(--good); }
.who.owner { background: #eef2ff; color: #3730a3; }
.rec-row { margin-top: 10px; }
.rec-row .lbl { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 800; }
.rec-row p { margin: 3px 0 0; font-size: .92rem; color: var(--ink-2); }
.steps { margin: 6px 0 0; padding: 0; list-style: none; }
.steps li { position: relative; padding: 4px 0 4px 26px; font-size: .92rem; }
.steps li::before { content: "✓"; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 5px;
    background: var(--accent-soft); color: var(--accent); font-size: .72rem; font-weight: 800; display: grid; place-items: center; }

@media (min-width: 760px) {
    .recs { grid-template-columns: 1fr 1fr; }
}

/* =====================================================================
 * ZERO-CLICK MEDIA THEME (overrides everything above).
 * Food-neutral, appetising palette: deep charcoal + tomato red + saffron. Works for a dosa
 * place, a biryani house or a cafe equally - the coffee browns didn't.
 * Kept as an override block (not a rewrite) so earlier component styles stay valid.
 * ===================================================================== */
:root {
    --ink: #1f1b18;
    --ink-2: #57514b;
    --ink-3: #9c958e;
    --bg: #faf7f3;
    --line: #ece6de;
    --accent: #d9480f;          /* tomato */
    --accent-soft: #fff1ea;
    --saffron: #f59f00;
    --charcoal: #1c1917;
}

.btn { box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 6px 14px rgba(217,72,15,.18); }
.btn-ghost, .btn-secondary, .btn-light { box-shadow: none; }
.field input:focus { box-shadow: 0 0 0 3px rgba(217,72,15,.15); }

/* Hero: charcoal with a warm tomato/saffron glow */
.hero-band {
    background:
        radial-gradient(700px 300px at 90% 0%, rgba(245,159,0,.35) 0%, transparent 60%),
        radial-gradient(600px 300px at 10% 120%, rgba(217,72,15,.35) 0%, transparent 60%),
        linear-gradient(160deg, #1c1917 0%, #292524 60%, #3a2a22 100%);
}
.hero-band .eyebrow { color: #ffc078; }
.hero-headline { margin: 16px 0 4px; font-size: 1.25rem; font-weight: 700; line-height: 1.3; color: #fff; }
.hero-headline strong { color: #ffc078; }
.hero-verdict { margin-top: 4px; color: rgba(255,255,255,.78); }
.ring.on-dark .ring-inner { background: #231f1c; }
.ring.on-dark.good { --c: #51cf66; } .ring.on-dark.mid { --c: #ffa94d; } .ring.on-dark.low { --c: #ff6b6b; }

/* Top actions */
.top-actions { margin-top: 18px; }
.action-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.action { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 12px; border: 1px solid var(--line);
    color: var(--ink); transition: border-color .15s, transform .15s, box-shadow .15s; background: #fff; }
.action:hover { text-decoration: none; border-color: #ffc9a8; box-shadow: 0 6px 16px rgba(31,27,24,.06); transform: translateY(-1px); }
.action-num { width: 32px; height: 32px; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 800;
    display: grid; place-items: center; flex: none; }
.action-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.action-title { font-weight: 700; line-height: 1.3; }
.action-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.chev { font-size: 1.4rem; color: var(--ink-3); }

/* Call to action band */
.cta-band {
    margin-top: 16px; border-radius: 16px; padding: 20px; color: #fff;
    background: radial-gradient(500px 200px at 100% 0%, rgba(245,159,0,.45), transparent 60%),
                linear-gradient(135deg, #d9480f, #b02a1a);
    display: flex; gap: 16px; flex-wrap: wrap; align-items: center; justify-content: space-between;
    box-shadow: 0 10px 30px rgba(217,72,15,.25);
}
.cta-text { flex: 1; min-width: 240px; }
.cta-text h2 { margin: 0 0 4px; font-size: 1.25rem; }
.cta-text p { margin: 0; color: rgba(255,255,255,.88); font-size: .92rem; }
.cta-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cta-actions .btn { width: auto; }
.btn-light { background: #fff; color: var(--ink); }
.btn-wa { background: #25d366; color: #fff; box-shadow: none; }
.cta-actions .email-form { min-width: 240px; }
.cta-actions .email-form input { border-color: rgba(255,255,255,.6); }

/* Teaser cards */
.teasers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.teaser { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 14px; background: #fff;
    border: 1px solid var(--line); color: var(--ink); box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.teaser:hover { text-decoration: none; transform: translateY(-2px); border-color: #ffc9a8; }
.t-ic { font-size: 1.3rem; }
.t-title { font-weight: 800; font-size: .95rem; }
.t-line { font-size: .82rem; color: var(--ink-2); line-height: 1.35; }

/* Tabs (only tabbed when JS is on - otherwise every panel shows, nothing is lost) */
.tabs-wrap { margin-top: 22px; scroll-margin-top: 70px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
.tab { flex: none; border: 1px solid var(--line); background: #fff; color: var(--ink-2); border-radius: 999px;
    padding: 8px 14px; font-weight: 700; font-size: .85rem; cursor: pointer; }
.tab.active { background: var(--charcoal); color: #fff; border-color: var(--charcoal); }
body:not(.js) .tabs { display: none; }
body.js .tab-panel { display: none; }
body.js .tab-panel.active { display: block; animation: fadeUp .25s ease-out; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Bars grow when their tab opens (animation replays on display:none -> block) */
.board .track > span, .bar > span { transform-origin: left; animation: grow .8s cubic-bezier(.2,.8,.2,1) both; }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.board li.you .track > span { background: linear-gradient(90deg, #ffa94d, #d9480f); }
.board li.you { outline-color: #ffc9a8; }
.board li:nth-child(-n+3) .pos { background: #fff3bf; color: #a35b00; }

.rec.high { border-top-color: var(--accent); }
.impact.high { background: #ffe8dd; color: #b02a1a; }
.advice-summary { background: linear-gradient(135deg, #fff4e6, #fff9db); border-color: #ffe0b2; }

@media (min-width: 760px) {
    .teasers { grid-template-columns: repeat(4, 1fr); }
    .hero-headline { font-size: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
    .board .track > span, .bar > span, body.js .tab-panel.active { animation: none; }
}

.hero h1 .hl { color: var(--accent); }

/* ---------- v3: photo header, progress chart, effort/cost tags ---------- */
/* Photo header: the business's own Google photo under a dark gradient so white text stays legible. */
.hero-band.has-photo {
    background:
        linear-gradient(180deg, rgba(20,16,14,.55) 0%, rgba(20,16,14,.88) 70%, rgba(20,16,14,.96) 100%),
        var(--photo) center / cover no-repeat,
        #1c1917;
}
.hero-band .pill.up { background: rgba(81,207,102,.22); border-color: rgba(81,207,102,.55); }

.kpi.warn .s { color: var(--low); font-weight: 700; }

.tag-soft { font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #f1efeb; color: var(--ink-2); }

.progress-card { margin-top: 22px; }
.progress-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.chart { display: flex; align-items: flex-end; gap: 14px; height: 170px; margin-top: 14px; padding: 0 4px; overflow-x: auto; }
.chart-col { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 46px; height: 100%; }
.chart-val { font-size: .8rem; font-weight: 800; color: var(--ink-2); }
.chart-bar { flex: 1; width: 30px; background: #f1ede6; border-radius: 8px; display: flex; align-items: flex-end; overflow: hidden; }
.chart-bar > span { display: block; width: 100%; background: #c9bfb3; border-radius: 8px; transform-origin: bottom;
    animation: rise .9s cubic-bezier(.2,.8,.2,1) both; }
.chart-col.current .chart-bar > span { background: linear-gradient(180deg, #ffa94d, #d9480f); }
.chart-col.current .chart-val { color: var(--accent); }
.chart-date { font-size: .74rem; color: var(--ink-3); }
@keyframes rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .chart-bar > span { animation: none; } }

/* ---------- live progress (background checks) ---------- */
.live-dial .ring-inner { animation: pulse 1.6s ease-in-out infinite; }
.live-dial { background: conic-gradient(#ffa94d 0 25%, rgba(255,255,255,.14) 0); animation: spin 1.4s linear infinite; }
.live-dial .ring-inner { animation: spin 1.4s linear infinite reverse; }   /* keep the text upright */
.dots { letter-spacing: 4px; font-size: 1.6rem; color: #ffc078; }
@keyframes pulse { 50% { opacity: .6; } }

.kpi .of { font-size: .95rem; font-weight: 700; color: var(--ink-3); }
.live-card { margin-top: 16px; }
.live-bar { height: 10px; border-radius: 999px; background: #f1ede6; overflow: hidden; }
.live-bar > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #ffa94d, #d9480f);
    transition: width .6s ease; }
.steps-live { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.steps-live li { position: relative; padding-left: 30px; font-size: .92rem; color: var(--ink-3); }
.steps-live li::before { content: ""; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%;
    border: 2px solid #d6d0c6; box-sizing: border-box; }
.steps-live li.done { color: var(--ink); }
.steps-live li.done::before { content: "✓"; border: 0; background: var(--good); color: #fff; font-size: .72rem; font-weight: 800;
    display: grid; place-items: center; }
.steps-live li.active { color: var(--ink); font-weight: 700; }
.steps-live li.active::before { border-color: var(--accent); border-top-color: transparent; animation: spin .9s linear infinite; }

.writing { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 10px; background: #fff7ed;
    color: #9a3412; font-weight: 600; font-size: .92rem; }
.mini-spinner { width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid #ffd8a8; border-top-color: var(--accent);
    animation: spin .9s linear infinite; flex: none; }
.btn.disabled { opacity: .7; cursor: default; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
    .live-dial, .live-dial .ring-inner, .steps-live li.active::before, .mini-spinner { animation: none; }
}

/* ---------- admin menu, users page ---------- */
.admin-menu { position: relative; }
.admin-menu > summary { list-style: none; }
.admin-menu > summary::-webkit-details-marker { display: none; }
.admin-menu-list { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line);
    border-radius: 10px; box-shadow: var(--shadow); padding: 6px; display: grid; min-width: 150px; z-index: 30; }
.admin-menu-list a { padding: 8px 10px; border-radius: 8px; color: var(--ink); font-weight: 600; font-size: .9rem; }
.admin-menu-list a:hover { background: var(--accent-soft); text-decoration: none; }
.user-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 2px; }
.user-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.inline-form { display: flex; gap: 6px; margin: 0; }
.inline-form input { padding: 7px 10px; border: 1px solid #d6d0c6; border-radius: 8px; font-size: .85rem; width: 150px; }
.select { width: 100%; padding: 12px; font-size: 1rem; border: 1px solid #d6d0c6; border-radius: 10px; background: #fff; }

/* ---------- usage page ---------- */
.chart.daily { gap: 4px; height: 150px; }
.chart.daily .chart-col { min-width: 14px; flex: 1; }
.chart.daily .chart-bar { width: 100%; max-width: 22px; }
.chart.daily .chart-bar > span { background: linear-gradient(180deg, #ffa94d, #d9480f); }
.chart.daily .chart-date { font-size: .62rem; }

/* ---------- AEO Kit editor ---------- */
.eyebrow-dark { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 800; }
.kit-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
.kit-actions form { margin: 0; }
.kit-actions .btn { width: auto; }
.kit-actions .hint { font-size: .74rem; color: var(--ink-3); margin-top: 4px; max-width: 220px; }
.todo-list { margin: 0; padding-left: 18px; color: var(--low); }
.todo-list li { margin: 4px 0; }
.todo-list.warn { color: var(--mid); }
.grid-fields { display: grid; grid-template-columns: 1fr; gap: 0 14px; }
.field textarea { width: 100%; padding: 12px; font-size: .95rem; border: 1px solid #d6d0c6; border-radius: 10px; font-family: inherit; }
.chips-add { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chips-add .chip { border: 0; cursor: pointer; }
.nap-select { width: auto; min-width: 140px; padding: 8px; font-size: .88rem; }
.save-bar { position: sticky; bottom: 0; padding: 12px 0; background: linear-gradient(180deg, rgba(250,247,243,0), var(--bg) 40%); }
.copy-btn { float: right; }
@media (min-width: 760px) {
    .grid-fields { grid-template-columns: 1fr 1fr; }
    .grid-fields .field.wide { grid-column: 1 / -1; }
}

/* ---------- "What AI actually says" ---------- */
.quotes { margin-top: 18px; }
.quote { margin: 12px 0 0; padding: 12px 14px; border-radius: 12px; background: #fffaf5; border: 1px solid var(--line);
    border-left: 4px solid var(--accent); }
.quote figcaption { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .85rem; color: var(--ink-2); }
.quote-q { font-weight: 700; color: var(--ink); }
.quote blockquote { margin: 8px 0 0; font-size: .95rem; line-height: 1.55; color: var(--ink-2); font-style: italic; }
.q-rival { font-style: normal; font-weight: 800; color: var(--ink); background: #ffe8dd; padding: 0 3px; border-radius: 4px; }
.q-you { font-style: normal; font-weight: 800; color: #fff; background: var(--good); padding: 0 4px; border-radius: 4px; }

/* ---------- Enquiries (leads) page ---------- */
.lead-card.lead-new { border-left: 4px solid var(--accent); }
.lead-msg { margin: 10px 0 0; color: var(--ink-2); font-size: .93rem; }
.lead-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.lead-actions .btn { width: auto; padding: 9px 14px; font-size: .9rem; }
.lead-update { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 6px; }
.lead-update select, .lead-update input { padding: 9px 10px; border: 1px solid #d6d0c6; border-radius: 10px; font: inherit; font-size: .9rem; background: #fff; }
.lead-update input { flex: 1; min-width: 180px; }
.lead-update .btn { width: auto; }

/* ---------- WhatsApp summary card (staff) ---------- */
.wa-send .wa-row { display: flex; flex-wrap: wrap; gap: 8px; }
.wa-send input { flex: 1; min-width: 200px; padding: 12px; font-size: 1rem; border: 1px solid #d6d0c6; border-radius: 10px; font-family: inherit; }
.wa-send .btn { width: auto; }
.wa-preview { margin-top: 12px; }
.wa-preview summary { cursor: pointer; color: var(--ink-2); font-size: .88rem; font-weight: 600; }
.wa-preview pre { white-space: pre-wrap; font-family: inherit; font-size: .9rem; background: #e7fbe9;
    border-radius: 12px 12px 12px 4px; padding: 12px 14px; margin: 10px 0 0; color: var(--ink); }

/* ---------- Private report link (inside the WhatsApp card) ---------- */
.share-box { margin: 4px 0 14px; padding: 12px; border: 1px dashed #d6d0c6; border-radius: 12px; background: #fcfbf9; }
.share-create { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; font-size: .9rem; color: var(--ink-2); }
.share-create .btn, .share-row .btn { width: auto; }
.share-row { display: flex; gap: 8px; }
.share-row input { flex: 1; min-width: 0; padding: 10px; font-size: .88rem; border: 1px solid #d6d0c6; border-radius: 10px; background: #fff; font-family: ui-monospace, monospace; }
.share-meta { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; margin-top: 8px; font-size: .8rem; color: var(--ink-3); }
.link-btn { background: none; border: 0; padding: 0; color: var(--low); font: inherit; font-size: .8rem; cursor: pointer; text-decoration: underline; }

/* ---------- Branch picker ---------- */
.branch { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.branch-main { flex: 1; min-width: 220px; }
.branch-main .row-meta { margin-top: 3px; }
.branch .btn { width: auto; }

/* ---------- Top bar on phones: wrap the (now 5) buttons onto a second row ----------
 * WHY wrap and not a horizontal scroller: the Admin dropdown is absolutely positioned and would
 * be clipped by an overflow:auto container. */
@media (max-width: 640px) {
    .topbar-inner { flex-wrap: wrap; gap: 8px; }
    .topbar-actions { width: 100%; flex-wrap: wrap; gap: 6px; }
    .topbar-actions .btn { width: auto; padding: 7px 11px; font-size: .85rem; white-space: nowrap; }
}

/* ---------- Client tracker ---------- */
.totals { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
.total { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.total b { display: block; font-size: 1.4rem; }
.total span { color: var(--ink-3); font-size: .8rem; font-weight: 600; }
@media (min-width: 760px) { .totals { grid-template-columns: repeat(4, 1fr); } }
.client-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 16px; margin: 12px 0; font-size: .9rem; }
.client-grid .k { display: block; color: var(--ink-3); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
@media (min-width: 760px) { .client-grid { grid-template-columns: repeat(4, 1fr); } }
.delta-up { color: var(--good); font-weight: 700; }
.delta-down { color: var(--low); font-weight: 700; }
.client-edit summary { cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--accent); margin-top: 6px; }
.client-form { display: grid; gap: 10px; margin-top: 12px; }
.client-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.client-form label { display: block; font-size: .8rem; font-weight: 700; color: var(--ink-2); }
.client-form input, .client-form select, .client-form textarea {
    display: block; width: 100%; margin-top: 4px; padding: 9px 10px; font: inherit; font-size: .95rem;
    border: 1px solid #d6d0c6; border-radius: 10px; background: #fff; }
.client-form .check { display: flex; gap: 8px; align-items: center; font-size: .9rem; }
.client-form .check input { width: auto; margin: 0; }
.client-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.client-actions .btn, .client-form .btn { width: auto; }
.chip.ok { background: var(--good-soft); color: var(--good); }

/* ---------------------------------------------------------------- name suggestions (place-suggest.js)
 * Same block in landing.css: the two stylesheets are deliberately separate (see landing.css header). */
.suggest-wrap { position: relative; }
.suggest-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 6px;
    list-style: none; background: #fff; border: 1px solid #ece6de; border-radius: 12px;
    box-shadow: 0 12px 32px rgba(28,25,23,.14); max-height: 320px; overflow-y: auto; }
.suggest-list li { padding: 9px 10px; border-radius: 8px; cursor: pointer; line-height: 1.3; }
.suggest-list li strong { display: block; font-size: .95rem; color: #1f1b18; }
.suggest-list li span { display: block; font-size: .8rem; color: #8a837c; margin-top: 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest-list li.active, .suggest-list li:hover { background: #fff1ea; }
.suggest-picked { font-size: .8rem; color: #0c8a5f; margin-top: 5px; }

/* ---------------------------------------------------------------- client money (BillingController) */
.money { border-top: 1px solid var(--line, #e7e2db); margin-top: 14px; padding-top: 12px; }
.money-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; align-items: baseline; }
.agr { padding: 8px 0; border-bottom: 1px dashed var(--line, #e7e2db); }
.agr.muted { opacity: .55; }
.agr-line { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.agr-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.agr-actions form { margin: 0; }
.btn-sm { padding: 4px 10px; font-size: .82rem; }
.pay-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: .9rem; }
.pay-table th { text-align: left; font-weight: 600; color: var(--ink-2); padding: 4px 6px; border-bottom: 1px solid var(--line, #e7e2db); }
.pay-table td { padding: 6px; border-bottom: 1px solid #f1efeb; vertical-align: top; }
.pay-table tr.muted td { color: var(--ink-3, #8c8680); text-decoration: line-through; }
.pay-table tr.muted td:last-child { text-decoration: none; }
.pay-table .void summary { cursor: pointer; font-size: .8rem; color: var(--ink-3, #8c8680); }
.pay-table .void form { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.money-forms { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.money-forms summary { cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--accent); }
@media (max-width: 560px) { .hide-sm { display: none; } }

/* Customer portal header (/my): reuses .hero-band; a little taller so the photo reads as a banner. */
.my-hero { padding-top: 40px; padding-bottom: 40px; margin-bottom: 18px; }
.my-hero a.ring { color: #fff; text-decoration: none; }
@media (min-width: 720px) { .my-hero { padding-top: 64px; padding-bottom: 56px; } }
.back-link { display: inline-block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
/* Find a client + My clients (ClientFinder). Collapsed by default: nothing shows during a demo. */
.find-form { display: flex; gap: 8px; }
.find-form input { flex: 1; min-width: 0; padding: 11px 14px; border: 1px solid var(--line, #e7e5e4);
    border-radius: 10px; font: inherit; font-size: 15px; background: #fff; }
.find-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(217,72,15,.15); }
.find-card { margin-bottom: 16px; }
.my-clients { margin-top: 12px; }
.my-clients summary { cursor: pointer; font-weight: 600; font-size: .92rem; }
.find-list { list-style: none; margin: 10px 0 0; padding: 0; }
.find-list li + li { border-top: 1px solid var(--line, #e7e5e4); }
.find-list a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 4px; text-decoration: none; color: inherit; }
.find-list a:hover b { text-decoration: underline; }
.pin-form { margin-top: 12px; }
.client-reports { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line, #e7e5e4); }
.find-pick { margin-top: 8px; }

/* ===== Owner plans page (/r/{token}/plans) and prospect list ===== */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.plans-page .launch-note { margin-top: 6px; font-weight: 600; color: var(--good); font-size: .9rem; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 16px; }
.plan-card { display: flex; flex-direction: column; gap: 8px; position: relative; margin: 0; }
.plan-card h3 { margin: 0; font-size: 1.05rem; }
.plan-card input:not([type=hidden]):not(.hp) { width: 100%; padding: 9px 10px; border: 1px solid var(--line, #e7e2db); border-radius: 8px; font: inherit; }
.plan-card .btn { margin-top: auto; }
.plan-price s { color: var(--ink-2); margin-right: 6px; }
.plan-price b { font-size: 1.4rem; }
.plan-best { border: 2px solid var(--good); }
.plan-tag { position: absolute; top: -10px; right: 12px; background: var(--good); color: #fff; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 10px; }
.accepted { border: 2px solid var(--good); }
.prospect-table td { padding: 8px 6px; border-bottom: 1px solid var(--line, #e7e2db); vertical-align: top; }
/* ===== Report orders (/admin/orders) ===== */
.order-card { display: flex; flex-direction: column; gap: 6px; }
.order-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.order-code { font-family: ui-monospace, monospace; font-size: 1.1rem; letter-spacing: .05em; }
.order-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; align-items: center; }
.order-actions form { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }
.order-actions input { padding: 9px 10px; border: 1px solid var(--line, #e7e2db); border-radius: 8px; font: inherit; }

/* ™ after the brand name (trademark claimed, not yet registered - so ™, never ®). */
.tm { font-size: .5em; font-weight: 600; vertical-align: super; line-height: 0; margin-left: 1px; }
/* ===== Find businesses (/admin/leads) ===== */
.lead-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.lead-fields select { width: 100%; padding: 10px; border: 1px solid var(--line, #e7e2db); border-radius: 8px; font: inherit; background: #fff; }
.lead-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.lead-filters { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 8px 0; }
.lead-filters .chk { display: inline-flex; gap: 6px; align-items: center; font-size: .9rem; cursor: pointer; }
.lead-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line, #e7e2db); flex-wrap: wrap; }
.lead-main { flex: 1 1 300px; min-width: 0; }
.lead-name { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lead-signs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sign { font-size: .78rem; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: #fdecea; color: #b3261e; }
.sign.muted { background: #f3efe9; color: var(--ink-2, #57534e); font-weight: 500; }
.lead-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lead-actions form { margin: 0; }
.lead-recent { list-style: none; padding: 0; margin: 0; line-height: 1.9; }
.intake-sum { line-height: 1.7; font-size: .92rem; }
/* Real change vs normal variation (ScoreChange), under the progress chart. */
.change-note { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: #f6f3ee; color: #57514b; font-size: .9rem; line-height: 1.45; }
.change-note.up { background: #ebfbee; color: #2b8a3e; }
.change-note.down { background: #fff5f5; color: #c92a2a; }
/* Accuracy table (FactCheckService) */
.facts-warn { color: #c92a2a; font-weight: 600; }
.facts-scroll { overflow-x: auto; margin-top: 10px; }
.facts-table { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 560px; }
.facts-table th, .facts-table td { text-align: left; vertical-align: top; padding: 9px 10px; border-bottom: 1px solid #efe9e2; }
.facts-table thead th { font-size: .78rem; color: #8c8680; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.facts-table tbody th { font-weight: 700; white-space: nowrap; }
.facts-table td.g { color: #57514b; max-width: 260px; }
.facts-table .mark { font-weight: 800; display: block; font-size: 1.1rem; line-height: 1.2; }
/* 28 Nov: assistant columns centred, like the PDF. */
.facts-table th.eng, .facts-table td.eng { text-align: center; }
.facts-table td.na .mark { color: #a8a29b; }
.facts-table td.area .mark { color: #c27c0e; }
.facts-table td.bad .mark { color: #c92a2a; }
.facts-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 0; font-size: .8rem; color: #8c8680; }
.facts-legend .m { font-weight: 800; margin-right: 4px; }
.facts-legend .m.ok { color: #2b8a3e; } .facts-legend .m.area { color: #c27c0e; }
.facts-legend .m.bad { color: #c92a2a; } .facts-legend .m.na { color: #a8a29b; }
.facts-table td.ok .mark { color: #2b8a3e; }
.facts-table td.bad { background: #fff5f5; }
.facts-table td.bad .mark, .facts-table td.bad .said { color: #c92a2a; }
.facts-table td.na { color: #9c958e; }
.facts-table .said { display: block; font-size: .8rem; color: #57514b; margin-top: 2px; }
/* Can AI read your website? (SiteReadinessService) */
.site-items { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.site-items li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: #f8f6f2; }
.site-items li b { display: block; font-size: .92rem; }
.site-items li span:not(.mark) { display: block; font-size: .86rem; color: #57514b; line-height: 1.45; }
.site-items .mark { flex: 0 0 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .8rem; color: #fff; background: #2f9e44; }
.site-items li.warn .mark { background: #e8a33d; }
.site-items li.bad { background: #fff5f5; }
.site-items li.bad .mark { background: #e03131; }
/* Staff home (founders' review): labelled chips, labelled finder rows, collapsed recent checks */
.engines-row { align-items: center; }
.engines-k { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #9c958e; margin-right: 2px; }
.engines-k + .chip { margin-left: 0; }
.find-label { display: block; font-size: .8rem; font-weight: 700; color: #57514b; margin: 8px 0 4px; }
.my-recent { margin-top: 14px; border-top: 1px solid #efe9e2; padding-top: 12px; }
.my-recent summary { cursor: pointer; font-weight: 700; }
/* .btn is width:100% site-wide; in these one-line forms that made the button take the whole row and
   squeezed the code box to ~30 px (seen live on Find a business). Buttons size to their label here;
   the suggestions wrapper (added by JS around the name box) grows instead of the button. */
.find-form .btn { white-space: nowrap; width: auto; flex: 0 0 auto; min-width: 96px; padding-left: 22px; padding-right: 22px; }
.find-form .suggest-wrap { flex: 1; min-width: 0; }
.find-form .suggest-wrap input { width: 100%; box-sizing: border-box; }
/* Staff home: what a check covers, as two labelled rows */
.check-rows { margin: 14px 0 0; display: grid; gap: 8px; }
.check-row { display: grid; grid-template-columns: 112px 1fr; align-items: center; gap: 10px; }
.check-row dt { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #9c958e; }
.check-row dd { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.check-row .chip { margin: 0; }
@media (max-width: 480px) { .check-row { grid-template-columns: 1fr; gap: 4px; } }
/* How AI describes you (SentimentService) */
.tone-bar { display: flex; gap: 3px; margin-top: 10px; border-radius: 10px; overflow: hidden; font-size: .78rem; font-weight: 700; }
.tone-bar span { padding: 7px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.t-positive { background: #d3f9d8; color: #2b8a3e; }
.t-mixed { background: #fff3bf; color: #946200; }
.t-neutral { background: #f1ece5; color: #57514b; }
.t-negative { background: #ffe3e3; color: #c92a2a; }
.tone-cols { display: grid; gap: 14px; margin-top: 14px; }
@media (min-width: 720px) { .tone-cols { grid-template-columns: 1fr 1fr; } }
.tone-cols h3 { font-size: .85rem; margin: 0 0 6px; }
.tone-cols h3.bad { color: #c92a2a; }
.tone-cols ul { margin: 0; padding-left: 18px; color: #57514b; font-size: .9rem; line-height: 1.5; }
/* Extra questions on the client page */
.q-list { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 6px; }
.q-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px; background: #f8f6f2; border-radius: 10px; font-size: .9rem; }
.q-list form { margin: 0; }
.q-add { display: flex; gap: 8px; align-items: stretch; }
.q-add .btn { flex: 0 0 auto; width: auto; }
.q-add input { flex: 1 1 auto; width: auto; min-width: 0; padding: 10px 12px; border: 1px solid #e6ddd3; border-radius: 10px; font: inherit; }

/* Tagline, styled as on the logo artwork: all caps, "NDED. STAY" in the accent orange. Same markup
   on every page (<span class="tagline">GET RECOMME<span class="tag-hl">NDED. STAY</span> ACCURATE.</span>);
   the screen-reader text is the same words, so nothing is lost by splitting the word. */
.tagline { text-transform: uppercase; letter-spacing: .06em; font-weight: 600; white-space: nowrap; }
.tagline .tag-hl { color: inherit; }
.login-logo { text-align: center; margin: 0 0 16px; }
.login-logo img { width: 180px; height: auto; }

/* Signed-in user's display name in the top bar (hidden on phones: the bar is already full there). */
.me-name { font-size: .82rem; font-weight: 600; color: var(--ink-3, #6b645c); white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 720px) { .me-name { display: none; } }

/* ============ v65 role dashboards ============ */
/* Admin overview strip (admin only) */
.overview { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 16px; }
.overview .ov { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; background: #fff; border: 1px solid #ece5dc; border-radius: 12px; color: inherit; text-decoration: none; }
.overview .ov span { font-size: .78rem; color: var(--ink-3, #6b645c); }
.overview .ov b { font-size: 1.4rem; font-weight: 700; }
.overview .ov small { font-size: .74rem; color: var(--accent, #d9480f); font-weight: 600; }
.overview .ov-attn { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.overview .ov-attn a { font-size: .82rem; padding: 6px 10px; border-radius: 999px; background: #fff4e5; color: #8a4b00; text-decoration: none; font-weight: 600; }
@media (max-width: 720px) { .overview { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Check form buttons */
.check-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.check-buttons .btn { flex: 1 1 auto; }

/* Demo mode */
.demo-banner { background: #1f2937; color: #fff; border-radius: 12px; padding: 10px 14px; margin: 0 0 14px; font-size: .9rem; }
.demo-card h2 { margin-bottom: 0; }
.demo-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.demo-form label { display: flex; flex-direction: column; font-size: .8rem; gap: 4px; color: var(--ink-3, #6b645c); }
.demo-form input { width: 120px; padding: 9px 10px; border: 1px solid #e6ddd3; border-radius: 10px; font: inherit; letter-spacing: .2em; }
.demo-pin { margin-top: 10px; }
.demo-unlock { position: relative; }
.demo-unlock summary { list-style: none; font-size: 1.1rem; }
.demo-unlock summary::-webkit-details-marker { display: none; }
.demo-unlock-form { position: absolute; right: 0; top: 110%; background: #fff; border: 1px solid #e6ddd3; border-radius: 12px; padding: 10px; display: flex; gap: 6px; flex-wrap: wrap; width: 220px; z-index: 30; box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.demo-unlock-form input { width: 110px; padding: 8px 10px; border: 1px solid #e6ddd3; border-radius: 8px; letter-spacing: .2em; }
.unlock-err { width: 100%; color: #b42318; font-size: .8rem; }

/* My work (agent home) */
.work-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.work-h { font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3, #6b645c); margin: 14px 0 6px; }
.work-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.work-list a { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 9px 11px; border: 1px solid #efe8df; border-radius: 10px; color: inherit; text-decoration: none; }
.work-list a:hover { border-color: #e0d4c6; background: #fcfaf7; }
.chip.due { background: #fdecea; color: #b42318; }
.my-month { display: flex; gap: 14px; align-items: baseline; margin-top: 14px; padding-top: 10px; border-top: 1px solid #f0e9e0; font-size: .9rem; }

/* Lead inbox */
.lead-filters { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; }
.lead-filters a { padding: 7px 12px; border-radius: 999px; border: 1px solid #e6ddd3; color: inherit; text-decoration: none; font-size: .86rem; background: #fff; }
.lead-filters a.on { background: #1f2937; color: #fff; border-color: #1f2937; }
.lead-filters .count { display: inline-block; margin-left: 4px; padding: 0 7px; border-radius: 999px; background: var(--accent, #d9480f); color: #fff; font-size: .74rem; }
.lead-assign { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; font-size: .86rem; }
.lead-assign select { padding: 7px 10px; border: 1px solid #e6ddd3; border-radius: 8px; font: inherit; }
.lead-more { margin-top: 10px; }
.lead-more summary { cursor: pointer; font-size: .86rem; color: var(--ink-3, #6b645c); }
.lead-notes { margin: 8px 0; padding-left: 18px; display: grid; gap: 6px; font-size: .88rem; }
.lead-notes li span.sub { display: block; font-size: .74rem; }
.lead-update2 { display: grid; gap: 8px; margin-top: 8px; }
.lead-update2 .lu-row { display: flex; gap: 10px; flex-wrap: wrap; }
.lead-update2 label { display: flex; flex-direction: column; gap: 4px; font-size: .78rem; color: var(--ink-3, #6b645c); }
.lead-update2 select, .lead-update2 input, .lead-update2 textarea { padding: 8px 10px; border: 1px solid #e6ddd3; border-radius: 8px; font: inherit; }
.lead-update2 .btn { justify-self: start; }
.lead-add { margin-top: 12px; }

/* Owner login on the client page */
.owner-link { display: grid; gap: 6px; margin: 6px 0 10px; }
.owner-link input { padding: 8px 10px; border: 1px solid #e6ddd3; border-radius: 8px; font-size: .8rem; background: #faf8f5; }

/* Owner page summary */
.my-summary { display: grid; gap: 10px; }
.my-summary .ms-item { display: grid; gap: 2px; }
.my-summary .ms-label { font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3, #6b645c); }
.my-summary .btn-wa { justify-self: start; }

/* Tagline parts always stay inline (a parent rule like ".faq-brand span { display:block }" split the word).
   .tag-2l: two lines - "GET RECOMMENDED." / "STAY ACCURATE." - for narrow boxes (FAQ side panel). */
.tagline .tag-hl { display: inline !important; }
.tagline.tag-2l { display: block; white-space: normal; line-height: 1.5; font-size: .78rem; }

.check-buttons + .hint { font-size: .8rem; color: var(--ink-3, #6b645c); margin-top: 6px; line-height: 1.45; }
.lead-notes { list-style: none; padding-left: 0; }
.lead-notes li { padding: 6px 0; border-bottom: 1px dashed #efe8df; }
.lead-update2 .btn { width: auto; padding: 8px 18px; }

/* v66: owner's questions on the check form; "also named" line under competitors */
.owner-qs { margin: 4px 0 14px; border: 1px dashed #e6ddd3; border-radius: 10px; padding: 8px 12px; }
.owner-qs summary { cursor: pointer; font-weight: 600; font-size: .9rem; }
.owner-qs input, .owner-qs textarea { display: block; resize: vertical; min-height: 2.6em; line-height: 1.35; overflow: hidden; width: 100%; margin: 6px 0; padding: 10px 12px; border: 1px solid #e6ddd3; border-radius: 10px; font: inherit; box-sizing: border-box; }
.other-kinds { font-size: .85rem; color: var(--ink-3, #6b645c); margin: 12px 0 0; }

/* v66: owner account button + menu */
.acct { position: relative; }
.acct summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 10px 4px 4px; border: 1px solid #e6ddd3; border-radius: 999px; background: #fff; }
.acct summary::-webkit-details-marker { display: none; }
.acct-av { width: 30px; height: 30px; border-radius: 50%; background: var(--accent, #d9480f); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .8rem; }
.acct-name { font-weight: 600; font-size: .86rem; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-caret { font-size: .7rem; color: var(--ink-3, #6b645c); }
.acct-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px; background: #fff; border: 1px solid #e6ddd3; border-radius: 12px; box-shadow: 0 10px 28px rgba(0,0,0,.10); padding: 6px; z-index: 40; display: grid; }
.acct-menu a, .acct-menu button { display: block; text-align: left; padding: 10px 12px; border-radius: 8px; color: inherit; text-decoration: none; font: inherit; font-size: .92rem; background: none; border: 0; cursor: pointer; width: 100%; }
.acct-menu a:hover, .acct-menu button:hover { background: #f6f1ea; }
.acct-who { padding: 8px 12px 6px; font-size: .78rem; color: var(--ink-3, #6b645c); border-bottom: 1px solid #f0e9e0; margin-bottom: 4px; }
@media (max-width: 520px) { .acct-name { max-width: 110px; } }

/* v66: owner page plan / receipts / tracking */
.my-plan .plan-row, .my-receipts li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f0e9e0; flex-wrap: wrap; }
.my-receipts ul { list-style: none; padding: 0; margin: 0; }
.track-card { border: 1px solid #f3d9c9; background: #fff8f3; }
.track-card .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.next-check { font-size: .95rem; }
/* Owner bar on phones: initials only, so the button stays on the logo's row and the menu (right-aligned) fits. */
@media (max-width: 560px) {
    .acct .acct-name, .acct .acct-caret { display: none; }
    .acct summary { padding: 3px; }
    /* Owners: the bar holds only the logo and the circle, so keep them on one row. Staff bars have more
       buttons and keep wrapping as before. */
    .topbar-inner:has(.acct-owner) { flex-wrap: nowrap; }
    .topbar-inner:has(.acct-owner) .topbar-actions { margin-left: auto; flex: 0 0 auto; }
    .acct-menu { max-width: calc(100vw - 24px); }
}

/* v66 phone fixes (found by the overflow sweep at 390px) */
@media (max-width: 560px) {
    .topbar-inner:has(.acct-owner) .topbar-actions { width: auto; }
    .find-form { flex-wrap: wrap; }
    .find-form input { flex: 1 1 160px; }
    .inline-form { flex-wrap: wrap; }
    .inline-form input { width: 100%; flex: 1 1 140px; }
    .user-actions { width: 100%; }
}
@media (max-width: 640px) {
    /* Wide tables scroll sideways inside their card instead of widening the whole page. */
    .facts-table, .st-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
@media (max-width: 420px) {
    .brand small .tagline { letter-spacing: .01em; }
}
/* v66: staff use the same account button; on phones only the circle (rule above, .topbar-inner:has(.acct)). */
.acct-menu a[href="/admin/users"] { border-top: 1px solid #f0e9e0; border-radius: 0; }
/* Staff on phones: the bar wraps, so keep the account circle at the RIGHT end of its row - the menu opens
   right-aligned and would otherwise run off the left edge of the screen. */
@media (max-width: 560px) { .acct { margin-left: auto; } }

/* ============ v67 client tasks ============ */
.task-list { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 6px; }
.task-list li, .task-mini li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: #f8f6f2; border-radius: 10px; }
.task-mini li { background: none; border: 1px solid #efe8df; }
.task-list li.done .task-title { text-decoration: line-through; color: var(--ink-3, #6b645c); }
.task-list li.late, .task-mini li.late { box-shadow: inset 3px 0 0 #c92a2a; }
.task-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.task-main .sub { font-size: .78rem; }
.task-tick { margin: 0; }
.task-tick button { width: 22px; height: 22px; border-radius: 6px; border: 2px solid #c8bfb4; background: #fff; cursor: pointer; font-size: .8rem; line-height: 1; color: #2b8a3e; padding: 0; }
.task-owner { margin: 0; }
.task-owner .chip { border: 0; cursor: pointer; font: inherit; font-size: .72rem; }
.task-list form { margin: 0; }
.task-add { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.task-add input[name=title] { flex: 1 1 220px; min-width: 0; padding: 9px 11px; border: 1px solid #e6ddd3; border-radius: 10px; font: inherit; }
.task-add input[type=date], .task-add select { padding: 8px 10px; border: 1px solid #e6ddd3; border-radius: 10px; font: inherit; }
.task-show { font-size: .82rem; display: flex; gap: 5px; align-items: center; }
.ov-late { font-size: .82rem; padding: 6px 10px; border-radius: 999px; background: #fdecea; color: #b42318; font-weight: 600; }
.working-on .wo-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.working-on .wo-list li { display: grid; grid-template-columns: 18px 1fr auto; gap: 8px; align-items: baseline; }
.working-on .wo-list li.done { color: var(--ink-3, #6b645c); }
.working-on .wo-mark { color: #2b8a3e; font-weight: 700; }
.task-add .btn { width: auto; padding: 9px 16px; }
.task-add .select { width: auto; flex: 0 1 auto; }

/* Client page: labelled staff notes box under the summary tiles. */
.staff-notes { margin: 12px 0 4px; padding: 10px 12px; border: 1px dashed var(--line, #e7e5e4); border-radius: 10px; background: #fffdf9; }
.staff-notes .k { font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2, #57514b); }
.staff-notes .k .sub { text-transform: none; letter-spacing: 0; font-weight: 500; }

/* Buyer contact strip on the report page (staff only, never in demo mode) - 27 Nov */
.buyer-strip { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 12px 0; padding: 10px 14px;
  border: 1px dashed var(--border, #d8d2c8); border-radius: 10px; background: #fffdf8; font-size: .9rem; }
.buyer-strip .buyer-ref { color: #7a736c; }
.buyer-strip .buyer-wa { margin-left: auto; background: #1fa855; color: #fff; padding: 6px 12px; border-radius: 8px;
  text-decoration: none; font-weight: 600; }


/* 27 Nov: demo-mode "Open by code" box */
.demo-code { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; }
.demo-code label { font-weight: 600; font-size: .9rem; }
.demo-code-row { display: flex; gap: 8px; }
.demo-code-row input { flex: 1; max-width: 220px; padding: 9px 10px; border: 1px solid #e6ddd3; border-radius: 10px;
    font: inherit; letter-spacing: .08em; text-transform: uppercase; }

/* 27 Nov: AI assistant logos in the dashboard chips (same files as the website band) */
.chip-logo img { width: 16px; height: 16px; border-radius: 4px; object-fit: contain; background: #fff; }

/* 27 Nov: Clients list as a table (clients.html) */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.client-table { min-width: 640px; margin-top: 0; }
.client-table td { vertical-align: middle; }
.click-row { cursor: pointer; }
.click-row:hover td { background: #faf7f3; }

/* 28 Nov: the owner's row when it ranks below the short list - separated so the skipped ranks read as "…". */
.board li.you.below { margin-top: 14px; position: relative; }
.board li.you.below::before { content: "\22EE"; position: absolute; top: -15px; left: 16px; color: #b5ada5; font-size: .9rem; }

/* 28 Nov: what the advisor-led sample shows vs the ₹599 report. */
.buy-sample-note, .pay-sample-note { font-size: .8rem; color: #7a736c; margin: 8px 0 0; line-height: 1.45; }

/* 29 Nov: "On Google itself" - long questions wrap; the two results sit right (stack under the question on phones). */
.google-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.google-list li { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; font-size: .9rem; }
.google-list .g-q { font-weight: 600; }
@media (max-width: 560px) {
    .google-list li { grid-template-columns: auto auto; justify-content: start; }
    .google-list .g-q { grid-column: 1 / -1; }
}
.paa-list { margin: 0; padding-left: 1.2rem; display: grid; gap: 4px; font-size: .9rem; color: var(--ink-2); }

/* 29 Nov: Google Maps rank grid (5x5) and monthly Google profile figures (Boost / Plus). */
.grid-wrap { margin: 8px 0 14px; }
.maps-grid { border-collapse: separate; border-spacing: 4px; }
.maps-grid td { width: 44px; height: 38px; text-align: center; font-weight: 700; font-size: .85rem; border-radius: 8px; }
.maps-grid .mg-good { background: var(--good-soft); color: var(--good); }
.maps-grid .mg-ok { background: var(--mid-soft); color: var(--mid); }
.maps-grid .mg-bad { background: var(--low-soft); color: var(--low); }
.maps-grid .mg-na { background: var(--line); color: var(--ink-3); }
.maps-grid .mg-shop { outline: 2px solid var(--ink); outline-offset: -2px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-form input { flex: 1 1 220px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.results-table { border-collapse: collapse; font-size: .88rem; min-width: 460px; }
.results-table th, .results-table td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.results-table small.up { color: var(--good); font-weight: 700; }
.results-table small.down { color: var(--low); font-weight: 700; }
.table-scroll { overflow-x: auto; }
.results-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin-top: 8px; }
.results-form label { display: grid; gap: 4px; font-size: .82rem; font-weight: 600; }
.results-form label.wide { grid-column: 1 / -1; }
.results-form input { padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }

/* 29 Nov: loss banner and "Problems we found" (same as page 1 of the PDF). */
.loss-card { border-left: 5px solid var(--low); background: #fdecec; }
.loss-card .loss-big { font-size: 1.45rem; font-weight: 800; color: var(--low); margin: 0; line-height: 1.25; }
.loss-card .loss-win { font-weight: 700; margin: 6px 0 0; }
.loss-card .loss-why { color: var(--ink-2); margin: 4px 0 0; font-size: .92rem; }
.problems-card { border-left: 5px solid var(--low); }
.problems-card ul { margin: 0; padding-left: 1.2rem; display: grid; gap: 6px; }
.problems-card li.urgent { color: var(--low); font-weight: 700; }
.problems-card li.urgent::marker, .problems-card li.worth::marker { color: var(--low); }
.problems-card li.worth::marker { color: var(--mid); }
/* 30 Nov: .kpis has a negative top margin so the tiles overlap the score hero. When the loss or "What we found"
   card sits just above, that overlap covered the card's last line (seen on HSR Dental Booth, 5 lines). Normal gap
   there instead; the hero overlap is unchanged when no card is shown. */
.loss-card + .kpis, .problems-card + .kpis { margin-top: 16px; }

/* 29 Nov: "Ask the owner" panel (staff). Questions left, notes right; stacked on narrow screens / iPad portrait. */
.owner-notes summary { cursor: pointer; }
.owner-notes summary .opt { font-weight: 500; font-size: .8rem; color: var(--ink-3); }
.owner-notes .on-grid { display: grid; gap: 16px; margin-top: 10px; }
@media (min-width: 900px) { .owner-notes .on-grid { grid-template-columns: 1fr 1fr; } }
.owner-notes .on-questions { margin: 0; padding-left: 1.2rem; display: grid; gap: 6px; font-size: .92rem; }
.owner-notes .on-known { margin-top: 12px; font-size: .85rem; display: grid; gap: 4px; background: var(--good-soft); padding: 8px 10px; border-radius: 10px; }
.owner-notes .on-form label { font-weight: 700; font-size: .9rem; }
.owner-notes .on-form textarea { width: 100%; margin-top: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 1rem; resize: vertical; }
.owner-notes .on-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; }
.owner-notes .on-status { font-size: .82rem; color: var(--ink-3); }
.owner-notes .on-sub { font-weight: 700; font-size: .82rem; color: var(--ink-3); margin: 0 0 6px; text-transform: none; }
.owner-notes .on-general { margin-top: 10px; }
.owner-notes .on-general summary { cursor: pointer; }
.owner-notes .on-group { margin-top: 8px; }
.owner-notes .on-group summary, .owner-notes .on-general summary { cursor: pointer; padding: 6px 0; }
.owner-notes .on-group summary::marker, .owner-notes .on-general summary::marker { color: var(--ink-3); }
.owner-notes .on-status { margin: 6px 0 0; }
.owner-notes .on-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-top: 10px; }
.owner-notes .on-actions .btn { padding: 12px 14px; font-size: .95rem; }

/* 30 Nov: "My reports" kind tags - orange = customer order, blue = advisor-led. */
.chip.kind-order { background: #fff7ed; color: #b45309; border-color: #fed7aa; }
.chip.kind-advisor { background: #eef2ff; color: #3730a3; border-color: #c7d2fe; }

/* 30 Nov: "My reports" rows - name, then type and status tags. Was a fixed 3-column grid (name | 118px | 120px):
   in the narrow "My work" column on an iPad the name got ~1 letter ("A..."). Now flex + wrap: the name keeps at
   least 150px (cut with "..." beyond its line, full name on hover), and when the tags don't fit beside it they drop
   to the line below instead of squeezing the name. */
.rep-row .rep-link { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.rep-row .rep-name { flex: 1 1 150px; min-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rep-row .rep-link .chip { flex: none; white-space: nowrap; }
.rep-row .rep-sub { display: block; margin-top: 2px; }
