/* RankByMe brand: primary #6544E9, secondary #8B6CF6, light #EFEAFF, dark #172033, gray #6B7280, background #F7F8FC. */
:root {
  --bg: #f7f8fc;
  --panel: #ffffff;
  --panel-2: #f2f3f9;
  --text: #172033;
  --muted: #6b7280;
  --border: #e6e8f0;
  --brand: #6544e9;
  --brand-2: #8b6cf6;
  --brand-soft: #efeaff;
  --on-brand: #ffffff;
  --good: #16a34a;
  --good-soft: #dcfce7;
  --ok: #d97706;
  --ok-soft: #fef3c7;
  --bad: #dc2626;
  --bad-soft: #fee2e2;
  --info: #2563eb;
  --info-soft: #dbeafe;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 6px 24px rgba(15, 23, 42, 0.06);
  --radius: 14px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1020;
    --panel: #121a2e;
    --panel-2: #18223a;
    --text: #e5e9f2;
    --muted: #94a3b8;
    --border: #253049;
    --brand: #8b6cf6;
    --brand-2: #a78bfa;
    --brand-soft: #241b4d;
    --good-soft: #14321f;
    --ok-soft: #3a2a0c;
    --bad-soft: #3b1515;
    --info-soft: #172554;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 6px 24px rgba(0, 0, 0, 0.3);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0; letter-spacing: -0.01em; }
button, input { font: inherit; color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* Header */
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.topbar .wrap { display: flex; align-items: center; gap: 12px; height: 62px; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 18px; color: var(--text); text-decoration: none; margin-right: auto; }
/* Logo: the official horizontal logo in light mode; the app icon + text in dark mode (dark letters would disappear). */
.logo-full { height: 38px; width: auto; display: block; }
.logo-img, .logo .wm { display: none; }
.logo-img { width: 34px; height: 34px; border-radius: 8px; }
.side-logo .logo-full { height: 34px; }
footer .logo-full { height: 28px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-full { display: none; }
  :root:not([data-theme="light"]) .logo-img, :root:not([data-theme="light"]) .logo .wm { display: inline-block; }
}
.wm { font-weight: 800; font-size: 21px; letter-spacing: -0.02em; color: var(--text); }
.wm b { color: var(--brand); font-weight: 800; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--border); background: var(--panel); border-radius: 10px; padding: 9px 16px; font-weight: 600; cursor: pointer; text-decoration: none; color: var(--text); white-space: nowrap; }
.btn:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: var(--on-brand); border-color: transparent; box-shadow: 0 6px 18px color-mix(in srgb, var(--brand) 30%, transparent); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 9px; }
.btn-lg { padding: 14px 24px; font-size: 16px; border-radius: 12px; }
.btn:disabled { opacity: 0.55; cursor: default; }

