:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --border: #dde1e7;
  --text: #1c2330;
  --muted: #5f6b7a;
  --faint: #9aa4b1;
  /* --brand* come from src/config.js (PRODUCT.colors), injected into every page */
  --accent: var(--brand, #5b3fd9);
  --accent-text: #ffffff;
  --mark: #ffe58a;
  --mark-text: #1c2330;
  --ok: #1f8a4c;
  --warn: #a86b00;
  --err: #c0362c;
  --cited-bg: #e5f5ec;
  --mentioned-bg: #fdf4d9;
  --notfound-bg: #f0f2f5;
  --noanswer-bg: transparent;
  --error-bg: #fbe7e5;
  --radius: 8px;
  --mono: ui-monospace, 'Cascadia Mono', Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12151b;
    --surface: #1a1f27;
    --surface-2: #232a34;
    --border: #2f3844;
    --text: #e6e9ee;
    --muted: #a2acb9;
    --faint: #6b7584;
    --accent: var(--brand-on-dark, #a795ff);
    --accent-text: #0d1117;
    --mark: #8a6d00;
    --mark-text: #fff8dd;
    --ok: #52c483;
    --warn: #e0a93a;
    --err: #ef6b61;
    --cited-bg: #16341f;
    --mentioned-bg: #3a3010;
    --notfound-bg: #232a34;
    --error-bg: #3d1a18;
  }
}

