/* Potcake web app styles. Colors come only from theme.css tokens: no hex values here. */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 "Red Hat Display", system-ui, sans-serif; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
::selection { background: var(--hi); color: var(--hi-ink); }

/* ── type ─────────────────────────────────────────────────────────── */
h1 { font-weight: 700; font-size: clamp(34px, 5.4vw, 60px); letter-spacing: -0.02em; line-height: 1.08; margin: 0 0 10px; }
h1.page { font-size: clamp(28px, 3.6vw, 40px); }          /* utility pages: settings, jobs, leads */
h2 { font-weight: 700; font-size: clamp(24px, 3vw, 34px); letter-spacing: -0.015em; line-height: 1.15; margin: 0 0 12px; }
.card h2 { font-size: 22px; letter-spacing: -0.01em; }
h3 { font-size: 18px; font-weight: 700; margin: 18px 0 8px; }
.muted { color: var(--muted); } .small { font-size: 14px; }
.eyebrow, .label { font-size: 14px; font-weight: 600; color: var(--muted); }
.big { font-weight: 800; letter-spacing: -0.02em; }
.mark { background: var(--hi); color: var(--hi-ink); padding: 0 .14em; border-radius: 8px;
        -webkit-box-decoration-break: clone; box-decoration-break: clone; }
/* the highlight box is taller than a tight headline line, so give those headlines room: no overlap onto the line above */
h1:has(.mark), h2:has(.mark) { line-height: 1.22; }