/* Landing */
.hero { padding: 72px 0 40px; text-align: center; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-weight: 600; font-size: 13px; }
.hero h1 { font-size: clamp(32px, 5vw, 54px); font-weight: 800; margin: 18px auto 14px; max-width: 820px; letter-spacing: -0.02em; }
.grad { background: linear-gradient(135deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 18px; color: var(--muted); max-width: 640px; margin: 0 auto 28px; }
.scan-form { display: flex; gap: 10px; max-width: 620px; margin: 0 auto; background: var(--panel); padding: 8px; border-radius: 16px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.scan-form input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 10px 12px; font-size: 16px; outline: none; }
.scan-note { margin-top: 12px; font-size: 13px; color: var(--muted); }
.form-error { color: var(--bad); margin-top: 10px; min-height: 1.2em; font-weight: 500; }
.section { padding: 48px 0; }
.section h2 { font-size: 30px; text-align: center; margin-bottom: 10px; }
.section > .wrap > p.sub { text-align: center; color: var(--muted); margin: 0 auto 32px; max-width: 620px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step, .feature { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.step .num { width: 32px; height: 32px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 800; margin-bottom: 12px; }
.step h3, .feature h3 { font-size: 17px; margin-bottom: 6px; }
.step p, .feature p { margin: 0; color: var(--muted); font-size: 14px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature .ico { font-size: 22px; margin-bottom: 8px; }
.fix-types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
/* Affected pages / images under a problem */
.item-list { margin: 8px 0 6px; padding-left: 18px; font-size: 13.5px; display: flex; flex-direction: column; gap: 4px; }
.item-list a { word-break: break-all; }
.item-imgs { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 3px 0 2px; font-size: 12.5px; }
.item-imgs a { text-decoration: none; color: var(--text); }
.item-imgs a:hover { color: var(--brand); }

/* Terms / Privacy */
.legal { max-width: 780px; line-height: 1.7; }
.legal h1 { font-size: 32px; margin-bottom: 4px; }
.legal h2 { font-size: 19px; margin: 28px 0 8px; }
.legal li { margin-bottom: 6px; }

/* Landing (RankByMe home) */
.land-nav { display: flex; gap: 22px; margin-right: 12px; }
.land-nav a { color: var(--text); text-decoration: none; font-weight: 500; font-size: 15px; }
.land-nav a:hover { color: var(--brand); }
.land-hero { padding: 64px 0 36px; background: radial-gradient(900px 420px at 85% 10%, var(--brand-soft), transparent 70%); }
.land-hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.land-hero h1 { font-size: clamp(38px, 5.4vw, 62px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.04; margin-bottom: 18px; }
.land-hero .lead { font-size: 19px; color: var(--muted); max-width: 520px; margin: 0 0 26px; }
.land-hero .scan-form { margin: 0; max-width: 560px; }
.hero-art { position: relative; padding: 20px; }
.art-card { background: var(--panel); border: 1px solid var(--border); border-radius: 20px; padding: 20px 22px 26px; box-shadow: 0 24px 60px color-mix(in srgb, var(--brand) 18%, transparent); transform: rotate(-3deg); }
.art-dots { display: flex; gap: 6px; margin-bottom: 12px; }
.art-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--panel-2); }
.art-google { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 12px; }
.art-search { display: flex; justify-content: space-between; border: 1px solid var(--border); border-radius: 999px; padding: 10px 16px; font-size: 15px; margin-bottom: 16px; }
.art-result { display: flex; align-items: center; gap: 12px; border: 2px solid var(--brand); border-radius: 14px; padding: 12px 14px; margin-bottom: 16px; position: relative; }
.art-shop { width: 40px; height: 40px; border-radius: 10px; background: var(--brand); display: grid; place-items: center; font-size: 20px; }
.art-result b { color: var(--brand); font-size: 18px; }
.art-stars { color: #f59e0b; letter-spacing: 2px; }
.art-cursor { position: absolute; right: -14px; bottom: -22px; font-size: 40px; color: var(--brand); transform: rotate(-90deg); }
.art-line { height: 10px; border-radius: 6px; background: var(--panel-2); margin: 10px 0; }
.art-line.short { width: 60%; }
.art-badge { position: absolute; top: 0; right: 8px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-weight: 700; padding: 10px 18px; border-radius: 12px; transform: rotate(4deg); box-shadow: var(--shadow); }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-bottom: 40px; }
.tile h3 { font-size: 18px; margin: 14px 0 6px; }
.tile p { margin: 0; color: var(--muted); font-size: 14.5px; }
.tile-ico { width: 72px; height: 72px; border-radius: 18px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.tile-ico svg { width: 34px; height: 34px; }
.all-in-one { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 30px; align-items: center; background: linear-gradient(135deg, var(--brand-soft), color-mix(in srgb, var(--brand-soft) 40%, var(--panel))); border-radius: 22px; padding: 36px; }
.all-in-one h2 { text-align: left; font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -0.03em; margin: 8px 0 12px; }
.all-in-one p { color: var(--muted); font-size: 16px; margin: 0; }
.eyebrow { font-size: 13px; font-weight: 800; letter-spacing: 0.08em; color: var(--brand); }
.aio-list { list-style: none; margin: 0; padding: 14px; background: var(--panel); border-radius: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; }
.aio-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; font-weight: 500; }
.aio-list li span { width: 22px; text-align: center; }
.foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.foot .logo { margin: 0; }
@media (max-width: 900px) {
  .land-hero-grid, .all-in-one { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .land-nav { display: none; }
  .hero-art { max-width: 420px; }
}
@media (max-width: 520px) { .tiles { grid-template-columns: 1fr; } .all-in-one { padding: 22px; } }

footer { padding: 30px 0 50px; color: var(--muted); font-size: 13px; text-align: center; border-top: 1px solid var(--border); margin-top: 30px; }

/* Report */
.report { padding: 28px 0 60px; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.summary { display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center; padding: 26px; }
.summary h1 { font-size: 26px; word-break: break-all; }
.summary .meta { color: var(--muted); font-size: 13px; margin-top: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--panel-2); }
.chip.error { background: var(--bad-soft); color: var(--bad); }
.chip.warning { background: var(--ok-soft); color: var(--ok); }
.chip.notice { background: var(--info-soft); color: var(--info); }
.chip.good { background: var(--good-soft); color: var(--good); }
.fixall { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border-radius: 14px; padding: 18px 20px; min-width: 260px; }
.fixall .big { font-size: 26px; font-weight: 800; }
.fixall p { margin: 2px 0 12px; opacity: 0.9; font-size: 13px; }
.fixall .btn { background: #fff; color: var(--brand); border: 0; width: 100%; }

.ring { position: relative; width: 132px; height: 132px; flex: none; }
.ring svg { transform: rotate(-90deg); }
.ring .val { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring .val b { font-size: 38px; font-weight: 800; line-height: 1; }
.ring .val span { font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 4px; }
.ring.sm { width: 54px; height: 54px; }
.ring.sm .val b { font-size: 17px; }

.cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 12px; margin: 16px 0 24px; }
.cat { padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; cursor: pointer; text-decoration: none; color: var(--text); transition: transform 0.12s, border-color 0.12s; }
.cat:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); }
.cat .label { font-weight: 700; font-size: 13px; }
.cat .sub { font-size: 12px; color: var(--muted); }

.block { margin-bottom: 22px; }
.block-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.block-head h2 { font-size: 19px; }
.block-head p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.block-head .grow { flex: 1; }
.block-body { padding: 10px 20px 18px; }

.finding { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.finding:last-child { border-bottom: 0; }
.f-title { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 15px; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot.error { background: var(--bad); }
.dot.warning { background: var(--ok); }
.dot.notice { background: var(--info); }
.f-count { font-weight: 500; color: var(--muted); font-size: 13px; }
.f-why { margin: 5px 0 0 19px; color: var(--muted); font-size: 14px; }
.f-more { margin: 8px 0 0 19px; }
.f-more summary { cursor: pointer; color: var(--brand); font-size: 13px; font-weight: 600; }
.f-more ul { margin: 8px 0 0; padding-left: 18px; font-size: 13px; max-height: 240px; overflow: auto; }
.f-more li { margin-bottom: 3px; word-break: break-all; }
.f-more .how { font-size: 13px; background: var(--panel-2); padding: 10px 12px; border-radius: 10px; margin-top: 8px; }
.fix { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; min-width: 190px; }
.fix .type { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 3px 8px; border-radius: 999px; }
.type.auto { background: var(--good-soft); color: var(--good); }
.type.ai { background: var(--brand-soft); color: var(--brand); }
.type.guide { background: var(--panel-2); color: var(--muted); }
.fix .price { font-size: 12px; color: var(--muted); text-align: right; }

.good-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 18px; margin-top: 10px; }
.good-item { display: flex; gap: 8px; font-size: 14px; }
.good-item::before { content: '✓'; color: var(--good); font-weight: 800; }
.good-wrap { margin-top: 6px; padding-top: 10px; }
.good-wrap h4 { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.empty-good { color: var(--good); font-weight: 600; padding: 12px 0; }

.speed-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 10px 0; }
.speed-box { background: var(--panel-2); border-radius: 12px; padding: 14px; display: flex; gap: 14px; align-items: center; }
.speed-box .metrics { font-size: 13px; color: var(--muted); }
.speed-box .metrics b { color: var(--text); }

.top-list { display: flex; flex-direction: column; gap: 8px; }
.top-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--panel-2); }
.top-item .t { flex: 1; font-weight: 600; font-size: 14px; }
.top-item .n { width: 26px; height: 26px; border-radius: 8px; background: var(--panel); display: grid; place-items: center; font-weight: 800; font-size: 13px; }

/* Progress */
.progress-card { max-width: 620px; margin: 60px auto; padding: 34px; text-align: center; }
.progress-card h1 { font-size: 24px; margin: 10px 0 4px; word-break: break-all; }
.bar { height: 10px; background: var(--panel-2); border-radius: 999px; overflow: hidden; margin: 22px 0 14px; }
.bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); border-radius: 999px; transition: width 0.6s; }
.phases { text-align: left; display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.phase { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 14px; }
.phase.done { color: var(--text); }
.phase.done::before { content: '✓'; color: var(--good); font-weight: 800; width: 18px; }
.phase.now { color: var(--text); font-weight: 600; }
.phase.now::before { content: ''; width: 14px; height: 14px; margin: 0 2px; border: 2px solid var(--border); border-top-color: var(--brand); border-radius: 50%; animation: spin 0.8s linear infinite; }
.phase.wait::before { content: '○'; width: 18px; color: var(--border); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Modal */
.modal-back { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.55); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { width: 100%; max-width: 440px; padding: 28px; }
.modal h3 { font-size: 21px; margin-bottom: 6px; }
.modal p { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.modal label, .auth-form label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 12px; text-align: left; }
.auth-form input { width: 100%; margin-top: 5px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); }
.auth-form .btn { width: 100%; margin-top: 6px; }
.modal .terms-check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; color: var(--muted); }
.modal .terms-check input { width: auto; margin-top: 2px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand); font-weight: 600; font-size: 13px; cursor: pointer; }
.modal input { width: 100%; margin-top: 5px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); }
.modal .row { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.pill-note { font-size: 12px; background: var(--brand-soft); color: var(--brand); padding: 8px 10px; border-radius: 10px; margin-bottom: 14px; }

#navUser { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 760px) {
  .topbar .wrap { height: auto; min-height: 62px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
  .site-switch select { min-width: 0; width: 100%; }
  .site-switch, #addSite { width: 100%; }
  #addSite input { flex: 1; width: auto !important; }
}
#navUser .chip { text-decoration: none; }
.acct { position: relative; }
.acct-btn { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); background: var(--panel); border-radius: 999px; padding: 4px 10px 4px 4px; cursor: pointer; font-weight: 600; }
.acct-btn:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-weight: 700; font-size: 14px; }
.acct-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-menu { position: absolute; right: 0; top: calc(100% + 8px); width: 260px; padding: 8px; display: flex; flex-direction: column; z-index: 40; }
.acct-menu[hidden] { display: none; }
.acct-head { display: flex; flex-direction: column; padding: 8px 10px 10px; border-bottom: 1px solid var(--border); font-size: 14px; }
.acct-head .muted { font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.acct-bal { display: flex; align-items: center; gap: 8px; padding: 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; font-size: 14px; }
.acct-bal b { margin-right: auto; }
.acct-menu [role="menuitem"] { display: block; text-align: left; padding: 9px 10px; border-radius: 8px; color: var(--text); text-decoration: none; background: none; border: 0; cursor: pointer; font-size: 14px; }
.acct-menu [role="menuitem"]:hover { background: var(--panel-2); }
@media (max-width: 520px) { .acct-name { display: none; } }
.bad-text { color: var(--bad); }
.good-text { color: var(--good); }
.fix-cost { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 16px; }
.fix-cost div { background: var(--panel-2); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.fix-cost b { font-size: 18px; }
.fix-cost .muted { font-size: 12px; }

/* Account / admin */
.page { padding: 28px 0 60px; }
.page h1 { font-size: 28px; margin-bottom: 4px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 18px 0; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 18px 0; }
.stat { padding: 18px; }
.stat .k { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.stat .v { font-size: 28px; font-weight: 800; margin-top: 4px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .n { text-align: right; white-space: nowrap; }
.table-scroll { overflow-x: auto; }
.inline-form { display: flex; gap: 6px; align-items: center; }
.inline-form input { width: 90px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); }
.inline-form input.note { width: 160px; }
.empty { color: var(--muted); padding: 18px 0; text-align: center; }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; } }

.steps-list { padding-left: 20px; margin: 0 0 14px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }

/* Fix review */
.review-table td { vertical-align: top; }
.review-table textarea, .review-table input[type="text"], .review-table input[type="url"] { width: 100%; min-width: 260px; padding: 7px 9px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); font: inherit; font-size: 13px; color: inherit; }
.review-table img { width: 72px; height: 54px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); background: var(--panel-2); }
.review-table .cur { color: var(--muted); font-size: 13px; }
.review-table textarea.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; min-width: 520px; }
.sticky-bar { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; padding: 14px 18px; margin-top: 16px; }
.sticky-bar .cost { font-size: 15px; }
.bar .indeterminate { display: block; width: 35%; animation: slide 1.4s ease-in-out infinite; }
@keyframes slide { 0% { margin-left: -35%; } 100% { margin-left: 100%; } }
.result-ok { color: var(--good); font-weight: 600; }
.result-bad { color: var(--bad); font-weight: 600; }