@font-face { font-family: 'Inter'; src: url('/brand/inter-var.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
a { color: var(--accent); }
h1 { font-size: 1.5rem; margin: 0 0 4px; }
h2 { font-size: 1.1rem; margin: 28px 0 10px; }
h3 { font-size: 1rem; margin: 18px 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.mono { font-family: var(--mono); font-size: 0.85em; }

header.top {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: inset 0 3px 0 var(--accent);
}
header.top .inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}
header.top .brand { display: flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none; }
header.top .brand-mark { width: 28px; height: 28px; display: block; }
header.top .wordmark { font-family: 'Inter', system-ui, sans-serif; font-weight: 800; font-size: 1.2rem; letter-spacing: -0.02em; }
header.top .wordmark b { color: var(--accent); font-weight: 800; }
header.top nav { display: flex; gap: 16px; margin-left: auto; }
header.top nav a { text-decoration: none; color: var(--muted); }
header.top nav a.active, header.top nav a:hover { color: var(--text); }

main { max-width: 1200px; margin: 0 auto; padding: 24px 20px 60px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 16px;
}

label.field { display: block; font-weight: 600; margin-bottom: 6px; }
.hint { font-weight: 400; color: var(--muted); font-size: 0.85rem; }
input[type='text'], input[type='email'], textarea, select {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
}
textarea { min-height: 180px; resize: vertical; font-family: var(--mono); font-size: 0.9rem; }
textarea::placeholder, input::placeholder { color: var(--faint); }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
select:disabled, input:disabled { opacity: 0.55; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-loc { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.or-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: end; margin-top: 12px; }
.or-row .or { padding-bottom: 9px; color: var(--muted); font-size: 0.85rem; }
@media (max-width: 760px) {
  .grid-2, .grid-loc, .or-row { grid-template-columns: 1fr; }
  .or-row .or { padding: 0; }
}

button, .btn {
  font: inherit;
  font-weight: 600;
  border-radius: 6px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
button.primary, .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
button:disabled { opacity: 0.5; cursor: not-allowed; }
button.primary:disabled { opacity: 1; background: var(--surface-2); border-color: var(--border); color: var(--muted); }
button.link { background: none; border: none; padding: 0; color: var(--accent); font-weight: 400; }

.checks { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.checks label { display: flex; gap: 6px; align-items: center; cursor: pointer; }
.checks .price { color: var(--muted); font-size: 0.8rem; }

.estimate { font-size: 1.05rem; }
.estimate strong { font-size: 1.25rem; }
.error-box { color: var(--err); background: var(--error-bg); border-radius: 6px; padding: 8px 12px; margin-top: 12px; }
.error-box:empty { display: none; }

/* combobox */
.combo { position: relative; }
.combo .clear {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  border: none; background: none; color: var(--muted); padding: 2px 6px; font-weight: 400;
}
.combo ul {
  position: absolute; z-index: 10; left: 0; right: 0; top: calc(100% + 2px);
  margin: 0; padding: 4px 0; list-style: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: 6px;
  max-height: 280px; overflow-y: auto; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}
.combo li { padding: 6px 10px; cursor: pointer; }
.combo li .type { color: var(--muted); font-size: 0.8rem; margin-left: 6px; }
.combo li.active { background: var(--surface-2); }
.combo li.empty { color: var(--muted); cursor: default; }

.preview-list { margin: 10px 0 0; padding: 0; list-style: none; font-size: 0.85rem; }
.preview-list li { padding: 2px 0; color: var(--muted); }
.preview-list b { color: var(--text); font-weight: 600; }

/* tables */
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); font-weight: 600; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--surface-2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }

/* status pills */
.pill { display: inline-block; font-size: 0.8rem; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.pill.running { color: var(--accent); }
.pill.done { color: var(--ok); }
.pill.failed { color: var(--err); background: var(--error-bg); }
.pill.interrupted { color: var(--warn); }

.stats { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.stats div b { display: block; font-size: 1.2rem; }
.stats div span { color: var(--muted); font-size: 0.8rem; }

/* results grid */
.results-grid th.term-col { min-width: 160px; }
.results-grid td.cell { cursor: pointer; white-space: nowrap; border-left: 1px solid var(--border); }
.results-grid td.cell:hover { outline: 2px solid var(--accent); outline-offset: -2px; }
.results-grid td.cell.selected { outline: 2px solid var(--accent); outline-offset: -2px; }
.results-grid td.FOUND { background: var(--cited-bg); }
.results-grid td.NOT_FOUND { background: var(--notfound-bg); }
.results-grid td.system { color: var(--faint); }
.results-grid .cell small { display: block; color: var(--muted); font-size: 0.75rem; }
.results-grid td.system small { color: var(--faint); }
.results-grid .found-col { white-space: nowrap; border-left: 1px solid var(--border); font-weight: 600; }
.system-note { color: var(--faint); }
.stats .headline b { font-size: 1.35rem; }
.how-found { background: var(--cited-bg); border-radius: 6px; padding: 8px 12px; margin-bottom: 10px; font-size: 0.9rem; }
.how-found ul { margin: 4px 0 0; padding-left: 18px; }
.how-found li { word-break: break-word; }

/* live results */
.live-summary { margin-bottom: 10px; }
.live-summary .headline { font-size: 1.45rem; font-weight: 700; }
.live-summary .sub { color: var(--muted); font-size: 0.9rem; }
.live-summary .progress { margin-top: 4px; font-size: 0.9rem; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 4px; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.25; } }
.results-grid td.pending { color: var(--muted); cursor: default; }
.results-grid td.pending:hover { outline: none; }
.checking { animation: pulse 1.6s ease-in-out infinite; }
.cell-inner.flip { animation: flip-in 0.45s ease-out; transform-origin: 50% 0; }
@keyframes flip-in { from { transform: rotateX(80deg); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .cell-inner.flip, .checking, .live-dot { animation: none; } }

.queue-waits ul { margin: 4px 0; padding-left: 18px; font-size: 0.9rem; }
.queue-waits .over { color: var(--warn); font-size: 0.8rem; font-weight: 600; }
.report-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
/* partner offer: a separate sister tool, so it uses the partner's own colours (--p-*, set inline from config) */
.partner { margin-bottom: 16px; }
.partner[hidden] { display: none; }
.partner-label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px 2px; }
.partner-card {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px;
  background: linear-gradient(135deg, var(--p-tint) 0%, #ffffff 70%);
  border: 1px solid var(--p-border); border-radius: 12px; padding: 18px 22px; color: var(--p-ink);
}
.partner-logo { display: flex; flex-direction: column; align-items: center; gap: 4px; font-family: 'Inter', system-ui, sans-serif; font-weight: 700; font-size: 0.8rem; }
.partner-logo img { width: 48px; height: 48px; display: block; }
.partner-text b { display: block; font-family: 'Inter', system-ui, sans-serif; font-size: 1.1rem; }
.partner-text span { color: #5f6368; font-size: 0.92rem; }
.partner-button { background: var(--p-primary); color: #fff; font-weight: 700; text-decoration: none; padding: 10px 20px; border-radius: 999px; white-space: nowrap; }
.partner-button:hover { background: var(--p-primary-dark); }
@media (max-width: 640px) {
  .partner-card { grid-template-columns: 1fr; text-align: center; justify-items: center; }
}

/* thumbnails + lightbox */
.thumb { display: block; padding: 0; margin-top: 6px; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; background: var(--surface); cursor: zoom-in; }
.thumb-frame { display: block; overflow: hidden; background: #fff; max-width: 100%; }
.thumb-frame img { display: block; max-width: none; }
.thumb:hover { border-color: var(--accent); }
.thumb-pending { display: block; margin-top: 6px; font-size: 0.75rem; color: var(--muted); }
.detail-image { margin-bottom: 12px; }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(10, 12, 16, 0.86); display: flex; flex-direction: column; }
.lightbox[hidden] { display: none; }
.lightbox-bar { display: flex; align-items: center; gap: 16px; padding: 10px 16px; color: #e6e9ee; font-size: 0.9rem; }
.lightbox-bar #lightbox-caption { flex: 1; }
.lightbox-bar a { color: #9dbaff; }
.lightbox-bar button { background: #2a313b; color: #e6e9ee; border-color: #3a4350; }
.lightbox-scroll { flex: 1; overflow: auto; padding: 0 16px 24px; text-align: center; }
.lightbox-scroll img { max-width: min(100%, 1400px); height: auto; box-shadow: 0 6px 30px rgba(0, 0, 0, 0.5); background: #fff; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.85rem; color: var(--muted); margin: 8px 0 12px; }

.detail-row > td { background: var(--surface-2); padding: 16px 18px; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 0.85rem; color: var(--muted); margin-bottom: 10px; }
.detail-meta b { color: var(--text); font-weight: 600; }
.answer {
  white-space: pre-wrap; word-break: break-word;
  background: var(--surface); border: 1px solid var(--border); border-radius: 6px;
  padding: 12px 14px; max-height: 420px; overflow-y: auto; font-size: 0.9rem;
}
mark { background: var(--mark); color: var(--mark-text); padding: 0 1px; border-radius: 2px; }
ol.sources { margin: 0; padding-left: 22px; font-size: 0.88rem; }
ol.sources li { margin-bottom: 6px; }
ol.sources li.ours { background: var(--cited-bg); border-radius: 4px; padding: 2px 6px; }
ol.sources .src-domain { font-weight: 600; }
ol.sources .src-url { color: var(--muted); font-size: 0.8rem; word-break: break-all; }
ul.match-summary { margin: 0 0 10px; padding-left: 18px; font-size: 0.88rem; }
.detail-cols { display: grid; grid-template-columns: 3fr 2fr; gap: 18px; }
@media (max-width: 900px) { .detail-cols { grid-template-columns: 1fr; } }

.project { margin-bottom: 22px; }
.project-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; margin-bottom: 8px; }
.project-head h2 { margin: 0; }
.project-head .actions { margin-left: auto; display: flex; gap: 8px; }
.empty-state { text-align: center; padding: 50px 20px; color: var(--muted); }

/* project tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 14px 0 18px; }
.tabs .tab { padding: 9px 16px; font-weight: 600; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs .tab:hover { color: var(--text); }
.tabs .tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.tabs .tab.disabled { opacity: 0.5; }

/* Google Rankings tab */
.competitors { display: grid; gap: 6px; }
.depth-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.depth-options label { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; cursor: pointer; }
.depth-options label:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
@media (max-width: 760px) { .depth-options { grid-template-columns: 1fr; } }
label.fresh { display: block; margin-top: 12px; font-size: 0.9rem; cursor: pointer; }
.estimate .free { color: var(--ok); font-weight: 600; }
.rank-terms { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); gap: 14px; margin-top: 12px; }
.rank-term { border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; background: var(--surface); min-width: 0; }
.rank-term h3 { margin: 0 0 8px; font-size: 1.05rem; }
.rank-term.pending { color: var(--muted); }
.rank-term.flip { animation: flip-in 0.45s ease-out; transform-origin: 50% 0; }
.rank-table { font-size: 0.9rem; }
.rank-table td, .rank-table th { padding: 6px 8px; }
.rank-table td:first-child { white-space: nowrap; }
.rank-table tr.you td { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.rank-table td.url { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.85rem; }
.rank-table .pos { font-size: 1.05rem; }
.not-ranked { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.you-tag { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent); }
.chg { font-weight: 700; font-size: 0.85rem; white-space: nowrap; }
.chg.up { color: var(--ok); }
.chg.down { color: var(--err); }
.chg.flat { color: var(--faint); }
.rank-chart { margin-top: 10px; }
.rank-chart svg { width: 100%; height: auto; display: block; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.8rem; color: var(--muted); }
.chart-legend .lg i { display: inline-block; width: 14px; height: 4px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.chart-note { margin: 8px 0 0; }
.rank-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 10px; }
.rank-foot .link { font-size: 0.85rem; }
.serp-box { margin-top: 8px; max-height: 420px; overflow-y: auto; }
ol.serp { list-style: none; margin: 0; padding: 0; font-size: 0.85rem; }
ol.serp li { display: flex; gap: 10px; padding: 6px 8px; border-left: 3px solid transparent; border-bottom: 1px solid var(--border); }
ol.serp li.hit { background: var(--surface-2); }
ol.serp .rk { width: 26px; text-align: right; font-weight: 700; color: var(--muted); flex: none; }
ol.serp a { color: var(--muted); font-size: 0.78rem; word-break: break-all; }
#history tr.current td { background: var(--surface-2); font-weight: 600; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 14px 0 4px; }
.section-head h3 { margin: 0; }
.section-head .btn, .section-head button { padding: 5px 12px; font-size: 0.9rem; }

/* share panel */
button.share-btn { background: var(--brand-tint, #efebfd); border-color: var(--accent); color: var(--accent); }
@media (prefers-color-scheme: dark) { button.share-btn { background: transparent; } }
.modal { position: fixed; inset: 0; z-index: 90; background: rgba(10, 12, 20, 0.72); display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 24px 16px; }
.modal[hidden] { display: none; }
.modal-box { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; width: min(1120px, 100%); padding: 18px 22px 22px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.modal-head h2 { margin: 0; }
.share-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; }
@media (max-width: 860px) { .share-grid { grid-template-columns: 1fr; } }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 99px; padding: 3px; margin-bottom: 10px; flex-wrap: wrap; }
.seg button { border: none; background: none; border-radius: 99px; padding: 5px 14px; font-weight: 600; color: var(--muted); }
.seg button.on { background: var(--accent); color: var(--accent-text); }
.preview-frame { position: relative; background: repeating-conic-gradient(var(--surface-2) 0% 25%, var(--surface) 0% 50%) 50% / 18px 18px; border: 1px solid var(--border); border-radius: 10px; padding: 12px; max-height: 70vh; overflow-y: auto; text-align: center; min-height: 200px; }
.preview-frame img { max-width: 100%; height: auto; border-radius: 8px; box-shadow: 0 8px 30px rgba(0,0,0,.25); }
.preview-frame img.v-badge { max-width: min(100%, 620px); }
.preview-loading { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); background: var(--surface); border: 1px solid var(--border); border-radius: 99px; padding: 3px 12px; font-size: 0.85rem; color: var(--muted); }
.preview-loading[hidden] { display: none; }
.share-side h3 { margin: 16px 0 8px; }
.share-side h3:first-child { margin-top: 0; }
label.switch { display: flex; align-items: center; gap: 10px; margin: 8px 0; cursor: pointer; }
label.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
label.switch > span:first-of-type { flex: none; width: 38px; height: 22px; border-radius: 99px; background: var(--border); position: relative; transition: background .15s; }
label.switch > span:first-of-type::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
label.switch input:checked + span { background: var(--accent); }
label.switch input:checked + span::after { transform: translateX(16px); }
label.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
#sh-display { margin: 0 0 6px 48px; width: calc(100% - 48px); }
.row-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.copy-row { display: flex; gap: 6px; margin-top: 8px; }
.copy-row input { flex: 1; min-width: 0; font-family: var(--mono); font-size: 0.8rem; }
.radio-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin-bottom: 8px; font-size: 0.9rem; }
.radio-row label { cursor: pointer; }
#sh-embed-box textarea { min-height: 110px; font-size: 0.75rem; margin: 8px 0 6px; }
.local-note { background: var(--mentioned-bg); border-radius: 6px; padding: 8px 12px; font-size: 0.85rem; margin-top: 14px; }
.share-list { list-style: none; padding: 0; margin: 0; font-size: 0.85rem; }
.share-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.share-list a { word-break: break-all; }

/* live result card (the shared card component, zoomed to fit) */
.live-card-section { margin: 0 auto 18px; max-width: 720px; }
.live-card-section[hidden] { display: none; }
.rr-stage { position: relative; border-radius: 18px; overflow: hidden; box-shadow: 0 18px 50px rgba(28, 16, 90, 0.28); background: #120c33; }
.rr-zoom { width: 1080px; }
.rr-stage canvas.confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.card-actions { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 14px; }
.card-actions .share-btn { font-size: 1.05rem; padding: 11px 38px; border-radius: 99px; }
.card-actions .share-btn:not(:disabled) { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.card-actions .share-btn:disabled { opacity: 0.55; }
.share-btn.reveal { animation: share-in 0.7s ease-out, share-glow 2.2s ease-in-out 0.7s 3; }
@keyframes share-in { from { opacity: 0; transform: translateY(8px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes share-glow { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 22%, transparent), 0 0 26px color-mix(in srgb, var(--accent) 45%, transparent); } }
@media (prefers-reduced-motion: reduce) { .share-btn.reveal { animation: none; } }

/* the hidden attribute always wins (buttons set display: inline-block) */
[hidden] { display: none !important; }

/* Tab 3: AI Citation Sources */
.help-card p { margin: 0 0 6px; }
.help-card p:last-child { margin: 0; }
.cite-headline { font-size: 1.25rem; font-weight: 700; line-height: 1.35; }
.cite-focus { margin: 10px 0 6px; line-height: 2; }
.focus-chip { display: inline-block; background: var(--cited-bg); color: var(--ok); font-weight: 700; border-radius: 99px; padding: 1px 12px; margin-right: 4px; line-height: 1.7; }
.focus-chip small { color: var(--muted); font-weight: 500; }
.cite-changes { margin-top: 10px; font-size: 0.92rem; }
.cite-changes details { margin-top: 6px; }
.cite-changes details div { margin: 6px 0; line-height: 1.9; }
.site-chip { display: inline-block; background: var(--surface-2); border-radius: 99px; padding: 0 9px; font-size: 0.82rem; margin: 0 2px; }
.site-chip.new { background: var(--cited-bg); color: var(--ok); }
.cite-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 12px; align-items: start; margin-bottom: 14px; }
.cite-filters label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 0.85rem; }
.cite-filters .hint { font-weight: 400; font-size: 0.75rem; }
.cite-actions { padding-top: 21px; }
@media (max-width: 900px) { .cite-filters { grid-template-columns: 1fr 1fr; } .cite-actions { padding-top: 0; } }
@media (max-width: 520px) { .cite-filters { grid-template-columns: 1fr; } }
.cite-table td { vertical-align: middle; }
.cite-table td.site { font-weight: 600; white-space: nowrap; }
.cite-table td.site a { color: var(--text); text-decoration: none; }
.cite-table td.site a:hover { color: var(--accent); text-decoration: underline; }
.cite-table td.terms { font-size: 0.85rem; max-width: 260px; }
.cite-table tr.own td { background: var(--cited-bg); }
.cite-table tr.competitor td { background: var(--mentioned-bg); }
.cite-table tr.examples td { background: var(--surface-2); }
.cite-table tr.examples ol { margin: 0; padding-left: 22px; font-size: 0.88rem; }
.cite-table tr.examples li { margin: 4px 0; word-break: break-all; }
.tag { display: inline-block; font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; border-radius: 4px; padding: 1px 6px; margin-left: 4px; vertical-align: 1px; }
.tag.you { background: var(--ok); color: #fff; }
.tag.comp { background: var(--warn); color: #fff; }
.tag.new { background: var(--accent); color: var(--accent-text); }
.sbadge { display: inline-block; font-size: 0.7rem; font-weight: 700; border-radius: 4px; padding: 1px 6px; margin: 1px 3px 1px 0; background: var(--surface-2); color: var(--muted); white-space: nowrap; border: 1px solid var(--border); }
.type-pill { display: inline-block; font-size: 0.78rem; border-radius: 99px; padding: 1px 10px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.spark polyline { stroke: var(--faint); }
.spark.up polyline { stroke: var(--ok); }
.spark.down polyline { stroke: var(--err); }
.cite-more { margin-top: 10px; }
.cite-table td.terms { max-width: 240px; }
.cite-table td.terms b { display: block; font-weight: 600; }
.cite-table td.terms .one { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.8rem; }
.cite-table td.surf { max-width: 230px; }
.cite-table td button.link { white-space: nowrap; }

/* project hub */
html:not(.dev) .dev-only { display: none !important; }
.dev-line { font: 12px/1.5 var(--mono); color: var(--faint); margin-top: 10px; }
.dev-line::before { content: 'DEV'; font-weight: 700; font-size: 10px; letter-spacing: 0.05em; background: var(--surface-2); border: 1px solid var(--border); border-radius: 3px; padding: 0 4px; margin-right: 6px; vertical-align: 1px; }
td.dev-only, th.dev-only { font-family: var(--mono); font-size: 0.8rem; color: var(--faint); }
.tabs .settings-link { margin-left: auto; font-weight: 500; font-size: 0.9rem; }
@media (max-width: 640px) { .tabs { flex-wrap: wrap; } .tabs .tab { padding: 8px 10px; } .tabs .settings-link { margin-left: 0; } }
.run-form > summary { cursor: pointer; font-size: 1.02rem; }
.run-form[open] > summary { margin-bottom: 12px; }
.run-form form > .hint:first-child { margin-top: 0; }
.checks.stacked { flex-direction: column; gap: 6px; }
.older-note { background: var(--mentioned-bg); border-radius: 6px; padding: 8px 12px; margin: 0 0 10px; font-size: 0.9rem; }
.run-date { margin-bottom: 8px; }
#ai-history tr.current td, #history tr.current td { background: var(--surface-2); font-weight: 600; }
.field-help { color: var(--muted); font-size: 0.85rem; margin: 2px 0 8px; }
.field-help code { font-family: var(--mono); font-size: 0.82rem; background: var(--surface-2); padding: 0 4px; border-radius: 3px; }
.readonly-line { background: var(--surface-2); border-radius: 8px; padding: 10px 12px; font-size: 0.9rem; margin: 4px 0 14px; }
.project-list { display: grid; gap: 12px; }
.project-row { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)) auto; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; text-decoration: none; color: var(--text); }
.project-row:hover { border-color: var(--accent); }
.project-row h2 { margin: 0 0 2px; font-size: 1.05rem; }
.project-row .col-label { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 600; }
.project-row .open { color: var(--accent); font-weight: 600; white-space: nowrap; }
@media (max-width: 760px) { .project-row { grid-template-columns: 1fr; gap: 6px; } }
.dev-line:empty { display: none; }

/* New project: the tool's first screen */
.step-no { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--accent-text); font-size: 0.85rem; font-weight: 800; margin-right: 8px; vertical-align: 1px; }
.step .field { font-size: 1.05rem; }
textarea.short { min-height: 110px; }
.run-summary { margin-top: 16px; padding: 10px 14px; border-radius: 8px; background: var(--surface-2); font-size: 0.95rem; line-height: 1.5; }
button.big { font-size: 1.05rem; padding: 11px 34px; }

/* Tab 4: Questions & Fan-out Finder */
.lookup-row { display: flex; gap: 10px; }
.lookup-row input { flex: 1; min-width: 0; }
.lookup-list { list-style: none; padding: 0; margin: 12px 0 0; font-size: 0.9rem; }
.lookup-list li { padding: 5px 0; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.lookup-list li:empty { display: none; }
.err-text { color: var(--err); }
.q-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 320px)); gap: 12px; margin-bottom: 10px; }
.q-filters label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 0.85rem; }
.q-filters .hint { font-weight: 400; font-size: 0.75rem; }
@media (max-width: 640px) { .q-filters { grid-template-columns: 1fr; } }
.q-counts { font-size: 0.9rem; margin: 6px 0 12px; line-height: 2; }
.q-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.q-status { background: var(--cited-bg); border-radius: 6px; padding: 8px 12px; margin-bottom: 10px; font-size: 0.9rem; }
.q-table th.pick, .q-table td.pick { width: 34px; text-align: center; }
.q-table td { vertical-align: middle; }
.q-table td.q { font-weight: 500; }
.q-table tr.group-row td { background: var(--surface-2); padding-top: 9px; }
.q-table tr.picked td { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.src-badge { display: inline-block; font-size: 0.72rem; font-weight: 700; border-radius: 4px; padding: 1px 7px; white-space: nowrap; border: 1px solid transparent; }
.src-fanout { background: var(--accent); color: var(--accent-text); }
.src-paa { background: var(--cited-bg); color: var(--ok); }
.src-related { background: var(--surface-2); color: var(--muted); border-color: var(--border); }
.src-autocomplete { background: var(--mentioned-bg); color: var(--warn); }
.cite-detail { color: var(--muted); font-size: 0.92rem; margin-top: 4px; }
.tag.about { background: #0b7bd6; color: #fff; }
.cite-table tr.about td { background: color-mix(in srgb, #0b7bd6 8%, transparent); }

/* Tab 5: Competitors & Share of Voice */
.sov-filters { grid-template-columns: repeat(3, minmax(0, 1fr)) auto; }
@media (max-width: 900px) { .sov-filters { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .sov-filters { grid-template-columns: 1fr; } }
.sov-h { margin: 6px 0 10px; }
.sov-who { margin-top: 8px; }
.sov-bars { display: grid; gap: 14px; }
.sov-entity { display: grid; grid-template-columns: minmax(0, 190px) minmax(0, 1fr); column-gap: 14px; row-gap: 3px; align-items: center; }
.sov-name { grid-row: span 3; font-weight: 700; overflow-wrap: anywhere; }
.sov-bar { grid-column: 2; display: grid; grid-template-columns: 86px minmax(0, 1fr) 46px; gap: 8px; align-items: center; font-size: 0.85rem; }
.sov-metric { color: var(--muted); }
.sov-track { height: 12px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.sov-track i { display: block; height: 100%; border-radius: 99px; }
.sov-bar.m-google .sov-track i { opacity: 0.7; }
.sov-bar.m-combined { font-weight: 700; }
.sov-bar.m-combined .sov-track { height: 16px; }
.sov-bar b { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .sov-entity { grid-template-columns: 1fr; } .sov-name { grid-row: auto; } .sov-bar { grid-column: 1; } }
.sov-explain { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 8px; }
.sov-explain p { margin: 2px 0; }
.sov-suggest { margin-top: 12px; background: var(--surface-2); border-radius: 8px; padding: 10px 14px; }
.sov-suggest ul { list-style: none; margin: 6px 0 0; padding: 0; }
.sov-suggest li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 6px 0; border-top: 1px solid var(--border); }
.sov-suggest .site-name { font-weight: 700; }
.sov-suggest button { margin-left: auto; }
button.small-btn { padding: 4px 12px; font-size: 0.85rem; }
.sov-table td { font-size: 0.88rem; min-width: 120px; }
.sov-table td.term { font-weight: 600; min-width: 180px; max-width: 320px; }
.sov-table td.leader { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.sov-table td.lead { white-space: nowrap; font-weight: 600; min-width: 0; }
.sov-table .lbl { display: inline-block; min-width: 50px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.sov-table .sov-g { margin-top: 3px; }
.sov-table tr.own td { background: var(--cited-bg); }
.sov-table tr.competitor td { background: var(--mentioned-bg); }
.sov-local-shares { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 4px 0 10px; font-size: 0.9rem; }
.sov-table th.who { text-transform: none; font-size: 0.85rem; color: var(--text); white-space: nowrap; }
.tabs { flex-wrap: wrap; }
.tabs .tab { white-space: nowrap; }
.section-head:has(#metric-seg) { flex-wrap: wrap; }
.section-head #metric-seg { margin-bottom: 0; }

/* Tab 6: Search Volume & CPC */
.vol-status { font-size: 1rem; }
.vol-notes p { margin: 6px 0 0; }
.vol-actions { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.vol-filters { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 0.6fr) auto; margin-top: 16px; }
.vol-filters input[type='text'] { font-weight: 400; }
@media (max-width: 900px) { .vol-filters { grid-template-columns: 1fr 1fr; } .vol-filters > div:empty { display: none; } }
@media (max-width: 520px) { .vol-filters { grid-template-columns: 1fr; } }
.vol-table td { vertical-align: middle; }
.vol-table td.term { font-weight: 600; min-width: 200px; }
.vol-table td.num { white-space: nowrap; }
.vol-table .vol-low { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
.vol-table .est { display: inline-block; font-size: 0.65rem; font-weight: 700; letter-spacing: 0.04em; background: var(--mentioned-bg); color: var(--warn); border-radius: 4px; padding: 0 5px; vertical-align: 1px; }
.type-pill.comp-high { background: var(--error-bg); color: var(--err); }
.type-pill.comp-medium { background: var(--mentioned-bg); color: var(--warn); }
.type-pill.comp-low { background: var(--cited-bg); color: var(--ok); }
.vol-table td.num .vol-lookup { white-space: normal; max-width: 210px; margin-left: auto; text-align: right; line-height: 1.3; margin-top: 2px; }

/* "Check terms" box (every project tab) */
.check-box .check-head { font-size: 1.02rem; }
.check-box .check-help { margin: 4px 0 8px; }
.check-box textarea.check-terms { min-height: 76px; }
.check-box .check-summary { margin-top: 10px; }
.check-actions { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.check-location { margin-top: 10px; }
.check-location > summary { cursor: pointer; font-size: 0.92rem; }
.check-location[open] > summary { margin-bottom: 8px; }
.loc-pill { display: inline-block; font-size: 0.75rem; font-weight: 600; border-radius: 99px; padding: 0 8px; background: var(--mentioned-bg); color: var(--warn); margin-top: 2px; }
.vol-table tr.group-row td { background: var(--surface-2); }

/* Share panel: one-click social sharing */
.social-btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 6px; }
.soc { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 99px; font-size: 0.9rem; color: #fff; border: none; }
.soc-facebook { background: #1877f2; }
.soc-linkedin { background: #0a66c2; }
.soc-x { background: #0f1419; }
.soc-whatsapp { background: #1fa855; }
.soc-reddit { background: #ff4500; }
.soc-email { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.soc-copy { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.soc-native { background: var(--accent); color: var(--accent-text); }
@media (prefers-color-scheme: dark) { .soc-x { background: #000; border: 1px solid #333; } }

/* Site footer: Follow icons + Support */
footer.site { border-top: 1px solid var(--border); margin-top: 24px; }
footer.site .inner { max-width: 1200px; margin: 0 auto; padding: 16px 20px 28px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; font-size: 0.85rem; color: var(--muted); }
.follow { display: flex; align-items: center; gap: 6px; --social-bg: var(--bg); }
.follow-label { font-weight: 600; margin-right: 4px; }
.follow-link { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: var(--muted); }
.follow-link:hover { color: var(--accent); background: var(--surface-2); }
.foot-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.foot-links a { color: var(--muted); }
.foot-links a:hover { color: var(--accent); }
/* The JVZoo disclaimer (pages with a JVZoo buy link): the footer's last line, full width, below a thin line. */
footer.site.sales .inner { justify-content: center; }
footer.site.sales .foot-links { justify-content: center; }
footer.site .jvzoo-disclaimer { flex-basis: 100%; width: 100%; margin: 10px 0 0; padding-top: 20px; border-top: 1px solid var(--border); font-size: 0.75rem; line-height: 1.65; color: var(--muted); text-align: center; }
.copy-row.ig-caption { align-items: flex-start; }
.copy-row.ig-caption textarea { flex: 1; min-height: 110px; font-family: inherit; font-size: 0.85rem; }
/* Admin-only details (raw API responses name the data supplier; customers never see them) */
.admin-only { display: none !important; }
html.admin .admin-only { display: revert !important; }
.family-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }

/* ---------- accounts & credits ---------- */
header.top nav { margin-left: auto; }
.credits-chip { white-space: nowrap; font-size: 0.85rem; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: var(--brand-tint, #efebfd); color: var(--brand-dark, #4128b0); text-decoration: none; }
.credits-chip.low { background: #fdf0d9; color: #8a5300; }
.credits-chip:hover { box-shadow: inset 0 0 0 1px var(--accent); }
.upgrade-pill { white-space: nowrap; font-size: 0.78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; border: 1px solid rgba(91, 63, 217, 0.4); color: var(--accent); text-decoration: none; margin-left: -12px; }
.upgrade-pill:hover { background: var(--brand-tint, #efebfd); border-color: var(--accent); }
@media (prefers-color-scheme: dark) { .upgrade-pill { border-color: rgba(167, 149, 255, 0.4); } .upgrade-pill:hover { background: rgba(167, 149, 255, 0.14); } }
@media (prefers-color-scheme: dark) { .credits-chip { background: rgba(167, 149, 255, 0.14); color: var(--brand-on-dark, #a795ff); } .credits-chip.low { background: #3a2c0c; color: #f0c35e; } }
.user-menu { position: relative; }
.user-menu summary { list-style: none; cursor: pointer; }
.user-menu summary::-webkit-details-marker { display: none; }
/* Account button: person icon (or the Google photo) + ▾, brand purple, clearly a menu. */
.user-menu summary { border-radius: 999px; }
.user-menu summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.acct-btn { display: inline-flex; align-items: center; gap: 3px; height: 36px; padding: 0 9px 0 5px; border: 1px solid rgba(91, 63, 217, 0.35); border-radius: 999px; background: var(--surface); color: var(--accent); transition: background 0.15s, border-color 0.15s, box-shadow 0.15s; }
.user-menu summary:hover .acct-btn, .user-menu[open] .acct-btn { background: var(--brand-tint, #efebfd); border-color: var(--accent); box-shadow: 0 0 0 3px rgba(91, 63, 217, 0.14); }
.acct-face { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; overflow: hidden; flex: none; }
.acct-face.has-photo img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; display: block; }
.acct-caret { font-size: 0.95rem; line-height: 1; transition: transform 0.15s; }
.user-menu[open] .acct-caret { transform: rotate(180deg); }
@media (prefers-color-scheme: dark) {
  .acct-btn { border-color: rgba(167, 149, 255, 0.4); }
  .user-menu summary:hover .acct-btn, .user-menu[open] .acct-btn { background: rgba(167, 149, 255, 0.14); }
}
.user-menu-box { position: absolute; right: 0; top: 44px; z-index: 30; min-width: 220px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15); display: grid; gap: 6px; }
.user-menu-box a { color: var(--text); text-decoration: none; padding: 4px 6px; border-radius: 6px; }
.user-menu-box a:hover { background: var(--surface-2); }
.user-menu-box button { width: 100%; text-align: left; }
.user-menu-box div { word-break: break-all; padding: 2px 6px 6px; border-bottom: 1px solid var(--border); }
/* Phones: the logo and the account button share the top row (button top-right, so its menu opens on
   screen); the credits chip goes on the next row, then the page links. */
@media (max-width: 640px) {
  header.top .inner { flex-wrap: wrap; gap: 10px 14px; }
  header.top .user-menu { margin-left: auto; }
  header.top .inner::after { content: ''; order: 1; flex-basis: 100%; height: 0; }
  .credits-chip { order: 2; }
  .upgrade-pill { order: 2; margin-left: -6px; }
  header.top nav { order: 3; width: 100%; margin-left: 0; }
  .user-menu-box { max-width: calc(100vw - 32px); }
}
.credit-cost { font-weight: 700; white-space: nowrap; }
.credits-modal { position: fixed; inset: 0; z-index: 100; background: rgba(10, 8, 30, 0.55); display: grid; place-items: center; padding: 16px; }
.credits-modal-box { background: var(--surface); color: var(--text); border-radius: 16px; max-width: 460px; width: 100%; padding: 28px 26px; text-align: center; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3); }
.credits-modal-box h2 { margin: 6px 0 10px; font-size: 1.35rem; }
.credits-modal-icon { font-size: 2rem; }
.credits-modal-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; }

/* ---------- projects list: archive / delete ---------- */
.project-item { position: relative; }
.project-item .project-row { padding-right: 120px; }
/* "⋯ More" on each project card: a real button, not faint dots (Pete). */
.project-actions { position: absolute; top: 50%; right: 12px; transform: translateY(-50%); }
.project-actions summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font-size: 0.88rem; font-weight: 600; line-height: 1.2; white-space: nowrap; }
.project-actions summary .dots { font-size: 1.05rem; line-height: 1; letter-spacing: 1px; }
.project-actions summary::-webkit-details-marker { display: none; }
.project-actions summary:hover, .project-actions[open] summary { background: var(--surface-2); border-color: var(--accent); }
.project-actions summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.project-actions .menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 6px; display: grid; gap: 4px; min-width: 150px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15); }
.project-actions .menu button { text-align: left; width: 100%; }
.project-actions .menu button.danger { color: var(--err); }
.list-tools { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin: 4px 0 14px; }
.list-tools label { display: inline-flex; gap: 6px; align-items: center; font-size: 0.9rem; color: var(--muted); }
.owner-tag { font-size: 0.75rem; color: var(--muted); }

/* ---------- welcome ---------- */
.welcome-hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 860px) { .welcome-hero { grid-template-columns: 1fr; } }
.video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #120c33; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-soon { display: grid; place-items: center; text-align: center; color: #fff; background: radial-gradient(70% 90% at 80% 0%, rgba(91, 63, 217, 0.7), transparent), #120c33; }
.video-soon > div { display: grid; gap: 6px; justify-items: center; padding: 20px; }
.video-soon .play { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.3); margin-bottom: 6px; }
.video-soon span:last-child { color: rgba(255, 255, 255, 0.72); font-size: 0.9rem; }
.big-credits { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: var(--accent); }
.example-box { border: 2px dashed var(--border); border-radius: 12px; padding: 16px; margin: 12px 0; background: var(--surface-2); }
.example-box dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; }
.example-box dt { color: var(--muted); font-size: 0.85rem; }
.example-box dd { margin: 0; font-weight: 600; }
.price-list { margin: 8px 0 0; padding-left: 18px; color: var(--muted); font-size: 0.9rem; }

/* ---------- admin ---------- */
.admin-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: 16px; }
.admin-stats div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.admin-stats b { display: block; font-size: 1.4rem; }
.admin-stats span { color: var(--muted); font-size: 0.8rem; }
.table-scroll { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.admin-table th, .admin-table td { padding: 7px 8px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.admin-table td.num, .admin-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.grant-form { display: flex; gap: 4px; }
.grant-form input { width: 70px; padding: 4px 6px; }
.grant-form input[name='note'] { width: 120px; }
.grant-form button { padding: 4px 10px; }
.cap-meter { height: 12px; border-radius: 99px; background: var(--surface-2); overflow: hidden; max-width: 520px; }
.cap-meter span { display: block; height: 100%; background: var(--ok); border-radius: 99px; }
.cap-meter span.hot { background: var(--err); }
.admin-list { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 6px; }

/* ---------- scheduled tracking ---------- */
/* Free plan: a quiet line above the footer (common.js planNotes). */
.plan-note { max-width: 1160px; margin: 28px auto 0; padding: 0 20px; text-align: center; font-size: 0.82rem; color: var(--muted, #6b6780); }
.plan-note a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
/* Only when it matters: credits low / used up, last 24 hours of storage. */
.app-notice { background: #fff4d6; color: #5a3d00; padding: 9px 20px; text-align: center; font-size: 0.9rem; border-bottom: 1px solid #f0d99a; }
.app-notice a { color: inherit; font-weight: 700; }
@media (prefers-color-scheme: dark) { .app-notice { background: #3a2c0c; color: #f5d98f; border-color: #5a4515; } }
.sim-banner-app, .sim-pill { background: #ffb300; color: #1a1200; font-weight: 700; }
.sim-banner-app { padding: 8px 14px; border-radius: 8px; margin: 0 0 10px; }
.sim-pill { font-size: 0.72rem; padding: 1px 8px; border-radius: 99px; white-space: nowrap; }
.tabs .track-link { border: 0; background: none; font: inherit; cursor: pointer; margin-left: auto; color: var(--accent); }
.tabs .track-link + .settings-link { margin-left: 0; }
.sd-back { position: fixed; inset: 0; z-index: 90; background: rgba(10, 8, 30, 0.55); display: grid; place-items: center; padding: 16px; overflow: auto; }
.sd-modal { background: var(--surface); color: var(--text); border-radius: 14px; width: min(760px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 22px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3); }
.sd-modal h2 { margin: 0 0 6px; font-size: 1.3rem; }
.sd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 22px; margin: 12px 0; }
@media (max-width: 640px) { .sd-grid { grid-template-columns: 1fr; } }
.sd-terms { max-height: 220px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; }
.sd-terms label { display: flex; gap: 8px; padding: 3px 0; align-items: flex-start; }
.sd-terms .tracked { color: var(--muted); font-size: 0.78rem; }
.sd-opts label { display: flex; gap: 8px; align-items: center; margin: 3px 0; }
.forecast { margin-top: 12px; padding: 10px 14px; border-radius: 8px; background: var(--surface-2); font-weight: 600; }
.forecast.warn { background: #fdf0d9; color: #6b4200; }
.sched-table td { vertical-align: top; }
.sched-status { font-weight: 600; }
/* Pause / Edit / Stop stacked in a narrow column, so the table fits a desktop page. */
.sched-actions { width: 1%; }
.sched-actions button { display: block; width: 100%; min-width: 64px; margin: 0 0 4px; padding: 3px 9px; font-size: 0.82rem; }
.sched-actions button:last-child { margin-bottom: 0; }
.sched-table .nowrap, .nowrap { white-space: nowrap; }
/* Column widths: the term and status get room to breathe; short columns never wrap. */
.sched-table { width: 100%; }
.sched-table td:nth-child(2) { min-width: 160px; }
.sched-table td:nth-child(4) { min-width: 200px; }
.sched-table td:nth-child(5) { min-width: 145px; }
.sched-table th { white-space: nowrap; vertical-align: bottom; }
.sched-sub { margin-top: 2px; }
.sched-sub .link-btn { padding: 0; }
/* Surface chips (Schedules): one row that wraps; grey checking, green found, red not found yet. */
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 0.76rem; font-weight: 600; line-height: 1.5; white-space: nowrap; border: 1px solid transparent; cursor: default; }
.chip-checking { background: var(--surface-2); color: var(--muted); border-color: var(--border); }
.chip-found { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.chip-not { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
@media (prefers-color-scheme: dark) { .chip-found { background: #12351f; color: #86efac; border-color: #1f5132; } .chip-not { background: #3b1414; color: #fca5a5; border-color: #5b2020; } }
/* Phones and narrow windows: the table becomes cards, one per schedule; the buttons go back to a row. */
@media (max-width: 1024px) {
  .sched-table thead { display: none; }
  .sched-table, .sched-table tbody, .sched-table tr, .sched-table td { display: block; width: auto; }
  .sched-table tr { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; margin-bottom: 10px; background: var(--surface); }
  .sched-table td { border: 0; padding: 3px 0; min-width: 0 !important; }
  .sched-table td:nth-child(1) { float: right; }
  .sched-table td:nth-child(3) div { display: inline; margin-left: 6px; }
  .sched-table td:nth-child(6)::before, .sched-table td:nth-child(7)::before, .sched-table td:nth-child(8)::before { color: var(--muted); font-size: 0.78rem; margin-right: 6px; }
  .sched-table td:nth-child(6)::before { content: 'Next check'; }
  .sched-table td:nth-child(7)::before { content: 'Credits used'; }
  .sched-table td:nth-child(8)::before { content: 'To finish'; }
  .sched-table td.num { text-align: left; }
  .sched-table tr.detail-row { padding: 6px 10px; }
  .sched-actions { width: auto; }
  .sched-actions button { display: inline-block; width: auto; margin: 4px 4px 0 0; }
  .sched-table td:nth-child(6) br { display: none; }
  .sched-table td:nth-child(6) .muted::before { content: ", "; }
}
.timeline-list { list-style: none; padding: 0; margin: 6px 0; font-size: 0.88rem; }
.timeline-list li { padding: 3px 0; border-bottom: 1px dashed var(--border); }
.totals-line { font-size: 1.05rem; font-weight: 700; }
.paused-banner { background: #fdecea; color: #7a1c14; padding: 12px 16px; border-radius: 10px; margin-bottom: 14px; }
@media (prefers-color-scheme: dark) { .paused-banner { background: #3d1a18; color: #ffb4ab; } }
.track-btn { font-size: 0.78rem; padding: 2px 8px; margin-left: 6px; }
.acct-section h2 { margin-top: 0; }
.toggle-row { display: flex; gap: 10px; align-items: center; margin: 6px 0; }
.link-btn { border: 0; background: none; padding: 0; color: var(--accent); cursor: pointer; font: inherit; text-decoration: underline; }

/* A result's own link, at the top of every result (results.js initLinkBar). */
.result-link { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; margin: -4px 0 14px; border: 1px solid var(--border, #e3e0f0); border-radius: 10px; background: var(--surface-2, #f7f6fc); }
.result-link .rl-url { font: 0.85rem/1.3 var(--mono, ui-monospace, monospace); color: inherit; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.result-link .rl-url:hover { text-decoration: underline; }
.result-link .rl-private { display: inline-flex; align-items: center; gap: 6px; font-size: 0.9rem; cursor: pointer; }
.result-link .rl-state { flex-basis: 100%; margin: 0; }

/* Schedule panel: "Alert me by" (scheduleDialog.js). */
/* Its own step: a light panel, a heading like "How long" / "How often", one row per channel. */
.sd-alerts { margin-top: 16px; padding: 14px 16px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; }
.sd-alerts:empty { display: none; }
.sd-alerts .sd-h { display: block; margin-bottom: 6px; }
.sd-alert-row { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; min-height: 40px; padding: 4px 0; }
.sd-alert-row + .sd-alert-row { border-top: 1px solid var(--border); }
.sd-alert-row label { display: inline-flex; align-items: center; gap: 8px; min-width: 110px; }
.sd-alert-row .sd-ch { font-weight: 600; }
.sd-ok { color: #16a34a; font-weight: 700; }
@media (prefers-color-scheme: dark) { .sd-ok { color: #4ade80; } }
/* Connect Telegram: Telegram's own blue, white text, paper plane. */
.tg-btn { display: inline-flex; align-items: center; gap: 7px; background: #229ED9; color: #fff; border: 1px solid #229ED9; border-radius: 999px; padding: 8px 16px; font-weight: 700; cursor: pointer; }
.tg-btn:hover { background: #1b8bc0; border-color: #1b8bc0; }
.tg-btn:focus-visible { outline: 3px solid #9fd8f2; outline-offset: 2px; }
@media (max-width: 640px) { .sd-alert-row label { min-width: 0; flex: 1 0 100%; } .tg-btn { width: 100%; justify-content: center; padding: 10px 16px; } }
.sd-off { opacity: 0.6; }
.sd-confirm { font-size: 1.05rem; margin: 10px 0 4px; }

/* Phones: "⋯ More" sits top-right of the card, above the text (after the rules above so it wins). */
@media (max-width: 760px) { .project-item .project-row { padding-right: 18px; padding-top: 52px; } .project-actions { top: 10px; transform: none; } }

/* Project settings: archive / delete. */
.danger-zone { margin-top: 18px; border-color: #f3c2c2; }
.danger-zone h2 { margin: 0 0 8px; font-size: 1.05rem; }
.dz-row { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: flex-end; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--border); }
.dz-row > div { flex: 1 1 320px; }
.dz-row p { margin: 4px 0 8px; }
.dz-row input[type=text] { display: block; width: min(100%, 360px); margin-top: 4px; }
button.danger { color: var(--err); border-color: #f3c2c2; }
button.danger:not(:disabled):hover { background: var(--err); color: #fff; }
@media (prefers-color-scheme: dark) { .danger-zone, button.danger { border-color: #6b2a2a; } }

/* ---------- plans (/upgrade, /account) ---------- */
.plan-current { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; margin: 10px 0 4px; }
.plan-toggle-row { display: flex; justify-content: center; margin: 18px 0 6px; }
.save-tag { font-size: 0.72rem; font-weight: 700; background: var(--cited-bg); color: var(--ok); border-radius: 99px; padding: 1px 7px; margin-left: 4px; }
.plan-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; align-items: stretch; }
.plan-card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 22px 20px 18px; }
.plan-card.featured { border: 2px solid var(--accent); }
.plan-card.mine { box-shadow: 0 0 0 3px var(--cited-bg); }
.plan-card h2 { margin: 0 0 8px; font-size: 1.25rem; }
.plan-flag { position: absolute; top: -11px; left: 18px; background: var(--accent); color: var(--accent-text); font-size: 0.75rem; font-weight: 700; padding: 2px 10px; border-radius: 99px; }
.plan-price { display: flex; align-items: baseline; gap: 6px; }
.plan-price b { font-size: 2rem; letter-spacing: -0.02em; }
.plan-price span { color: var(--muted); }
.plan-price-sm { font-size: 1.3rem; font-weight: 800; }
.plan-features { list-style: none; padding: 0; margin: 14px 0 16px; flex: 1; }
.plan-features li { padding: 6px 0 6px 24px; position: relative; border-top: 1px solid var(--surface-2); }
.plan-features li::before { content: '✓'; position: absolute; left: 2px; color: var(--ok); font-weight: 800; }
.plan-buy button { width: 100%; }
.topups { margin-top: 18px; }
.pack-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.pack { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--border); border-radius: 12px; padding: 14px; background: var(--surface-2); }
.plain-list { padding-left: 20px; margin: 0 0 10px; }
.plain-list li { margin: 4px 0; }
.bucket-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 12px 0; }
.bucket { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--surface-2); }
.bucket b { display: block; font-size: 1.35rem; }
.bucket span { color: var(--muted); font-size: 0.82rem; }
.plan-status { display: inline-block; font-size: 0.8rem; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: var(--cited-bg); color: var(--ok); }
.plan-status.grace, .plan-status.cancelling { background: var(--mentioned-bg); color: var(--warn); }
.plan-status.none { background: var(--surface-2); color: var(--muted); }
.ledger-table td.num.plus { color: var(--ok); }
.ledger-table td.num.minus { color: var(--err); }
.flag-pill { display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 1px 8px; border-radius: 99px; background: var(--error-bg); color: var(--err); }

/* ---------- admin plan manager ---------- */
.plan-dialog { border: none; border-radius: 14px; padding: 0; width: min(980px, calc(100vw - 24px)); max-height: calc(100vh - 32px); background: var(--surface); color: var(--text); box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35); }
.plan-dialog::backdrop { background: rgba(10, 8, 30, 0.55); }
.plan-dialog .pd-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 10px; padding: 14px 18px; background: var(--surface); border-bottom: 1px solid var(--border); }
.plan-dialog .pd-body { padding: 14px 18px 20px; }
.plan-dialog h3 { margin: 16px 0 6px; }
.pd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 6px 16px; }
.pd-grid div span { display: block; color: var(--muted); font-size: 0.78rem; }
.sim-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.pd-msg { margin: 10px 0 0; padding: 8px 12px; border-radius: 8px; background: var(--cited-bg); }
.pd-msg.err { background: var(--error-bg); color: var(--err); }
.pd-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- branding (Agency) ---------- */
.brand-preview { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; background: #120c33; color: #fff; font-weight: 800; font-size: 1.1rem; }
.brand-preview img { max-height: 44px; max-width: 200px; object-fit: contain; border-radius: 6px; }
.brand-preview .dot { width: 34px; height: 34px; border-radius: 10px; display: inline-grid; place-items: center; color: #fff; }
.brand-form label { display: block; font-weight: 600; margin: 12px 0 4px; }
.brand-form input[type='text'], .brand-form input[type='email'] { width: min(420px, 100%); }
.client-tag { display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 1px 8px; border-radius: 99px; background: var(--brand-tint, #efebfd); color: var(--brand-dark, #4128b0); margin-left: 6px; vertical-align: middle; }
.client-group-head { margin: 18px 0 6px; font-size: 0.95rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.pd-form select, .pd-form input:not([type='checkbox']):not([type='file']) { width: auto; max-width: 100%; }

/* ---------- fix list 2026-09-30 ---------- */
.report-actions #again { margin-left: auto; } /* Run again: the primary action, on the right */
.legend-row { display: flex; align-items: flex-start; gap: 12px; }
.legend-row .legend { flex: 1; }
.sound-toggle { flex: none; font-size: 0.8rem; padding: 3px 10px; border-radius: 999px; background: var(--surface); }
.term-sched { display: inline-block; }
.sched-chip { display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 1px 8px; border-radius: 99px; background: var(--cited-bg); color: var(--ok); text-decoration: none; white-space: nowrap; }
.report-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 16px; align-items: end; margin-top: 12px; }
.report-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 0.9rem; }
.report-form label.check-inline { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; padding-bottom: 8px; }
.report-form label.check-inline input { width: auto; margin: 0; }
.report-form .wide { grid-column: 1 / -1; }
.report-form .hint { font-weight: 400; }
.inline-select { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.inline-select select { width: auto; }

/* ---------- fix list 2 (2026-09-30) ---------- */
.plan-plus { margin: 10px 0 -6px; font-weight: 700; }
.will-pause { margin-top: 4px; font-size: 0.8rem; font-weight: 600; color: var(--warn); }
.sd-all-done p { margin: 10px 0 16px; }
.sd-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- fix list 3 (2026-10-01) ---------- */
.resumed-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: space-between; background: var(--cited-bg); color: var(--ok); border: 1px solid var(--ok); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 12px; }
/* Credit activity on phones: each entry stacks: date, then description with the credits, then the balance. */
@media (max-width: 640px) {
  .credit-activity, .credit-activity tbody { display: block; width: 100%; }
  .credit-activity thead { display: none; }
  .credit-activity tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 2px; border-bottom: 1px solid var(--border); }
  .credit-activity td { display: block; border: 0; padding: 0; text-align: left; }
  .credit-activity td.l-when { grid-column: 1 / 3; color: var(--muted); }
  .credit-activity td.l-what { grid-column: 1; grid-row: 2; font-size: 0.95rem; }
  .credit-activity td.l-credits { grid-column: 2; grid-row: 2; text-align: right; font-weight: 700; }
  .credit-activity td.l-bal { grid-column: 1 / 3; grid-row: 3; color: var(--muted); font-size: 0.82rem; }
  .credit-activity td.l-bal::before { content: attr(data-label) ': '; }
}

/* ---------- tutorial videos (2026-10-01) ---------- */
/* A page title with a small button on its right ("▶ How this page works", added by common.js when that
   video exists). On a phone the button drops under a long title instead of squeezing it. */
.title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-bottom: 4px; }
.title-row > h1 { flex: 1 1 auto; min-width: 0; margin: 0; }
.title-row > .btn, .title-row > .tutorial-btn { flex: none; margin-left: auto; }
.tutorial-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 4px 14px; border-radius: 999px; font-size: 0.88rem; white-space: nowrap; color: var(--accent); background: var(--surface); border: 1px solid var(--border); }
.tutorial-btn:hover { border-color: var(--accent); background: var(--surface-2); }
.tutorial-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Getting started: the list of videos, one card each (welcome.js). */
.tutorial-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 16px; margin-top: 14px; }
.tutorial-card { display: flex; flex-direction: column; align-items: stretch; padding: 0; text-align: left; font-weight: 400; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; cursor: pointer; }
.tutorial-card:hover { border-color: var(--accent); box-shadow: 0 6px 22px rgba(0, 0, 0, 0.12); }
.tutorial-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.tutorial-thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #2b1a7a, #120c33); }
.tutorial-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tutorial-play { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(18, 12, 51, 0.72); border: 1px solid rgba(255, 255, 255, 0.4); }
.tutorial-card:hover .tutorial-play { background: var(--brand, #5b3fd9); }
.tutorial-len { position: absolute; right: 8px; bottom: 8px; padding: 1px 7px; border-radius: 6px; font-size: 0.75rem; font-weight: 700; color: #fff; background: rgba(0, 0, 0, 0.72); }
.tutorial-card-body { display: grid; gap: 4px; padding: 12px 14px 14px; }
.tutorial-card-body b { font-size: 1rem; }
.tutorial-card-body span { color: var(--muted); font-size: 0.88rem; line-height: 1.4; }

/* tutorial-popup:start — the pop-up player (tutorial.js). Keep this block self-contained (fixed colours,
   no tokens): src/tutorials.js copies it, as it is, into the public sales page, which doesn't load this file. */
.tutorial-modal { position: fixed; inset: 0; z-index: 200; display: flex; padding: 12px; overflow-y: auto; overscroll-behavior: contain; background: rgba(8, 6, 20, 0.92); }
/* The box is see-through to clicks, so any click that isn't on the video or the Close button lands on the backdrop and closes. */
.tutorial-box { display: grid; gap: 10px; margin: auto; pointer-events: none; width: min(960px, 100%, max(240px, calc((100vh - 110px) * 16 / 9))); width: min(960px, 100%, max(240px, calc((100dvh - 110px) * 16 / 9))); }
.tutorial-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tutorial-title { margin: 0; color: #fff; font: 700 1.05rem/1.3 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; overflow-wrap: anywhere; }
.tutorial-close { pointer-events: auto; flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; min-height: 44px; padding: 0 18px; border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 999px; color: #fff; background: rgba(255, 255, 255, 0.14); font: 600 0.95rem/1 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; cursor: pointer; }
.tutorial-close:hover { background: rgba(255, 255, 255, 0.28); }
.tutorial-close:focus-visible { outline: 3px solid #b7a9ff; outline-offset: 2px; }
.tutorial-frame { position: relative; pointer-events: auto; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; background: #000; box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55); }
.tutorial-frame video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
.tutorial-fail { display: none; position: absolute; inset: 0; margin: 0; padding: 20px; place-content: center; text-align: center; color: #fff; background: #120c33; font: 400 1rem/1.5 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
.tutorial-frame.failed .tutorial-fail { display: grid; }
html.tutorial-open, html.tutorial-open body { overflow: hidden; }
html.tutorial-open body { padding-right: var(--tutorial-sbw, 0px); }
@keyframes tutorial-fade { from { opacity: 0; } }
@keyframes tutorial-rise { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
@media (prefers-reduced-motion: no-preference) {
  .tutorial-modal { animation: tutorial-fade 0.18s ease-out; }
  .tutorial-box { animation: tutorial-rise 0.22s ease-out; }
}
/* tutorial-popup:end */

.review-bar { background: var(--mentioned-bg); color: var(--text); font-size: 0.85rem; text-align: center; padding: 6px 16px; border-bottom: 1px solid var(--border); }

/* ---------- payments (JVZoo, 2026-10-01): buy buttons, thank-you page, action-needed notes, Admin → Payments ---------- */
.plan-buy .btn, .pack .btn { display: block; width: 100%; text-align: center; box-sizing: border-box; }
.plan-buy .buy-note { margin: 6px 0 0; font-size: 0.8rem; color: var(--muted); text-align: center; }
.pay-note { border-radius: var(--radius); padding: 10px 14px; margin: 10px 0; background: var(--surface-2); }
.pay-note.ok { background: var(--cited-bg); }
.pay-note.warn { background: var(--mentioned-bg); }
.pay-note.err { background: var(--error-bg); }
.pay-note ol { margin: 6px 0 4px; padding-left: 20px; }
.pay-note p { margin: 4px 0; }
.ty-card { max-width: 640px; margin: 24px auto; text-align: left; }
.ty-icon { font-size: 2.2rem; line-height: 1; margin-bottom: 6px; }
.ty-spin { display: inline-block; width: 18px; height: 18px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: ty-spin 0.9s linear infinite; vertical-align: -3px; margin-right: 8px; }
@keyframes ty-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ty-spin { animation: none; } }
.claim-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.claim-form label { display: flex; flex-direction: column; gap: 3px; font-size: 0.85rem; flex: 1 1 200px; }
.claim-form input { width: 100%; box-sizing: border-box; }
.buy-dialog { border: none; border-radius: 14px; padding: 18px 20px; width: min(520px, calc(100vw - 24px)); background: var(--surface); color: var(--text); box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35); }
.buy-dialog::backdrop { background: rgba(10, 8, 30, 0.55); }
.buy-dialog .row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.sev { display: inline-block; font-size: 0.72rem; font-weight: 700; padding: 1px 7px; border-radius: 99px; text-transform: uppercase; letter-spacing: 0.02em; }
.sev.urgent { background: var(--error-bg); color: var(--err); }
.sev.warn { background: var(--mentioned-bg); color: var(--warn); }
.sev.info { background: var(--surface-2); color: var(--muted); }
.pay-config { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px 16px; margin-bottom: 10px; }
.pay-config code { word-break: break-all; }
.buy-links input { width: 100%; box-sizing: border-box; }
.ipn-fields { font-family: var(--mono); font-size: 0.75rem; white-space: pre-wrap; word-break: break-all; margin: 4px 0 0; }
.pay-pill { display: inline-block; font-size: 0.72rem; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--surface-2); color: var(--muted); }
.pay-pill.alert { background: var(--error-bg); color: var(--err); }

/* ---------- Home: feature cards, quick-start form, your projects (2026-10-02) ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 18px 0 30px; }
@media (max-width: 980px) { .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .feature-grid { grid-template-columns: 1fr; } }
.feature-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 20px 20px 16px; border: 1px solid var(--border); border-radius: 16px; cursor: pointer; overflow: hidden;
  background: linear-gradient(160deg, color-mix(in srgb, var(--fc) 11%, var(--surface)) 0%, var(--surface) 62%); transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease; }
.feature-card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--fc); }
.feature-card:hover { transform: translateY(-3px); border-color: var(--fc); box-shadow: 0 14px 34px color-mix(in srgb, var(--fc) 22%, transparent); }
@media (prefers-reduced-motion: reduce) { .feature-card { transition: none; } .feature-card:hover { transform: none; } }
.feature-card h2 { margin: 6px 0 0; font-size: 1.25rem; letter-spacing: -0.01em; }
.feature-card p { margin: 0; color: var(--muted); flex: 1; }
.fc-icon { display: inline-grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 14px; color: #fff; background: linear-gradient(140deg, var(--fc), color-mix(in srgb, var(--fc) 62%, #120c33)); box-shadow: 0 6px 16px color-mix(in srgb, var(--fc) 35%, transparent); }
.fc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.fc-cost { font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.feature-card .fc-foot button { background: var(--fc); border-color: var(--fc); color: #fff; padding: 8px 24px; border-radius: 999px; }
.feature-card .fc-foot button::after { content: ' →'; }
.feature-card .fc-foot button:focus-visible { outline: 3px solid color-mix(in srgb, var(--fc) 45%, transparent); outline-offset: 2px; }
.home-projects-head { margin: 0 0 10px; }
.home-projects-head h2 { margin: 0; }
.home-empty { padding: 30px 20px; }
.home-example { max-width: 620px; margin: 18px auto 0; padding-top: 18px; border-top: 1px solid var(--border); color: var(--text); }
.home-example p { margin: 0 0 10px; }
.project-item.plain .project-row { padding-right: 18px; }
@media (max-width: 760px) { .project-item.plain .project-row { padding-top: 14px; } }
/* The quick-start form: a pop-up over Home. */
.quick-back { position: fixed; inset: 0; z-index: 90; background: rgba(10, 8, 30, 0.55); display: grid; place-items: center; padding: 16px; overflow: auto; }
.quick-modal { background: var(--surface); color: var(--text); border-radius: 16px; width: min(640px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto; padding: 22px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3); border-top: 5px solid var(--fc); }
.quick-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 6px; }
.quick-head > div { flex: 1; min-width: 0; }
.quick-head h2 { margin: 0; font-size: 1.3rem; }
.quick-head p { margin: 2px 0 0; font-size: 0.92rem; }
.quick-close { flex: none; border: none; background: none; color: var(--muted); font-size: 1.1rem; padding: 4px 8px; }
.quick-close:hover { color: var(--text); }
.quick-modal label.field { margin-top: 14px; }
.quick-modal textarea.qf-terms { min-height: 84px; }
.quick-modal textarea.qf-short { min-height: 62px; }
.quick-modal .qf-info { margin: 6px 0 0; }
.quick-modal .qf-new { border-left: 3px solid var(--fc); padding: 0 0 2px 14px; margin-top: 4px; }
.quick-modal .run-summary { margin-top: 14px; }
.quick-modal [data-go]:not(:disabled) { background: var(--fc); border-color: var(--fc); color: #fff; }

/* ---------- Schedules: grouped by project (2026-10-02) ---------- */
.sched-groups { display: grid; gap: 10px; }
.sched-group { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.sched-group.open { border-color: var(--accent); }
.sched-group-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; width: 100%; text-align: left; border: 0; border-radius: 10px; background: none; padding: 13px 16px; font-weight: 400; }
.sched-group-head:hover { background: var(--surface-2); }
.sched-group-head:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.sched-group-head .caret { flex: none; display: inline-block; width: 14px; color: var(--muted); transition: transform 0.15s; }
.sched-group.open .sched-group-head .caret { transform: rotate(90deg); }
.sched-group-head .sg-name { font-weight: 700; font-size: 1.05rem; }
.sched-group-head .sg-meta { color: var(--muted); font-size: 0.9rem; }
.sched-group-head .sg-meta b { color: var(--text); font-weight: 600; }
.sched-group-head .will-pause-line { color: var(--warn); font-weight: 600; }
.sched-group-body { padding: 2px 16px 12px; border-top: 1px solid var(--border); }
.sched-group-body .list-tools { margin: 12px 0 8px; }
.sched-group-body .list-tools button { padding: 4px 12px; font-size: 0.88rem; }