/* ── header ───────────────────────────────────────────────────────── */
header.top { background: var(--surface); border-bottom: 1px solid var(--line); }
header.top .in { max-width: 1180px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 18px; }
header.top .brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
header.top .brand img { height: 34px; width: auto; }
header.top .brand .logo-light { display: var(--logo-light); } header.top .brand .logo-dark { display: var(--logo-dark); }
header.top .brand img.word { height: 34px; }
header.top nav { margin-left: auto; display: flex; align-items: center; gap: 4px; font-size: 15px; }
header.top nav a { color: var(--ink); text-decoration: none; font-weight: 600; padding: 8px 12px; border-radius: 999px; }
header.top nav a:hover, header.top nav a.on { background: var(--soft); }
.switcher { width: auto; min-width: 170px; max-width: 220px; border-radius: 999px; padding: 8px 14px; font-weight: 600; }
.icon-btn { width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
            display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.icon-btn:hover { background: var(--soft); }
.icon-btn svg { width: 20px; height: 20px; }
.avatar { width: 40px; height: 40px; border-radius: 999px; background: var(--hi); color: var(--hi-ink); font-weight: 800; font-size: 14px;
          display: inline-flex; align-items: center; justify-content: center; border: 0; cursor: pointer; flex: none; }
.acct { position: relative; }
.acct .menu { right: 0; left: auto; }
.acct .menu .wide-alt { display: none; }
.running-pill { display: inline-flex; align-items: center; gap: 8px; background: var(--running); color: var(--running-ink); padding: 5px 13px; border: 1px solid var(--running-line);
                border-radius: 999px; font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.running-pill:hover { background: var(--running-hov); }
.running-pill.failed, .btn.done-btn.failed { background: var(--error); border-color: var(--error); }
.running-pill .done-check { width: 18px; height: 18px; }
.spin { width: 24px; height: 24px; border: 3px solid var(--track); border-top-color: var(--ring); border-radius: 50%; animation: spin 1s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn.running-btn { background: var(--running); border-color: var(--running-line); color: var(--running-ink); gap: 8px; }
.btn.running-btn:hover { background: var(--running-hov); }
.live-dot { width: 20px; height: 20px; border-radius: 999px; background: var(--live); border: 2px solid var(--live-ring); flex: none; box-sizing: border-box;
            animation: live-pulse 1.6s ease-in-out infinite; }
.btn.done-btn { background: var(--running); border-color: var(--running-line); color: var(--running-ink); gap: 8px; }
.btn.done-btn:hover { background: var(--running-hov); }
.done-check { width: 20px; height: 20px; flex: none; }
.done-check circle { fill: var(--live); stroke: var(--live-ring); stroke-width: 2; }
.done-check path { stroke: var(--live-ring); }
@keyframes live-pulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.theme-icon-sun { display: none; } [data-theme="dark"] .theme-icon-sun { display: block; } [data-theme="dark"] .theme-icon-moon { display: none; }

main { max-width: 1180px; margin: 0 auto; padding: 28px 24px 72px; }

/* ── cards, layout ────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px; margin-bottom: 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.section { margin-top: 64px; }
.callout { background: var(--soft); border-radius: 14px; padding: 14px 16px; font-size: 15px; }
code { font-family: ui-monospace, Menlo, monospace; font-size: 13px; background: var(--soft); padding: 1px 5px; border-radius: 6px; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tile { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.tile .k { font-size: 14px; font-weight: 600; color: var(--muted); } .tile .v { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.tile .s { font-size: 13px; color: var(--muted); }
.tile.dark { background: var(--ink); color: var(--bg); border-color: var(--ink); } .tile.dark .k, .tile.dark .s { color: inherit; opacity: .75; }

/* ── buttons, chips ───────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 13px 26px;
       border: 1.5px solid var(--primary); background: var(--primary); color: var(--primary-ink); border-radius: 999px;
       font: inherit; font-size: 15px; font-weight: 600; line-height: 1.2; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.ghost, .btn.outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.ghost:hover, .btn.outline:hover { background: var(--ink); color: var(--bg); }
.btn.small { min-height: 36px; padding: 7px 16px; font-size: 14px; }
.btn.danger { background: var(--error); border-color: var(--error); color: var(--surface); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:focus-visible, .icon-btn:focus-visible, .avatar:focus-visible, .area:focus-visible, .pill:focus-visible, a:focus-visible, button:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 3px; }
.chip { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; line-height: 1.3; white-space: nowrap; }
.chip.new { background: var(--hi); color: var(--hi-ink); }
.chip.setup { background: transparent; color: var(--muted); border: 1px dashed var(--muted); padding: 3px 9px; }
.chip.ok { background: var(--soft); color: var(--muted); }
.chip.soon { background: transparent; color: var(--muted); border: 1px dashed var(--muted); padding: 3px 9px; }
.chip.up { background: var(--success-soft); color: var(--success); } .chip.down { background: var(--error-soft); color: var(--error); }
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--soft); color: var(--muted); }
.badge.ok { background: var(--success-soft); color: var(--success); } .badge.bad { background: var(--error-soft); color: var(--error); }
.badge.run { background: var(--ink); color: var(--bg); } .badge.muted { background: var(--soft); color: var(--muted); }
.badge.stage-new { background: var(--stage-new); color: var(--stage-ink); }
.badge.stage-audited { background: var(--stage-audited); color: var(--stage-ink); }
.badge.stage-tracking { background: var(--stage-tracking); color: var(--stage-ink); }
.badge.stage-prospect { background: var(--stage-prospect); color: var(--stage-ink); }
.badge.stage-closed { background: var(--stage-closed); color: var(--stage-closed-ink); }
.flash { padding: 12px 16px; border-radius: 14px; margin-bottom: 14px; font-size: 15px; }
.flash.ok { background: var(--success-soft); color: var(--success); } .flash.error { background: var(--error-soft); color: var(--error); }

/* ── forms, tables ────────────────────────────────────────────────── */
input[type=text], input[type=number], input[type=date], input[type=email], input[type=password], input[type=search], input[type=url], textarea, select {
  font: inherit; font-size: 15px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 12px; padding: 9px 12px; width: 100%; }
textarea { font-size: 14px; line-height: 1.45; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
label.f { display: block; font-size: 14px; font-weight: 600; margin: 12px 0 4px; }
label.f .hint { font-weight: 400; color: var(--muted); }
.check { display: inline-flex; align-items: center; gap: 8px; margin: 4px 14px 4px 0; font-size: 15px; }
input[type=checkbox], input[type=radio] { accent-color: var(--primary); width: 18px; height: 18px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; font-size: 13px; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line-strong); padding: 8px; }
td { border-bottom: 1px solid var(--line); padding: 9px 8px; vertical-align: top; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr:hover td { background: var(--soft); }
pre.log { background: var(--log-bg); color: var(--log-ink); padding: 16px; border-radius: 14px; font-size: 13px; line-height: 1.45;
          max-height: 62vh; overflow: auto; white-space: pre-wrap; word-break: break-word; margin: 0; }
.est table td, .est table th { padding: 5px 8px; }
.actions { position: sticky; bottom: 0; z-index: 5; background: var(--surface); border-top: 1px solid var(--line);
           margin: 16px -24px -24px; padding: 14px 24px; border-radius: 0 0 20px 20px; }
details > summary { cursor: pointer; }
details.closed-clients > summary { list-style: revert; }

/* ── dropdown menus (the only element with a shadow) ─────────────── */
.menu { display: none; position: absolute; top: calc(100% + 8px); left: 0; min-width: 240px; background: var(--surface);
        border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--menu-shadow); padding: 8px; z-index: 40; }
.menu.open, .open > .menu { display: block; }
.menu a, .menu button.item, .menu .soon { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  padding: 10px 12px; border-radius: 10px; font: inherit; font-size: 15px; color: var(--ink); text-decoration: none; background: none; border: 0; cursor: pointer; text-align: left; }
.menu a:hover, .menu a:focus, .menu button.item:hover { background: var(--soft); outline: none; }
.menu a.on { font-weight: 700; background: var(--soft); }
.menu .soon { color: var(--muted); cursor: default; }
.menu .soon-tag { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.menu .count { font-size: 13px; color: var(--muted); font-weight: 600; }
.menu .sep { height: 1px; background: var(--line); margin: 6px 4px; }

/* ── client areas: 6 buttons on the overview, pills on inside pages ─ */
.areas { display: flex; flex-direction: column; gap: 10px; position: relative; }   /* "Your Channels": one channel per row */
.area-wrap { position: relative; }
.area { display: grid; grid-template-columns: minmax(110px, 160px) minmax(110px, 130px) minmax(120px, 170px) 1fr 20px; align-items: center;
        gap: 16px; width: 100%; min-height: 72px; padding: 14px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
        color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.area:hover { border-color: var(--line-strong); }
.area[aria-expanded="true"] { border: 2px solid var(--primary); padding: 13px 19px; }
.area .name { font-size: 18px; font-weight: 700; }
.area .chip { justify-self: start; }
.area .chev { display: flex; width: 18px; height: 18px; color: var(--muted); transition: transform .15s; } .area .chev svg { width: 18px; height: 18px; }
.area[aria-expanded="true"] .chev { transform: rotate(180deg); }
.area .metric { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.area .metric.quiet { font-size: 16px; font-weight: 700; color: var(--muted); letter-spacing: 0; }
.area .desc { font-size: 14px; color: var(--muted); line-height: 1.35; }
.area-wrap .menu { min-width: 280px; width: max-content; max-width: 340px; top: calc(100% + 6px); }
.area-panel { display: none; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 24px; position: relative; z-index: 30; }
.pill-wrap { position: relative; }
.pill { min-height: 44px; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
        font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.pill:hover { border-color: var(--line-strong); }
.pill.on { background: var(--hi); color: var(--hi-ink); border-color: var(--hi); }
.pill[aria-expanded="true"] { border-color: var(--primary); }
.pill svg { width: 14px; height: 14px; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.crumbs a { color: var(--muted); text-decoration: none; } .crumbs a:hover { color: var(--ink); text-decoration: underline; }

/* ── overview pieces ──────────────────────────────────────────────── */
.hero { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr); gap: 28px; align-items: start; }
.hero h2.lead { font-size: clamp(22px, 2.4vw, 28px); letter-spacing: -0.01em; line-height: 1.25; margin: 0 0 10px; max-width: 640px; }
.hero .sub { font-size: 16px; color: var(--muted); max-width: 640px; margin: 0 0 22px; }
.ring { display: block; width: 220px; height: 220px; margin: 10px auto 6px; }
.score-row { display: flex; align-items: center; gap: 22px; padding: 18px 22px; flex-wrap: wrap; }
.score-row .ring { width: 96px; height: 96px; margin: 0; flex: none; }
.score-row .score-text { flex: 1 1 320px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.score-row .score-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.scorecard { display: flex; align-items: center; gap: 18px; padding: 18px 20px; }
.scorecard .ring { width: 118px; height: 118px; margin: 0; flex: none; }
.ring .trk { stroke: var(--track); } .ring .val { stroke: var(--ring); }
.ring .num { fill: var(--ink); font-weight: 800; font-size: 30px; letter-spacing: -0.02em; }
.ring .of { fill: var(--muted); font-size: 9px; font-weight: 600; }
.bars { display: grid; grid-template-columns: 112px 1fr 40px; gap: 10px 12px; align-items: center; font-size: 14px; }
.bars .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars .t { height: 10px; background: var(--track); border-radius: 4px; overflow: hidden; }
.bars .t span { display: block; height: 100%; background: var(--bar); border-radius: 4px; }
.bars .you { font-weight: 700; } .bars .you + .t span, .bars .t.you span { background: var(--you); }
.bars .p { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.bars .you ~ .p.you { color: var(--ink); font-weight: 700; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 36px; }   /* at most 3 per row */
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 20px 22px; }
.kpi .k { font-size: 14px; font-weight: 600; color: var(--muted); }
.kpi .v { font-size: clamp(40px, 4.6vw, 60px); font-weight: 800; letter-spacing: -0.03em; line-height: 1; margin: 10px 0 8px; }
.kpi .v .of { font-size: .4em; font-weight: 700; color: var(--muted); letter-spacing: 0; }
.kpi .vs { font-size: 13px; color: var(--muted); }
.kpi .kv { display: flex; align-items: center; gap: 14px; margin: 12px 0 8px; }
.kpi .kv .v { margin: 0; }
.pie { width: 56px; height: 56px; flex: none; }
.pie .pie-bg { fill: var(--track); } .pie .pie-slice { stroke: var(--ring); } .pie .pie-fill-solid { fill: var(--ring); }
.progress { height: 8px; background: var(--track); border-radius: 4px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--ring); border-radius: 4px; }
.steps3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.step-n { color: var(--link); font-weight: 800; font-size: 28px; letter-spacing: -0.02em; }
.cols3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.changes { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.changes li { display: flex; gap: 10px; align-items: baseline; }
.srcs { list-style: none; margin: 0; padding: 0; }
.srcs li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 10px; font-size: 14px; }
.srcs li.you { background: var(--hi); color: var(--hi-ink); font-weight: 700; }
.srcs li .c { color: var(--muted); white-space: nowrap; } .srcs li.you .c { color: inherit; }
.cells { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cells > div { padding: 4px 22px; border-left: 1px solid var(--line); } .cells > div:first-child { border-left: 0; padding-left: 0; }

/* ── gaps table ───────────────────────────────────────────────────── */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.filters input[type=search] { flex: 1 1 240px; border-radius: 999px; }
.filters select { width: auto; border-radius: 999px; }
.tscroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.gaps { min-width: 760px; }
.gaps tr.q { cursor: pointer; }
.gaps tr.q td { vertical-align: middle; }
.gaps tr.q[aria-expanded="true"] td { background: var(--soft); border-bottom-color: transparent; }
.gaps tr.q .chev { width: 16px; height: 16px; transition: transform .15s; color: var(--muted); }
.gaps tr.q[aria-expanded="true"] .chev { transform: rotate(180deg); }
.gaps tr.more td { background: var(--soft); padding: 4px 12px 18px; }
.gaps tr.more:hover td { background: var(--soft); }
.gap-detail { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 16px; }
.gap-detail blockquote { margin: 6px 0; padding: 0 0 0 12px; border-left: 3px solid var(--line-strong); font-size: 14px; color: var(--ink); }
.fixcard { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.impact { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.impact.high { background: var(--hi); color: var(--hi-ink); } .impact.medium { background: var(--soft); color: var(--ink); }
.impact.low { background: transparent; color: var(--muted); border: 1px solid var(--line-strong); }
.botnav { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 36px; }

/* ── phones ───────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero, .cols3, .steps3, .gap-detail { grid-template-columns: 1fr; }
  .cells { grid-template-columns: 1fr; } .cells > div { border-left: 0; border-top: 1px solid var(--line); padding: 14px 0; } .cells > div:first-child { border-top: 0; padding-top: 0; }
}
@media (max-width: 720px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  header.top nav .wide { display: none; }
  header.top .brand img.word { height: 26px; }
  .acct .menu .wide-alt { display: flex; }
  .scroll { overflow-x: auto; }
}
@media (max-width: 640px) {
  main { padding: 20px 16px 96px; }
  header.top .in { padding: 10px 16px; gap: 10px; }
  .card { padding: 18px; }
  .actions { margin: 16px -18px -18px; padding: 12px 18px; }
  .section { margin-top: 36px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .area { grid-template-columns: 1fr auto 20px; grid-template-areas: "name chip chev" "metric metric metric" "desc desc desc"; gap: 6px 10px; }
  .area .name { grid-area: name; } .area .chip { grid-area: chip; } .area .chev { grid-area: chev; }
  .area .metric { grid-area: metric; } .area .desc { grid-area: desc; }
  .kpi { padding: 16px; }
  .area-wrap .menu.open { position: static; box-shadow: none; min-width: 0; width: auto; max-width: none; margin-top: 8px; }   /* opens right under its row */
  .sticky-cta { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50; }
  .bars { grid-template-columns: 92px 1fr 38px; }
  .switcher { display: none; }
}

/* client logos next to client names */
.with-logo { display: flex; align-items: center; gap: 10px; }
.clogo { flex: none; border-radius: 10px; object-fit: contain; background: var(--paper); border: 1px solid var(--line); }
.clogo-i { display: inline-flex; align-items: center; justify-content: center; background: var(--soft); color: var(--muted); font-weight: 800; }

/* crawler: Search basics rows that open a full-width list */
.sb-list { display: flex; flex-direction: column; }
.sb-row { border-bottom: 1px solid var(--line); }
.sb-row > summary, .sb-row.sb-none { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 2px; list-style: none; }
.sb-row > summary { cursor: pointer; }
.sb-row > summary::-webkit-details-marker { display: none; }
.sb-row > summary::after { content: "+"; color: var(--muted); font-weight: 700; margin-left: 8px; }
.sb-row[open] > summary::after { content: "–"; }
.sb-row > summary .sb-n { margin-left: auto; }
.sb-n { font-weight: 700; font-variant-numeric: tabular-nums; }
.sb-none { color: var(--muted); }
.sb-urls { list-style: none; margin: 0 0 10px; padding: 0; font-size: 13px; max-height: 260px; overflow: auto; }
.sb-urls li { padding: 3px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* marketing */
.mk-form h3 { margin-top: 22px; }
.mk-groups { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.mk-groups > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mk-base { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; }
@media (max-width: 900px) { .mk-groups, .mk-base { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .mk-groups, .mk-base { grid-template-columns: minmax(0, 1fr); } }
.mk-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 20px; }
.mk-tabs button { font: inherit; font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.mk-tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.mk-item { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; margin-bottom: 12px; }
.mk-item .when { font-size: 13px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 6px; }
.mk-item .copy { white-space: pre-wrap; background: var(--soft); border-radius: 12px; padding: 12px 14px; font-size: 15px; margin: 8px 0; }
.mk-item .brief { font-size: 14px; } .mk-item .brief b { font-weight: 700; }
.mk-cal { width: 100%; }
.mk-cal td { vertical-align: top; }
.mk-phase { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 640px) { .mk-phase { grid-template-columns: minmax(0, 1fr); } }

/* Config tab form */
.cfg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.cfg-comps { display: grid; gap: 8px; }
.cfg-comp { display: grid; grid-template-columns: 1.1fr 1.3fr 1fr; gap: 8px; }
.cfg-head { font-size: 13px; font-weight: 600; color: var(--muted); }
@media (max-width: 720px) { .cfg-grid { grid-template-columns: minmax(0, 1fr); } .cfg-comp { grid-template-columns: minmax(0, 1fr); padding-bottom: 8px; border-bottom: 1px solid var(--line); } .cfg-head { display: none; } }

/* marketing plan: the reasons */
.mk-why { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.mk-why:last-child { border-bottom: 0; }
.mk-why .found { font-weight: 700; margin-bottom: 4px; }
.mk-why > div:last-child > div { margin-bottom: 3px; }
.mk-reason { font-size: 14px; background: var(--soft); border-left: 3px solid var(--primary); border-radius: 8px; padding: 8px 12px; margin: 4px 0 8px; }
@media (max-width: 640px) { .mk-why { grid-template-columns: minmax(0, 1fr); gap: 4px; } }

/* keys typed into the Data tab: hidden like a password, but not a password field, so browsers don't autofill saved logins */
input.secret { -webkit-text-security: disc; text-security: disc; font-family: ui-monospace, monospace; }

/* a form button that looks like a text link */
button.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--link, var(--primary)); text-decoration: underline; cursor: pointer; font-weight: 600; }

/* Sales & traffic: preview boxes, two per row */
.dh-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.dh-box { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 20px 22px; color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s; }
.dh-box:hover, .dh-box:focus-visible { border-color: var(--ink); transform: translateY(-1px); }
.dh-v { font-size: clamp(32px, 3.6vw, 44px); font-weight: 800; letter-spacing: -0.03em; line-height: 1; margin: 14px 0 6px; }
.dh-open { margin-top: 14px; font-weight: 700; font-size: 14px; }
@media (max-width: 720px) { .dh-grid { grid-template-columns: minmax(0, 1fr); } }

/* a report shown inside the app */
.report-frame { display: block; width: 100%; min-height: 80vh; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }

/* admin: what a client can see */
.access-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
.access-area { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.access-area .access-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.access-area summary { cursor: pointer; font-size: 13px; color: var(--muted); margin-top: 2px; }
@media (max-width: 720px) { .access-grid { grid-template-columns: minmax(0, 1fr); } }

/* sections and pages not in a client's plan: shown grayed out with a lock and the upgrade message */
.pill.locked, .area.locked { opacity: .55; }
.pill.locked .lock, .area.locked .lock { width: 13px; height: 13px; margin-right: 4px; vertical-align: -1px; }
.area.locked .desc { font-style: italic; }
.menu .soon.locked { flex-direction: column; align-items: flex-start; gap: 2px; opacity: .7; }
.menu .soon.locked .lock { width: 12px; height: 12px; vertical-align: -1px; }
.menu .locked-note { font-size: 12px; font-weight: 400; color: var(--muted); }
.locked-msg { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; font-size: 14px; max-width: 300px; }
.locked-msg .lock { width: 16px; height: 16px; flex: none; margin-top: 2px; }

/* "by M38" after the Potcake logo, smaller than Potcake */
header.top .brand .by-m38 { display: inline-flex; align-items: center; gap: 6px; margin-left: -2px; }
header.top .brand .by-m38 .by { font-size: 13px; font-weight: 600; color: var(--muted); }
header.top .brand img.m38 { height: 18px; width: auto; }
@media (max-width: 720px) { header.top .brand img.m38 { height: 14px; } header.top .brand .by-m38 .by { font-size: 11px; } }

/* trademark marks and the footer line */
sup.tm { font-size: 9px; font-weight: 700; vertical-align: super; line-height: 0; margin-left: 1px; color: var(--ink); }
header.top .brand sup.tm { align-self: flex-start; margin-top: 2px; }
.site-foot { max-width: 1180px; margin: 64px auto 0; padding: 32px 24px 28px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.foot-cols { display: grid; grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); gap: 28px; }
.foot-brand p { margin: 10px 0 0; max-width: 260px; line-height: 1.5; }
.foot-logo { height: 24px; width: auto; }
.foot-logo-light { display: var(--logo-light); } .foot-logo-dark { display: var(--logo-dark); }
.foot-col h2 { margin: 0 0 10px; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink); }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.foot-col a { color: var(--muted); text-decoration: none; display: inline-block; padding: 2px 0; }
.foot-col a:hover, .foot-col a:focus-visible { color: var(--ink); text-decoration: underline; }
.foot-legal { margin: 28px 0 0; padding-top: 18px; border-top: 1px solid var(--line); font-size: 12.5px; line-height: 1.5; }
@media (max-width: 760px) { .foot-cols { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }

/* B2B prospect list */
.b2b-tier { flex: none; width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; background: var(--soft); color: var(--muted); }
.b2b-tier.t-A { background: var(--success-soft); color: var(--success); }
.b2b-tier.t-B { background: var(--soft); color: var(--ink); }
.b2b-opener { font-size: 14px; background: var(--soft); border-radius: 10px; padding: 8px 12px; margin-top: 8px; }
@media (max-width: 720px) { .b2b-status { flex-basis: 100% !important; } }

.b2b-out .copy { white-space: pre-wrap; background: var(--soft); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin: 4px 0 6px; }
.b2b-email { margin-top: 10px; }

/* keyboard users: a skip link that appears only when focused */
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 1000; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; }
main:focus { outline: none; }

/* text for screen readers only */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Overview: what AI sent the client, next to what Potcake costs */
.roi { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 8px 32px; align-items: center; margin: 0 0 28px;
       padding: 24px 28px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.roi.paid { border: 2px solid var(--primary); padding: 23px 27px; }
.roi-head { margin: 6px 0 4px; font-size: clamp(22px, 2.6vw, 30px); font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; }
.roi-sub { margin: 0; font-size: 16px; color: var(--muted); }
.roi-sub b { color: var(--ink); }
.roi-nums { display: flex; gap: 28px; flex-wrap: wrap; }
.roi-nums b { display: block; font-size: 36px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; }
.roi-nums span { font-size: 13px; color: var(--muted); }
.roi-src { grid-column: 1 / -1; margin: 6px 0 0; }
@media (max-width: 760px) { .roi { grid-template-columns: minmax(0, 1fr); } }

/* Economics, paid media and Amazon ads calculators */
.ec-head { margin: 0 0 16px; }
.ec-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; }
.ec-bar .ec-f { flex: 1 1 220px; }
.ec-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.ec-inputs { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.ec-inputs .card, .ec-inputs fieldset.card { margin: 0 0 14px; }
fieldset.card { border: 1px solid var(--line); min-width: 0; }
fieldset.card legend { font-weight: 700; font-size: 16px; padding: 0 6px; }
.ec-f { display: flex; flex-direction: column; gap: 4px; margin: 0 0 10px; min-width: 0; }
.ec-f label { font-size: 14px; font-weight: 600; }
.ec-f .hint { font-weight: 400; color: var(--muted); }
.ec-in { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.ec-in input { flex: 1; min-width: 0; }
.ec-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ec-checks { display: flex; flex-direction: column; gap: 6px; }
.ec-out { margin: 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ec-out .hero { font-size: 44px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; }
.ec-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 12px 0; }
.ec-t { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ec-t .k { font-size: 12px; color: var(--muted); }
.ec-t .big { font-size: 20px; font-weight: 800; overflow-wrap: anywhere; }
.ec-t .s { font-size: 11px; color: var(--muted); }
.big.good, .hero.good { color: var(--success); }
.big.bad, .hero.bad { color: var(--error); }
.ec-lines { width: 100%; font-size: 14px; }
.ec-lines tr.sum td { font-weight: 700; border-top: 1.5px solid var(--ink); }
.ec-verdict { margin: 8px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--soft); font-size: 15px; line-height: 1.45; }
.ec-verdict:empty { display: none; }
.ec-ing input { width: 100%; min-width: 60px; }
.ec-wide { grid-column: 1 / -1; margin: 0; }
.ec-months { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin: 10px 0; }
.ec-months .ec-f label { font-size: 12px; }
.ec-fc { width: 100%; font-size: 14px; }
.ec-fc tr.warn td { background: var(--error-soft); }
.ec-fc tr.sum td { font-weight: 700; border-top: 1.5px solid var(--ink); }
.ec-fc td.neg { color: var(--error); }
@media (max-width: 900px) { .ec-grid { grid-template-columns: minmax(0, 1fr); } .ec-row2 { grid-template-columns: 1fr; } }

/* growth forecast */
.fc-tiles { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.fc-hl { border: 2px solid var(--primary); }
.fc-grid { stroke: var(--line); stroke-width: 1; }
.fc-ax { fill: var(--muted); font-size: 11px; }
.fc-l { fill: none; stroke-width: 2.5; }
.fc-l.asis { stroke: var(--muted); stroke-dasharray: 5 4; }
.fc-l.fixes { stroke: var(--ink); }
.fc-l.plan { stroke: var(--primary); stroke-width: 3; }
.fc-legend { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.fc-legend .sw { display: inline-block; width: 18px; height: 3px; vertical-align: middle; margin-right: 4px; }
.sw.asis { background: var(--muted); } .sw.fixes { background: var(--ink); } .sw.plan { background: var(--primary); }
.fc-drv input[type=number] { width: 72px; text-align: right; }
.fc-drv td { vertical-align: top; }
.fc-d.off td:not(:first-child) { opacity: .5; }
[data-leads-only][hidden] { display: none !important; }

/* forecast: spreadsheet import */
.fc-upl { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 8px 0; }
.fc-upl input[type=file] { padding: 8px 0; }
.fc-map { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px 12px; margin: 12px 0; display: flex; flex-wrap: wrap; gap: 12px; }
.fc-map legend { padding: 0 6px; font-weight: 600; }
.fc-map .ec-f { flex: 1 1 200px; }
.fc-cols { width: 100%; margin: 8px 0 12px; }
.fc-cols th[scope=row] { font-weight: 500; }
#fc-import details > summary { cursor: pointer; margin: 8px 0; }

/* revenue model */
.rv-bar.past { fill: var(--muted); opacity: .45; }
.rv-bar.next { fill: var(--primary); }
.fc-legend .sw.rv-past { background: var(--muted); opacity: .45; }
.fc-legend .sw.rv-next { background: var(--primary); }
.rv-fc input, .rv-hist input, .rv-in input[type=number] { width: 86px; text-align: right; }
.rv-hist .ec-in, .rv-in .ec-in { justify-content: flex-end; }
.rv-fc input.ov { font-weight: 700; border-color: var(--primary); }
.rv-streams input[type=text] { min-width: 140px; }
.rv-streams input[type=number] { width: 90px; text-align: right; }
.fc-legend .sw.rv-past, .fc-legend .sw.rv-next { height: 10px; border-radius: 2px; }
.rv-tiles { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
#rv-chart .rv-gap { stroke: var(--muted); stroke-dasharray: 4 4; }
.rv-drv { margin: 8px 0; padding-left: 18px; } .rv-drv li { margin: 0 0 8px; }
.rv-tiles [hidden], #rv-by-y2[hidden] { display: none; }

/* self-serve plans: the "+N more found, M38 can fix them" note under a capped list */
.plan-more { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--line-strong); font-size: 14px; }
.plan-more a { font-weight: 700; }

/* self-serve plans: a section outside the plan is a grayed-out button that doesn't open */
.pill.plan-off, .area.plan-off { cursor: not-allowed; pointer-events: none; }

/* M38 admin previewing a client's view */
.preview-bar { position: sticky; top: 0; z-index: 30; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  margin: 0 0 16px; padding: 10px 16px; border-radius: 14px; background: var(--hi); color: var(--hi-ink); font-size: 14px; }
.preview-bar .btn { background: var(--hi-ink); color: var(--hi); border-color: var(--hi-ink); }

/* a POST button that sits in the top bar like the other links (Billing) */
.nav-form { display: inline; margin: 0; }
.nav-link { font: inherit; color: inherit; background: none; border: 0; padding: 8px 12px; border-radius: 999px; cursor: pointer; }
.nav-link:hover { background: var(--soft); }
.nav-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* cookie consent banner (customer address public pages, _consent.html) */
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1000; max-width: 960px; margin: 0 auto;
           background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 14px;
           box-shadow: 0 10px 30px rgba(0, 0, 0, .18); padding: 18px 20px; }
.consent[hidden] { display: none; }
.consent-inner { display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.consent-inner > div:first-child { flex: 1 1 420px; }
.consent-title { font-size: 17px; margin: 0 0 4px; }
.consent p { margin: 0; font-size: 14px; line-height: 1.5; }
.consent-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.consent-actions .btn { min-width: 120px; }