.back-link { display: inline-block; margin-bottom: 12px; font-weight: 600; font-size: 14px; text-decoration: none; }
.back-link:hover { text-decoration: underline; }

/* ---------- App shell: sidebar + main column (dashboard) ---------- */
.app-body { background: var(--bg); }
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--panel); border-right: 1px solid var(--border); padding: 18px 14px; display: flex; flex-direction: column; gap: 4px; }
.side-logo { margin: 0 6px 18px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a, .side-site { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 500; font-size: 14px; }
.side-nav a:hover, .side-site:hover { background: var(--panel-2); }
.side-nav a.active, .side-site.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.ico { width: 20px; height: 20px; flex: none; }
.side-title { margin: 18px 10px 6px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.side-sites { display: flex; flex-direction: column; gap: 2px; }
.side-site .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--border); flex: none; }
.side-site .dot.on { background: var(--good); }
.side-site-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-score { font-size: 12px; font-weight: 700; color: var(--muted); }
.side-add-btn { text-align: left; padding: 9px 10px; border: 0; background: none; color: var(--brand); font-weight: 600; font-size: 14px; cursor: pointer; border-radius: 10px; }
.side-add-btn:hover { background: var(--panel-2); }
.side-add { display: none; gap: 6px; padding: 6px 4px; }
.side-add.open { display: flex; }
.side-add input { flex: 1; min-width: 0; padding: 7px 9px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); color: var(--text); font-size: 13px; }
.main-col { min-width: 0; display: flex; flex-direction: column; }
.app-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 12px 28px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); min-height: 64px; }
.top-title { flex: 1; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; }
.top-site { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.top-site b { font-size: 16px; }
.top-site .muted { font-size: 12.5px; }
.top-h { font-size: 16px; }
.menu-btn { display: none; border: 1px solid var(--border); background: var(--panel); border-radius: 10px; width: 40px; height: 40px; font-size: 18px; cursor: pointer; }
.app-main { padding: 24px 28px 60px; max-width: 1180px; width: 100%; }
.side-backdrop { display: none; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 60; width: 270px; transform: translateX(-100%); transition: transform 0.2s; box-shadow: var(--shadow); }
  .menu-open .sidebar { transform: none; }
  .menu-open .side-backdrop { display: block; position: fixed; inset: 0; background: rgba(15, 23, 42, 0.45); z-index: 55; }
  .menu-btn { display: block; }
  .app-top { padding: 10px 16px; }
  .app-main { padding: 16px 16px 50px; }
  .acct-name { display: none; }
}

/* Overview */
.hero-score { display: flex; align-items: center; gap: 24px; padding: 24px; flex-wrap: wrap; }
.hero-score h1 { font-size: 26px; }
.hero-msg { margin: 4px 0 2px; font-size: 16px; color: var(--text); }
.hero-score .meta { color: var(--muted); font-size: 13px; }
.hero-actions { display: flex; flex-direction: column; gap: 8px; min-width: 190px; }
.admin-pages { font-size: 12px; display: flex; align-items: center; gap: 6px; }
.setup-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.setup-item { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--border); border-radius: 12px; text-decoration: none; color: var(--text); font-size: 14px; }
.setup-item:hover { border-color: var(--brand); }
.setup-item b { display: block; }
.setup-item .muted { font-size: 12.5px; }
.setup-check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); flex: none; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.setup-item.done { opacity: 0.6; }
.setup-item.done .setup-check { background: var(--good); border-color: var(--good); color: #fff; }
.next-list { display: flex; flex-direction: column; }
.next-item { display: flex; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--border); }
.next-item:last-child { border-bottom: 0; }
.next-item b { font-size: 14px; }
.next-item .muted { font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.next-ico { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 13px; flex: none; background: var(--info); }
.next-ico.error { background: var(--bad); }
.next-ico.warning { background: var(--ok); }
.next-more summary { cursor: pointer; color: var(--brand); font-weight: 600; font-size: 12.5px; margin-top: 4px; }
.next-item .muted { -webkit-line-clamp: unset; }
.more-link { display: inline-block; margin-top: 10px; font-weight: 600; font-size: 14px; text-decoration: none; }
.act-list { display: flex; flex-direction: column; }
.act-item { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; font-size: 14px; }
.act-item:last-child { border-bottom: 0; }
.act-item .muted { font-size: 12.5px; white-space: nowrap; }
.act-ico { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); font-size: 13px; flex: none; }
.act-ico.good { background: var(--good); color: #fff; font-weight: 700; }
@media (max-width: 1000px) { .setup-list { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .setup-list { grid-template-columns: 1fr; } .hero-actions { width: 100%; } }

/* Google Maps tab */
.listing-row { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--border); }
.checkup-head { display: flex; gap: 16px; align-items: center; margin-bottom: 12px; }
.check-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.check-list li { display: flex; gap: 10px; font-size: 14px; }
.check-list li > span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 700; font-size: 12px; }
.check-list li.ok > span { background: var(--good-soft); color: var(--good); }
.check-list li.bad > span { background: var(--bad-soft); color: var(--bad); }
.check-list .muted { font-size: 13px; }
.table tr.me td { background: var(--brand-soft); }
.plan-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.plan-list > li { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; }
.plan-list .muted { font-size: 13px; margin-top: 2px; }
.plan-num { width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.plan-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.plan-tags .tag { margin: 0; font-size: 12.5px; padding: 3px 8px; background: var(--brand-soft); color: var(--brand); }
.plan-copy { display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; }
.plan-copy textarea, .plan-copy input { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel-2); color: var(--text); font: inherit; font-size: 13px; resize: vertical; }
.listing-details { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; font-size: 14px; }
.listing-details p { margin: 2px 0 0; }
.rank-map { height: 420px; border-radius: 12px; border: 1px solid var(--border); z-index: 0; }
.rank-dot span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #fff; font-weight: 700; font-size: 12px; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; margin: 10px 0 4px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }

/* Website dashboard */
.answer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 0; }
.answer-row .engine { width: 90px; font-weight: 600; font-size: 13px; }
.answer-snip { flex-basis: 100%; font-size: 12px; padding-left: 98px; }
.vol-line { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; font-weight: 400; color: var(--muted); }
.vol-line b { color: var(--text); font-weight: 600; }
.num-in { width: 100px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); color: var(--text); text-align: right; }
.site-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 14px; }
.site-switch { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.site-switch select, .form-row select, .field select { padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); color: inherit; font: inherit; font-weight: 600; max-width: 100%; }
.site-switch select { min-width: 220px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.active { color: var(--brand); border-bottom-color: var(--brand); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-2 > .block { margin: 0; }
.chart { width: 100%; height: auto; margin-bottom: 8px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--muted); }
.field.wide, .check, .field-actions { grid-column: 1 / -1; }
.field input, .field textarea, .form-row input { padding: 9px 11px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); color: var(--text); font: inherit; font-size: 14px; font-weight: 400; }
.field textarea { resize: vertical; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.edited { font-size: 11px; font-weight: 600; color: var(--brand); background: var(--brand-soft); padding: 1px 6px; border-radius: 6px; margin-left: 4px; }
.swatches { display: flex; gap: 6px; margin: 2px 0; }
.swatch { width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--border); }
.logo-preview { max-height: 48px; max-width: 200px; object-fit: contain; align-self: flex-start; background: var(--panel-2); border-radius: 8px; padding: 4px; }
.profile-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
.teaser { border-style: dashed; }
.form-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.form-row label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); font-weight: 600; }
.danger-row { display: flex; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.tag { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 6px; background: var(--panel-2); color: var(--muted); margin-left: 4px; }
.pop { display: inline-block; width: 90px; height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--brand) var(--w), var(--panel-2) var(--w)); }
.kw-group { border-top: 1px solid var(--border); padding: 10px 0; }
.kw-group summary { cursor: pointer; padding: 4px 0; }
.bars { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.bar-row { display: grid; grid-template-columns: 120px 1fr 60px; gap: 10px; align-items: center; font-size: 13px; }
.bar-row b { text-align: right; }
.bar-fill { height: 10px; border-radius: 99px; background: linear-gradient(90deg, var(--brand) var(--w), var(--panel-2) var(--w)); }
@media (max-width: 760px) {
  .grid-2, .form-grid { grid-template-columns: 1fr; }
  .profile-head { flex-direction: column; }
}

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(140px); background: #0f172a; color: #fff; padding: 11px 18px; border-radius: 12px; transition: transform 0.25s; z-index: 60; max-width: calc(100% - 32px); }
.toast.show { transform: translateX(-50%); }

@media (max-width: 900px) {
  .cats { grid-template-columns: repeat(3, 1fr); }
  .summary { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .chips { justify-content: center; }
  .steps, .features, .fix-types { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .cats { grid-template-columns: repeat(2, 1fr); }
  .finding { grid-template-columns: 1fr; }
  .fix { align-items: flex-start; }
  .scan-form { flex-direction: column; }
  .speed-row { grid-template-columns: 1fr; }
}
