:root{
  --bg:#ffffff; --ink:#14213d; --muted:#5b6b82; --line:#e3e9f2;
  --accent:#2563eb; --accent-ink:#ffffff; --bad:#dc2626; --warn:#d97706; --good:#16a34a;
  --card:#f7fafc; --radius:14px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;background:var(--bg);color:var(--ink);line-height:1.55}
a{color:var(--accent);text-decoration:none}
a:hover{text-decoration:underline}
.wrap{max-width:1080px;margin:0 auto;padding:0 18px}
/* v92: there is NO header bar anymore (owner's order). The bar's
   stacking role (v63: the header layer at z-index 70 kept the gear
   dropdown above the AI chat layer at 60, below the mobile tools
   drawer at 80 and its scrim at 75) is inherited by the floating
   account corner (.acct-corner, z-index 70 — see the v92 section at
   the end of this file), so the gear menu still opens above the
   chat and below the drawer, exactly as it did inside the bar. */
.logo{font-weight:800;font-size:22px;color:var(--ink)}
.logo span{color:var(--accent)}
nav.main{margin-left:auto;display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end;align-items:center}
nav.main a{color:var(--ink);font-size:15px}
.btn{display:inline-block;background:var(--accent);color:var(--accent-ink);border:0;border-radius:10px;padding:11px 20px;font-size:16px;font-weight:600;cursor:pointer}
.btn:hover{opacity:.92;text-decoration:none}
.btn.ghost{background:#fff;color:var(--accent);border:1px solid var(--accent)}
.btn:disabled{opacity:.55;cursor:wait}
.hero{padding:52px 0 26px;text-align:center}
.hero h1{font-size:38px;line-height:1.2;margin:0 0 10px}
.hero p{color:var(--muted);font-size:18px;margin:0 auto 24px;max-width:640px}
.audit-box{display:flex;gap:10px;max-width:680px;margin:0 auto;flex-wrap:wrap;justify-content:center}
.audit-box input{flex:1;min-width:260px;padding:14px 16px;font-size:17px;border:2px solid var(--line);border-radius:12px}
.audit-box input:focus{outline:none;border-color:var(--accent)}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:14px;margin:26px 0 50px}
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:18px;display:block;color:var(--ink)}
.card:hover{border-color:var(--accent);text-decoration:none}
.card h3{margin:0 0 6px;font-size:17px}
.card p{margin:0;color:var(--muted);font-size:14px}
.card .tag{display:inline-block;font-size:11px;font-weight:700;letter-spacing:.04em;padding:2px 8px;border-radius:99px;background:#e8f0fe;color:var(--accent);margin-bottom:8px}
.card .tag.win{background:#e7f8ee;color:var(--good)}
section.block{padding:30px 0}
h2.sec{font-size:26px;margin:0 0 8px}
p.lead{color:var(--muted);max-width:720px}
.tool-head{padding:34px 0 6px}
.tool-head h1{font-size:30px;margin:0 0 8px}
.tool-head p{color:var(--muted);max-width:720px}
.panel{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:20px;margin:18px 0}
.panel label{font-weight:600;display:block;margin:0 0 6px}
.panel input[type=text],.panel input[type=url],.panel input[type=password],.panel textarea{width:100%;padding:12px 14px;font-size:16px;border:1.5px solid var(--line);border-radius:10px;margin-bottom:12px}
.panel textarea{min-height:150px}
.row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.note{color:var(--muted);font-size:14px}
.score-wrap{display:flex;gap:22px;align-items:center;flex-wrap:wrap}
.score-circle{width:118px;height:118px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:32px;font-weight:800;color:#fff;flex:none}
.score-circle.good{background:var(--good)} .score-circle.warn{background:var(--warn)} .score-circle.bad{background:var(--bad)}
.issue{border:1px solid var(--line);border-left:6px solid var(--muted);border-radius:10px;padding:12px 14px;margin:10px 0;background:#fff}
.issue.bad{border-left-color:var(--bad)} .issue.warn{border-left-color:var(--warn)} .issue.good{border-left-color:var(--good)}
.issue b{display:block}
.issue .fix{color:var(--muted);font-size:14px;margin-top:4px}
.stats{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px;margin:14px 0}
.stat{background:var(--card);border:1px solid var(--line);border-radius:12px;padding:14px;text-align:center}
.stat .n{font-size:24px;font-weight:800}
.stat .l{color:var(--muted);font-size:13px}
table.list{width:100%;border-collapse:collapse;font-size:14px}
table.list th,table.list td{border-bottom:1px solid var(--line);padding:8px;text-align:left;vertical-align:top}
.hidden{display:none}
.progress{height:10px;background:var(--line);border-radius:99px;overflow:hidden;margin:10px 0}
.progress i{display:block;height:100%;background:var(--accent);width:0%}
.mode-switch{display:inline-flex;gap:4px;background:var(--card);border:1.5px solid var(--line);border-radius:99px;padding:4px;margin-bottom:14px}
.mode-btn{border:0;background:transparent;color:var(--muted);font-size:14px;font-weight:600;padding:7px 16px;border-radius:99px;cursor:pointer}
.mode-btn.active{background:var(--accent);color:var(--accent-ink)}
footer.site{border-top:1px solid var(--line);margin-top:40px;padding:22px 0;color:var(--muted);font-size:14px}
footer.site .wrap{display:flex;gap:16px;flex-wrap:wrap}
.kv{background:var(--card);border:1px dashed var(--line);border-radius:10px;padding:10px 12px;font-family:ui-monospace,Menlo,Consolas,monospace;font-size:13px;word-break:break-all}
@media (max-width:640px){.hero h1{font-size:29px}.tool-head h1{font-size:24px}}

/* ---------- UI/UX polish & animations ---------- */
@keyframes fadeUp{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
@keyframes popIn{from{opacity:0;transform:scale(.92)}to{opacity:1;transform:scale(1)}}
@keyframes shimmer{from{background-position:200% 0}to{background-position:-200% 0}}
@keyframes floaty{0%,100%{transform:translateY(0)}50%{transform:translateY(-5px)}}
.hero{animation:fadeUp .6s ease both}
.hero h1{background:linear-gradient(90deg,var(--ink),var(--accent));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
.card{transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;animation:fadeUp .5s ease both}
.card:hover{transform:translateY(-4px);box-shadow:0 10px 24px rgba(20,33,61,.10)}
.grid .card:nth-child(2){animation-delay:.04s}.grid .card:nth-child(3){animation-delay:.08s}.grid .card:nth-child(4){animation-delay:.12s}
.grid .card:nth-child(5){animation-delay:.16s}.grid .card:nth-child(6){animation-delay:.20s}.grid .card:nth-child(7){animation-delay:.24s}
.grid .card:nth-child(8){animation-delay:.28s}.grid .card:nth-child(9){animation-delay:.32s}.grid .card:nth-child(10){animation-delay:.36s}.grid .card:nth-child(11){animation-delay:.40s}
.btn{transition:transform .15s ease,box-shadow .15s ease,opacity .15s ease}
.btn:hover{transform:translateY(-1px);box-shadow:0 6px 16px rgba(37,99,235,.28)}
.btn:active{transform:translateY(0)}
.issue,.panel,.stat{animation:fadeUp .45s ease both}
.score-circle{animation:popIn .5s ease both}
input,textarea{transition:border-color .15s ease,box-shadow .15s ease}
input:focus,textarea:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px rgba(37,99,235,.15)}
.progress i{transition:width .3s ease}
.shimmer{height:14px;border-radius:8px;background:linear-gradient(90deg,var(--line) 25%,#f2f6fb 50%,var(--line) 75%);background-size:200% 100%;animation:shimmer 1.2s infinite;margin:8px 0}

/* ---------- AI chat widget ---------- */
#ai-fab{position:fixed;right:18px;bottom:18px;width:58px;height:58px;border-radius:50%;border:0;background:var(--accent);color:#fff;font-size:26px;cursor:pointer;box-shadow:0 10px 26px rgba(37,99,235,.4);z-index:60;animation:floaty 3.2s ease-in-out infinite;transition:transform .15s ease,bottom .22s ease}
#ai-fab:hover{transform:scale(1.07)}
/* v81: the panel is a strict column — header row in flow (flex:none),
   the messages region the ONLY flexible part (flex:1 + min-height:0 +
   its own scroll), then the web-search row and the input row in flow
   (flex:none). No bubble can ever be clipped by the header above or
   the rows below, at any panel height. Open/close is a transition
   (opacity + transform), never a display swap, so it glides. */
#ai-panel{position:fixed;right:18px;bottom:86px;width:min(430px,calc(100vw - 24px));max-height:80vh;display:flex;flex-direction:column;background:var(--glass,rgba(255,255,255,.92));backdrop-filter:blur(16px) saturate(1.4);-webkit-backdrop-filter:blur(16px) saturate(1.4);border:1px solid var(--glass-brd,var(--line));border-radius:16px;box-shadow:0 18px 44px rgba(20,33,61,.22);z-index:60;overflow:hidden;visibility:hidden;opacity:0;transform:translateY(14px) scale(.98);pointer-events:none;transition:opacity .25s ease,transform .25s ease,bottom .22s ease,visibility 0s linear .25s}
#ai-panel.open{visibility:visible;opacity:1;transform:none;pointer-events:auto;transition:opacity .25s ease,transform .25s ease,bottom .22s ease,visibility 0s}
#ai-panel .ai-head{background:var(--accent);color:#fff;padding:12px 16px;font-weight:700;display:flex;justify-content:space-between;align-items:center;flex:none}
#ai-panel .ai-head button{background:transparent;border:0;color:#fff;font-size:18px;cursor:pointer}
#ai-log{padding:14px;overflow-y:auto;display:flex;flex-direction:column;gap:10px;flex:1 1 auto;min-height:0}
.ai-msg{max-width:88%;padding:10px 12px;border-radius:12px;font-size:14.5px;white-space:pre-wrap;animation:fadeUp .3s ease both}
.ai-msg.user{align-self:flex-end;background:#e8f0fe;border-bottom-right-radius:4px}
.ai-msg.bot{align-self:flex-start;background:var(--card);border:1px solid var(--line);border-bottom-left-radius:4px}
.ai-msg.typing{color:var(--muted);font-style:italic}
#ai-form{display:flex;gap:8px;padding:12px;border-top:1px solid var(--line);flex:none}
#ai-form input{flex:1;padding:11px 12px;border:1.5px solid var(--line);border-radius:10px;font-size:15px;margin:0}
#ai-form button{padding:11px 16px}

/* ---------- v8 Redesign: premium look ---------- */
:root{
  --bg:#f4f7fc; --ink:#0d1b2e; --muted:#54687f; --line:#dde6f0;
  --accent:#2563eb; --accent2:#7c3aed; --card:#ffffff;
  --grad:linear-gradient(120deg,#2563eb,#7c3aed);
  --shadow:0 6px 24px rgba(13,27,46,.07);
  --shadow-lg:0 16px 40px rgba(13,27,46,.12);
}
body{background:var(--bg)}
.logo{font-size:23px;letter-spacing:-.02em}
.logo span{background:var(--grad);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
nav.main a{font-weight:600;padding:6px 10px;border-radius:99px;transition:background .15s ease,color .15s ease;white-space:nowrap;font-size:14px}
nav.main a:hover{background:#eaf1fe;text-decoration:none}
.btn{background:var(--grad);border-radius:12px;box-shadow:0 8px 20px rgba(79,70,229,.28)}
.btn.ghost{background:#fff;color:var(--accent);border:1.5px solid var(--accent);box-shadow:none}
.hero{position:relative;padding:28px 0 36px;overflow:hidden}
/* v93: the glow's fade now runs the FULL gradient extent (transparent
   only at 100%, with soft mid stops) over much larger radii, and the
   layer is exactly the hero box (inset:0) instead of a fixed 480px
   strip offset above it — no ellipse contour and no layer-box edge
   can print as a "line" on dark backgrounds. Both ellipses end
   (alpha 0) inside the hero on the left, right and bottom, so no
   edge of the hero shows a tint step either. */
.hero::before{content:"";position:absolute;inset:0;background:radial-gradient(26% 78% at 26% 4%,rgba(37,99,235,.16),rgba(37,99,235,.07) 40%,rgba(37,99,235,.02) 75%,transparent),radial-gradient(23% 74% at 76% 0%,rgba(124,58,237,.15),rgba(124,58,237,.06) 40%,rgba(124,58,237,.02) 75%,transparent);pointer-events:none}
.hero h1{font-size:46px;letter-spacing:-.02em}
.hero p{font-size:19px}
.audit-box input{border-radius:14px;border:2px solid var(--line);box-shadow:var(--shadow);background:#fff}
.audit-box input:focus{border-color:var(--accent)}
.grid{gap:16px}
.card{background:#fff;border-radius:16px;box-shadow:var(--shadow);border:1px solid rgba(221,230,240,.7);position:relative;overflow:hidden}
.card::before{content:"";position:absolute;top:0;left:0;right:0;height:4px;background:var(--grad);opacity:0;transition:opacity .18s ease}
.card:hover{box-shadow:var(--shadow-lg)}
.card:hover::before{opacity:1}
.card h3{font-size:18px}
.card .tag{background:#eef3ff}
.panel{background:#fff;border-radius:16px;box-shadow:var(--shadow);border:1px solid rgba(221,230,240,.7);padding:24px}
.stat{background:#fff;border-radius:14px;box-shadow:var(--shadow);border:1px solid rgba(221,230,240,.7);padding:18px 12px}
.stat .n{font-size:27px;background:var(--grad);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
.issue{border-radius:12px;box-shadow:0 2px 10px rgba(13,27,46,.04)}
.score-circle{box-shadow:var(--shadow-lg);border:6px solid #fff}
.score-circle.good{background:linear-gradient(140deg,#22c55e,#15803d)}
.score-circle.warn{background:linear-gradient(140deg,#f59e0b,#d97706)}
.score-circle.bad{background:linear-gradient(140deg,#ef4444,#b91c1c)}
table.list th{color:var(--muted);font-size:12.5px;text-transform:uppercase;letter-spacing:.05em}
table.list tr:hover td{background:#f6faff}
.tool-head h1{font-size:34px;letter-spacing:-.02em}
h2.sec{letter-spacing:-.01em}
footer.site{background:#0d1b2e;color:#c7d3e4;margin-top:56px}
footer.site a{color:#9fc0ff}
footer.site .wrap{padding-top:22px;padding-bottom:22px}
select{font-family:inherit}
#ai-fab{background:var(--grad)}
@media (max-width:640px){.hero h1{font-size:32px}}

/* ---------- v9: animated gradient + glass + dark/light ---------- */
:root{--glass:rgba(255,255,255,.72);--glass-brd:rgba(255,255,255,.7);--glass-shadow:0 10px 34px rgba(13,27,46,.10)}
html[data-theme="dark"]{
  --bg:#04070d; --ink:#e9eff8; --muted:#97a9c0; --line:rgba(148,178,220,.20);
  --card:rgba(255,255,255,.055); --glass:rgba(10,18,32,.58); --glass-brd:rgba(148,178,220,.22);
  --shadow:0 8px 28px rgba(0,0,0,.45); --shadow-lg:0 18px 44px rgba(0,0,0,.55); --glass-shadow:0 12px 36px rgba(0,0,0,.5);
}
body{transition:background-color .35s ease,color .35s ease}
body::before{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;
  background:
    radial-gradient(560px 380px at 12% 8%,rgba(37,99,235,.20),transparent 65%),
    radial-gradient(620px 420px at 88% 18%,rgba(124,58,237,.18),transparent 65%),
    radial-gradient(700px 500px at 55% 105%,rgba(16,185,129,.10),transparent 65%);
  animation:blobDrift 16s ease-in-out infinite alternate}
html[data-theme="dark"] body::before{
  background:
    radial-gradient(560px 380px at 12% 8%,rgba(37,99,235,.30),transparent 65%),
    radial-gradient(620px 420px at 88% 18%,rgba(124,58,237,.28),transparent 65%),
    radial-gradient(700px 500px at 55% 105%,rgba(16,185,129,.14),transparent 65%)}
@keyframes blobDrift{from{transform:translate3d(0,0,0) scale(1)}to{transform:translate3d(2.5%, -2%, 0) scale(1.07)}}
.card,.panel,.stat{background:var(--glass);backdrop-filter:blur(12px) saturate(1.3);-webkit-backdrop-filter:blur(12px) saturate(1.3);border:1px solid var(--glass-brd);box-shadow:var(--glass-shadow)}
.issue{background:var(--glass);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
.audit-box input,.panel input[type=text],.panel input[type=url],.panel input[type=password],.panel textarea,select{background:var(--glass);color:var(--ink);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
html[data-theme="dark"] table.list tr:hover td{background:rgba(255,255,255,.045)}
html[data-theme="dark"] nav.main a:hover{background:rgba(255,255,255,.09)}
html[data-theme="dark"] #ai-panel{background:rgba(8,14,26,.92)}
html[data-theme="dark"] .ai-msg.user{background:rgba(37,99,235,.28)}
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:#7e93ad}
/* ---------- v13: header Tools dropdown + audit per-page reports ---------- */
.tools-menu{position:relative}
#tools-btn{background:transparent;border:0;color:var(--ink);font:inherit;font-weight:600;padding:8px 12px;border-radius:99px;cursor:pointer}
#tools-btn:hover{background:rgba(127,160,220,.14)}
.tools-dropdown{position:absolute;top:calc(100% + 10px);left:50%;transform:translateX(-50%) translateY(8px);width:350px;max-width:86vw;display:grid;grid-template-columns:1fr 1fr;gap:2px;padding:10px;background:var(--glass);backdrop-filter:blur(16px) saturate(1.4);-webkit-backdrop-filter:blur(16px) saturate(1.4);border:1px solid var(--glass-brd);border-radius:14px;box-shadow:var(--glass-shadow);opacity:0;visibility:hidden;transition:opacity .18s ease,transform .18s ease,visibility .18s;z-index:70}
.tools-menu.open .tools-dropdown,.tools-menu:hover .tools-dropdown{opacity:1;visibility:visible;transform:translateX(-50%) translateY(0)}
.tools-dropdown a{padding:9px 10px;border-radius:9px;font-size:14px;font-weight:600;color:var(--ink);text-decoration:none}
.tools-dropdown a:hover{background:var(--grad);color:#fff}
.page-report{background:var(--glass);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border:1px solid var(--glass-brd);border-radius:12px;margin:0 0 10px;box-shadow:var(--glass-shadow)}
.page-report summary{cursor:pointer;padding:13px 16px;display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap;font-weight:600;list-style:none}
.page-report summary::-webkit-details-marker{display:none}
.page-report summary .pr-url{word-break:break-all}
.page-report summary .pr-meta{color:var(--muted);font-size:13px;white-space:nowrap}
.page-report .pr-body{padding:4px 16px 16px;border-top:1px solid var(--glass-brd)}
.chart-box{background:var(--glass);border:1px solid var(--glass-brd);border-radius:12px;padding:14px 14px 8px;margin:0 0 16px;box-shadow:var(--glass-shadow)}
.chart-legend{display:flex;flex-wrap:wrap;gap:8px 18px;margin-bottom:8px}
.chart-chip{display:inline-flex;align-items:center;gap:7px;font-size:13.5px;color:var(--muted)}
.chart-chip i{width:11px;height:11px;border-radius:3px;display:inline-block}
.chart-chip b{color:var(--ink)}
/* ---------- v14: account / settings gear menu ---------- */
.acct-menu{position:relative}
#acct-btn{background:var(--glass);border:1.5px solid var(--glass-brd);border-radius:99px;width:38px;height:38px;cursor:pointer;font-size:16px;line-height:1;flex:none;transition:transform .15s ease}
#acct-btn:hover{transform:rotate(30deg)}
.hdr-auth{margin-left:auto;font-weight:600;font-size:14.5px;display:flex;align-items:center}
.acct-dropdown{position:absolute;top:calc(100% + 10px);right:0;width:250px;max-width:92vw;max-height:82vh;overflow-y:auto;display:flex;flex-direction:column;gap:2px;padding:12px;background:var(--glass);backdrop-filter:blur(16px) saturate(1.4);-webkit-backdrop-filter:blur(16px) saturate(1.4);border:1px solid var(--glass-brd);border-radius:14px;box-shadow:var(--glass-shadow);opacity:0;visibility:hidden;transform:translateY(8px);transition:opacity .18s ease,transform .18s ease,visibility .18s;z-index:70}
/* ---------- v27: LEFT tools sidebar (owner correction: bar left, settings right) ---------- */
#tools-bar{position:fixed;top:0;left:0;width:234px;height:100vh;overflow-y:auto;background:var(--glass);backdrop-filter:blur(16px) saturate(1.4);-webkit-backdrop-filter:blur(16px) saturate(1.4);border-right:1px solid var(--glass-brd);padding:16px 12px 18px;z-index:15}
#tools-bar .tb-head{font-size:11.5px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);padding:4px 10px 8px}
#tools-bar a{display:block;padding:9px 10px;border-radius:9px;font-size:14.5px;font-weight:600;color:var(--ink);text-decoration:none}
#tools-bar a:hover{background:color-mix(in srgb,var(--accent) 15%,transparent);color:var(--accent)}
#tools-bar a.active{background:var(--grad);color:#fff}
@media (min-width:901px){body{padding-left:234px}}
@media (max-width:900px){#tools-bar{position:static;width:auto;height:auto;display:flex;flex-wrap:wrap;gap:4px;padding:10px 12px;border-right:0;border-bottom:1px solid var(--glass-brd)}#tools-bar .tb-head{width:100%;padding-bottom:2px}#tools-bar a{padding:7px 10px}}
/* ---------- v30: footer sticks to bottom ---------- */
body{display:flex;flex-direction:column;min-height:100vh}
main{flex:1 0 auto}
.menu-label{font-size:11.5px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);padding:8px 10px 4px}
.menu-tools{display:grid;grid-template-columns:1fr 1fr;gap:2px}
#theme-toggle{background:none;border:0;text-align:left;padding:9px 10px;border-radius:9px;font-size:14.5px;font-weight:600;color:var(--ink);cursor:pointer;font-family:inherit;width:100%}
#theme-toggle:hover{background:var(--grad);color:#fff}
.acct-menu.open .acct-dropdown{opacity:1;visibility:visible;transform:translateY(0)}
.acct-dropdown a{padding:9px 10px;border-radius:9px;font-size:14.5px;font-weight:600;color:var(--ink);text-decoration:none}
.acct-dropdown a:hover{background:var(--grad);color:#fff}
.range-chips{display:flex;gap:8px;flex-wrap:wrap}
.range-chip{background:var(--glass);border:1.5px solid var(--glass-brd);color:var(--ink);border-radius:99px;padding:7px 14px;font-size:13.5px;font-weight:600;cursor:pointer;transition:all .15s ease}
.range-chip:hover{border-color:var(--accent)}
.range-chip.active{background:var(--grad);color:#fff;border-color:transparent}
/* v76/v77: AI answers render through the shared markdown renderer;
   headings/lists inside chat + agent messages get compact spacing,
   and the "Answered by <model>" line is small and muted. */
.ai-msg h3,.ai-msg h4,.ai-msg h5{margin:10px 0 4px;font-size:15px}
.ai-msg h3:first-child,.ai-msg h4:first-child,.ai-msg h5:first-child{margin-top:0}
.ai-msg p{margin:6px 0}
.ai-msg p:first-child{margin-top:0}
.ai-msg p:last-child{margin-bottom:0}
.ai-msg ul,.ai-msg ol{margin:6px 0;padding-left:20px}
.ai-msg code{background:rgba(127,160,220,.16);padding:1px 5px;border-radius:5px;font-size:.92em}
.ai-model-line{font-size:11.5px;color:var(--muted);margin-top:7px;letter-spacing:.01em}
.insights-text h3,.insights-text h4,.insights-text h5{margin:10px 0 4px;font-size:15px}
.insights-text p{margin:6px 0}
.insights-text ul,.insights-text ol{margin:6px 0;padding-left:20px}
/* v78: web-search toggle + the Sources list under AI answers. */
#ai-web-row{padding:2px 2px 8px;flex:none}
.ws-toggle{display:inline-flex;align-items:center;gap:7px;font-size:13.5px;font-weight:600;cursor:pointer}
.ws-toggle input{width:16px;height:16px;accent-color:var(--accent);cursor:pointer}
.ws-toggle span{color:var(--muted);font-weight:400;font-size:12.5px}
.ai-sources{margin-top:10px;border-top:1px dashed var(--line);padding-top:8px}
.ai-sources-title{font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.ai-sources ol{margin:6px 0 0;padding-left:20px}
.ai-sources li{margin:3px 0;font-size:13.5px}
/* v73: Content Quality Checker whole-site table — the flagged-only
   filter is a class on the table (rows carry data-flag), so it never
   fights the shared table system's own search/sort. */
table.cqc-sitetable.flagged-only tbody tr[data-flag="0"]{display:none}
/* ---------- v19: fluid page navigation — REMOVED in v84 (ITEM F) --
   This block used to carry a cross-document view transition
   (@view-transition navigation:auto, the new page fading in from
   opacity 0) and an entrance animation on main.wrap itself (pageIn,
   also from opacity 0). Both made the main content's VISIBILITY
   depend on an animation completing — the only mechanisms in this
   codebase whose failure shape matches the owner's recurring report
   exactly (page loads, then the main area is blank while header +
   sidebar stay fine). The v84 hunt could not reproduce the blank in
   a real browser (legacy-fixture loads, repeated — see the v84
   changelist), so these are named as suspects, not a proven cause;
   either way, static content must never depend on an animation or a
   script to become or stay visible, so both are gone. Navigation is
   plain again; the component-level fadeUp animations INSIDE the
   content stay (a glitch there can never blank the page shell). */
/* ---------- v21: dashboard sections + Console-style metric charts ---------- */
.sub-panel{border-top:1px solid var(--glass-brd);margin-top:20px;padding-top:18px}
.sub-head{margin:0 0 10px;font-size:17px}
.mchart{background:var(--glass);border:1px solid var(--glass-brd);border-radius:12px;padding:14px 14px 8px;margin:0 0 16px;box-shadow:var(--glass-shadow)}
.mchart-wrap{position:relative}
.mchart .chart-legend{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:10px;margin-bottom:12px}
.mcard{display:flex;flex-direction:column;gap:5px;align-items:flex-start;text-align:left;background:var(--card);border:1.5px solid var(--line);border-radius:12px;padding:10px 14px;cursor:pointer;font-family:inherit;color:var(--muted);transition:border-color .15s ease,background .15s ease}
.mcard-top{display:inline-flex;align-items:center;gap:8px;font-size:13.5px;font-weight:600}
.mcheck{width:17px;height:17px;flex:none;border:2px solid var(--mc);border-radius:5px;display:inline-flex;align-items:center;justify-content:center;font-size:12px;color:#fff;line-height:1}
.mcard.on{border-color:var(--mc);background:var(--card);background:color-mix(in srgb,var(--mc) 13%,var(--card));color:var(--ink)}
.mcard.on .mcheck{background:var(--mc)}
.mcard-num{font-size:26px;font-weight:700;color:var(--muted);line-height:1.1;padding-left:25px}
.mcard.on .mcard-num{color:var(--ink)}
.mtooltip{position:absolute;top:2px;z-index:5;background:var(--card);border:1px solid var(--glass-brd);border-radius:10px;box-shadow:var(--glass-shadow);padding:8px 11px;font-size:12.5px;line-height:1.65;pointer-events:none;white-space:nowrap;color:var(--muted)}
.mtooltip i{width:9px;height:9px;border-radius:3px;display:inline-block;margin-right:6px}
.mtooltip b{color:var(--ink)}
/* ---------- v25: theme blend — scrollbars + native controls follow the theme ---------- */
html{color-scheme:light}
html[data-theme="dark"]{color-scheme:dark}
*{scrollbar-width:thin;scrollbar-color:var(--line) transparent}
::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:var(--line);border-radius:99px;border:2px solid var(--bg)}
::-webkit-scrollbar-thumb:hover{background:var(--muted)}
::selection{background:var(--accent);color:#fff}
input,select,textarea{caret-color:var(--accent)}
input[type=text],input[type=url],input[type=password],select,textarea{background:var(--card);color:var(--ink)}

.card,.panel,.stat{transition:background-color .35s ease,border-color .35s ease,box-shadow .2s ease,transform .18s ease}

/* ---------- v34/35: buttons fixed (solid, no gradient) — background glow KEPT (the owner likes it) ---------- */
:root{--glass-shadow:0 4px 18px rgba(13,27,46,.07)}
html[data-theme="dark"]{--bg:#000;--glass:rgba(13,20,34,.85);--glass-shadow:0 6px 20px rgba(0,0,0,.35)}
.btn{background:var(--accent);box-shadow:0 2px 8px rgba(13,27,46,.14)}
.btn:hover{box-shadow:0 4px 12px rgba(13,27,46,.18);opacity:1;filter:brightness(1.07)}
#ai-fab{background:var(--accent);box-shadow:0 6px 18px rgba(13,27,46,.28);animation:none}
.logo span{background:none;-webkit-text-fill-color:var(--accent);color:var(--accent)}
.hero h1{background:none;-webkit-text-fill-color:currentColor;color:var(--ink)}
.stat .n{background:none;-webkit-text-fill-color:currentColor;color:var(--ink)}
.card::before{background:var(--accent)}
.score-circle.good{background:#16a34a}
.score-circle.warn{background:#d97706}
.score-circle.bad{background:#dc2626}
.card,.panel,.stat,.acct-dropdown,.chart-box,.page-report,#tools-bar{backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
.acct-dropdown a:hover,.tools-dropdown a:hover,#theme-toggle:hover{background:color-mix(in srgb,var(--accent) 13%,transparent);color:var(--ink)}
#tools-bar a.active{background:var(--accent);color:#fff}
.range-chip.active{background:var(--accent);color:#fff;border-color:transparent}
/* v36: dark-mode palette softened — deep blue buttons, no glow (owner note: bright ones stung the eyes) */
html[data-theme="dark"] .btn{background:#1d4ed8;box-shadow:0 2px 10px rgba(0,0,0,.45)}
/* v74: dark-mode GHOST buttons (the shared secondary/download style —
   Download PDF, Download CSV, and every "btn ghost" across the tools).
   The dark .btn rule above outranks .btn.ghost's white background
   (specificity 0-2-1 vs 0-2-0) while the ghost's accent-blue TEXT
   survived — blue text on mid-blue, barely readable on black (owner's
   screenshot, Content Quality Checker). Ghost in dark is now: light
   text on a visible dark surface with a defined border. Light mode is
   untouched: white surface, accent text, accent border. */
html[data-theme="dark"] .btn.ghost{background:rgba(148,178,220,.10);color:#e9eff8;border-color:rgba(148,178,220,.45);box-shadow:none}
html[data-theme="dark"] .btn.ghost:hover{background:rgba(148,178,220,.18);filter:none}
html[data-theme="dark"] .btn:hover{filter:brightness(1.15);box-shadow:0 3px 12px rgba(0,0,0,.5)}
html[data-theme="dark"] #ai-fab{background:#1d4ed8;box-shadow:0 6px 16px rgba(0,0,0,.5)}
html[data-theme="dark"] #tools-bar a.active{background:#1d4ed8}
html[data-theme="dark"] .range-chip.active{background:#1d4ed8}
html[data-theme="dark"] .ai-msg.user{background:rgba(29,78,216,.35)}
/* ---------- v37: FULL-WIDTH layout — site uses the whole page (owner) ---------- */
.wrap{max-width:none;padding:0 40px}
footer.site .wrap{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px 18px}
@media (max-width:900px){.wrap{padding:0 16px}}
/* ---------- v39: mobile fix — nothing tiny/cramped (owner) ---------- */
@media (max-width:900px){
  #tools-bar{flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;scrollbar-width:none}
  #tools-bar::-webkit-scrollbar{display:none}
  #tools-bar a{white-space:nowrap;font-size:15px;padding:9px 12px}
  .hero{padding:28px 0 24px}
  /* v93: at narrow widths the hero-relative radii shrink with the
     box and the horizontal fade compresses — widen the violet glow
     (still ending inside the hero) so the fade stays soft. */
  .hero::before{background:radial-gradient(26% 78% at 26% 4%,rgba(37,99,235,.16),rgba(37,99,235,.07) 40%,rgba(37,99,235,.02) 75%,transparent),radial-gradient(30% 74% at 70% 0%,rgba(124,58,237,.15),rgba(124,58,237,.06) 40%,rgba(124,58,237,.02) 75%,transparent)}
  .hero h1{font-size:34px}
  .hero p{font-size:17px}
  .tool-head h1{font-size:28px}
  input,textarea,select{font-size:16px}
  .btn{padding:12px 20px}
  .hdr-auth{font-size:13.5px}
  .logo{font-size:20px}
}

/* ---------- Phase 2: settings key rows ---------- */
.key-row{display:flex;gap:8px;flex-wrap:wrap;align-items:flex-start}
.key-row input,.key-row textarea{margin-bottom:0 !important}
.key-row-wrap{margin-bottom:10px}
.key-row-wrap .kr-src{font-size:12.5px}
.key-service .btn{white-space:nowrap}

/* ---------- Phase 3: categorized sidebar + drawer + theme pill + dashboard panels ---------- */
#tools-bar{display:flex;flex-direction:column}
#tools-bar .tb-dash{font-size:15.5px;font-weight:700;background:color-mix(in srgb,var(--accent) 12%,transparent);margin-bottom:10px}
#tools-bar .tb-dash.active{background:var(--accent);color:#fff}
.tb-search{margin:0 2px 12px}
.tb-search input{width:100%;padding:9px 12px;font-size:14.5px;border:1.5px solid var(--glass-brd);border-radius:10px;background:var(--glass);color:var(--ink)}
.tb-search input:focus{outline:none;border-color:var(--accent)}
#tools-bar .tb-cat{margin-bottom:14px}
#tools-bar .tb-cat .tb-head{font-size:12.5px;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:var(--ink);padding:6px 10px 5px;border-bottom:1px solid var(--glass-brd);margin-bottom:5px}
#tools-bar .tb-cat a{padding:7px 10px 7px 16px;font-size:14px}
#tools-bar .tb-foot{margin-top:auto;border-top:1px solid var(--glass-brd);padding-top:10px}
#tools-bar .tb-foot a{font-size:14px}
#tools-bar .tb-none{color:var(--muted);font-size:13.5px;padding:4px 10px}
#tb-toggle{display:none;background:var(--glass);border:1.5px solid var(--glass-brd);border-radius:10px;width:40px;height:40px;font-size:18px;cursor:pointer;color:var(--ink);flex:none;line-height:1;align-items:center;justify-content:center}
#tb-scrim{position:fixed;inset:0;background:rgba(4,8,15,.45);z-index:75}
body.tb-open{overflow:hidden}
@media (max-width:900px){
  #tb-toggle{display:inline-flex}
  #tools-bar{position:fixed;top:0;left:0;width:min(300px,84vw);height:100vh;transform:translateX(-105%);transition:transform .25s ease;z-index:80;padding:18px 12px;flex-direction:column;flex-wrap:nowrap;overflow-y:auto;overflow-x:hidden;border-right:1px solid var(--glass-brd);border-bottom:0}
  #tools-bar.open{transform:none;box-shadow:0 0 44px rgba(0,0,0,.35)}
  #tools-bar a{white-space:normal}
}
/* Theme pill: three icons in a 999px pill, selected = filled circle */
.theme-row{padding:2px 0 4px}
.theme-pill{display:inline-flex;gap:2px;background:color-mix(in srgb,var(--ink) 6%,transparent);border:1.5px solid var(--glass-brd);border-radius:999px;padding:3px;margin:2px 10px 6px}
.theme-pill button{width:36px;height:36px;border-radius:50%;border:0;background:transparent;font-size:16px;cursor:pointer;line-height:1;display:inline-flex;align-items:center;justify-content:center;transition:background .15s ease}
.theme-pill button:hover{background:color-mix(in srgb,var(--accent) 18%,transparent)}
.theme-pill button.sel{background:var(--accent);color:#fff}
html[data-theme="dark"] .theme-pill button.sel{background:#1d4ed8}
/* Dashboard: DP/TA prompt cards + Next steps */
.dpta-card{flex:1;min-width:240px;background:var(--card);border:1px solid var(--line);border-radius:12px;padding:16px}
.dpta-name{font-size:19px;font-weight:800;margin-bottom:4px}
.steps-list{margin:6px 0;padding-left:22px}
.steps-list li{margin:0 0 14px}
.steps-list .step-tool{margin-top:4px;font-size:14px}
@media print{#tb-toggle,#tb-scrim{display:none !important}}

/* ---------- Phase 2: print view for report PDFs ---------- */
@media print{
  .acct-corner,#tools-bar,footer.site,#ai-fab,#ai-panel,#tool-form,.report-tools,.no-print,.range-chips{display:none !important}
  body{padding-left:0 !important;background:#fff !important}
  main.wrap{animation:none !important;max-width:none}
  .panel,.issue,.stat,details.page-report{break-inside:avoid;border-color:#bbb !important}
  details.page-report > .pr-body{display:block}
  a{color:#000 !important;text-decoration:none}
}

/* ---------- Phase 4: Keyword Finder (tabs, verdicts, trends, niche) ---------- */
.kf-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0 6px}
.kf-tab{border:1.5px solid var(--line);background:var(--card);color:var(--ink);font-size:14px;font-weight:600;padding:8px 16px;border-radius:99px;cursor:pointer}
.kf-tab.active{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.kf-toolbar{display:flex;gap:16px;align-items:center;flex-wrap:wrap;margin:8px 0}
.kf-toolbar label{display:inline-flex;gap:7px;align-items:center;font-weight:600;font-size:14px;margin:0;cursor:pointer}
.kf-toolbar input[type="checkbox"]{width:17px;height:17px;margin:0}
.verdict{display:inline-block;padding:2px 9px;border-radius:999px;font-size:12.5px;font-weight:700;white-space:nowrap}
.verdict.work{background:#dcfce7;color:#166534}
.verdict.long{background:#fef9c3;color:#854d0e}
.verdict.skip{background:#fee2e2;color:#991b1b}
.verdict.nodata{background:var(--line);color:var(--muted)}
html[data-theme="dark"] .verdict.work{background:rgba(34,197,94,.20);color:#4ade80}
html[data-theme="dark"] .verdict.long{background:rgba(234,179,8,.20);color:#facc15}
html[data-theme="dark"] .verdict.skip{background:rgba(239,68,68,.20);color:#f87171}
.kf-reason{display:block;color:var(--muted);font-size:12.5px;line-height:1.45;margin-top:3px;max-width:340px}
.kf-pick{width:16px;height:16px;margin:0}
.kf-group{margin:0 0 10px}
.kf-group summary{cursor:pointer;font-weight:600;padding:4px 0}
.kf-group .pr-meta{color:var(--muted);font-weight:400;font-size:13px;margin-left:8px}
/* ---------- v60: Keyword Finder full data table + filter panel ---------- */
.kf-scroll{overflow-x:auto;overflow-y:auto;max-height:72vh;border:1px solid var(--line);border-radius:12px;background:var(--card)}
.kf-scroll table.list{border-collapse:separate;border-spacing:0}
.kf-scroll table.list th,.kf-scroll table.list td{word-break:normal;white-space:nowrap;padding:7px 10px}
.kf-scroll table.list td.kf-kw{white-space:normal;min-width:150px;font-weight:600}
.kf-scroll table.list td.kf-chips{white-space:normal;min-width:170px}
.kf-table thead th{position:sticky;top:0;background:var(--card);z-index:2;border-bottom:2px solid var(--line)}
.kf-table th.kf-sortable{cursor:pointer;user-select:none}
.kf-table th.kf-sortable:hover{color:var(--accent)}
.kf-table th.kf-pick-h{width:30px}
.kf-spark{display:block}
.kf-chip{display:inline-block;padding:1px 8px;margin:1px 2px 1px 0;border-radius:999px;font-size:11.5px;font-weight:600;background:var(--line);color:var(--ink);white-space:nowrap}
.kf-chip.more{background:transparent;border:1px dashed var(--line);color:var(--muted)}
.kf-chip.aio{background:linear-gradient(90deg,#7c3aed,#2563eb);color:#fff;box-shadow:0 0 0 1px rgba(124,58,237,.35)}
/* v87: nothing hidden — expandable chips and inline "show all" toggles */
.kf-more{display:inline}
.kf-more>summary{display:inline-block;list-style:none;cursor:pointer}
.kf-more>summary::-webkit-details-marker{display:none}
.kf-more .kf-more-rest{display:inline}
.more-inline{display:block;margin-top:4px}
.more-inline>summary{cursor:pointer;color:var(--accent,#2563eb);font-size:12.5px;font-weight:600;list-style:none}
.more-inline>summary::-webkit-details-marker{display:none}
.more-inline>span{display:block;margin-top:2px}
.gt-more details>summary{cursor:pointer;list-style:none}
.gt-more details>summary::-webkit-details-marker{display:none}
.gt-more details ul{margin:4px 0 0;padding:0;list-style:none}
/* v87: advanced filter builder rows */
.advf-row{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:6px 0}
.advf-row select,.advf-row input[type=text]{max-width:100%}
.advf-row .advf-field{flex:1 1 260px;min-width:200px}
.advf-row .advf-op{flex:0 1 130px}
.advf-row .advf-valwrap{flex:1 1 160px;min-width:130px}
.advf-row .advf-val{width:100%}
.kf-aio-line{border:1px solid var(--line);border-left:4px solid #7c3aed;border-radius:8px;padding:8px 12px;background:var(--card)}
.kf-filters{margin:12px 0;padding:14px 16px}
.kf-f-head{display:flex;gap:12px;align-items:baseline;flex-wrap:wrap;margin-bottom:10px}
.kf-f-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:12px 18px}
.kf-f-group{display:flex;flex-direction:column;gap:6px}
.kf-f-label{font-size:12.5px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
.kf-f-range{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.kf-f-range input{flex:1;min-width:80px;padding:7px 9px;border:1.5px solid var(--line);border-radius:8px;font-size:13.5px;background:var(--card);color:var(--ink)}
.kf-f-select{padding:7px 9px;border:1.5px solid var(--line);border-radius:8px;font-size:13.5px;background:var(--card);color:var(--ink)}
.kf-f-checks{display:flex;gap:6px 12px;flex-wrap:wrap}
.kf-fcb{display:inline-flex;gap:5px;align-items:center;font-size:13.5px;font-weight:500;margin:0;cursor:pointer}
.kf-fcb input{width:15px;height:15px;margin:0}
.kf-kd-chips{display:flex;gap:6px;flex-wrap:wrap}
.kf-kd-chip{border:1.5px solid var(--line);background:var(--card);color:var(--ink);font-size:12.5px;font-weight:600;padding:4px 11px;border-radius:99px;cursor:pointer}
.kf-kd-chip.active{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.kf-f-foot{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:12px}
@media print{.kf-filters{display:none}}
/* ---------- v51: tool cost labels — every tool states up front whether it
   runs free in the browser, spends the visitor's own API key, or uses
   their Google sign-in. Driven by one field on the TOOLS array; the same
   pill renders on the tool page (above the form), the homepage card and
   (as a dot + tooltip) in the sidebar. Theme-safe: only CSS vars. */
.tool-label{display:inline-flex;align-items:center;gap:8px;margin-top:10px;padding:6px 12px;border:1px solid var(--line);border-radius:99px;background:var(--card);font-size:13px;font-weight:600;color:var(--ink);line-height:1.35}
.tool-label .tl-dot{width:8px;height:8px;border-radius:50%;flex:none}
.tl-browser .tl-dot{background:var(--good)}
.tl-api .tl-dot{background:var(--warn)}
.tl-signin .tl-dot{background:var(--accent)}
.tool-label.tl-card{margin-top:12px;font-size:12px;font-weight:600}
.tb-dot{display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:7px;vertical-align:1px;flex:none}

/* ---- AI Agent (points 30/38): a conversation on its own page. The
   agent runs no tool and shows no banner anywhere; its chat log, the
   fetched-data notes and the data-request card all live here. */
#agent-main textarea{width:100%}
#agent-log .ai-msg{animation:fadeUp .3s ease both}

/* ---------- v55: official Google sign-in button ----------
   White in BOTH themes (that is Google's own style), multicolor "G",
   dark text. One class shared by every sign-in surface: the header,
   the dashboard gate, the Settings Google panel and account panel. */
.gbtn{display:inline-flex;align-items:center;gap:10px;background:#fff;color:#3c4043;border:1px solid #dadce0;border-radius:10px;padding:10px 18px;font-size:15px;font-weight:600;line-height:1;cursor:pointer;text-decoration:none;transition:background .15s ease,box-shadow .15s ease}
.gbtn:hover{background:#f8f9fa;box-shadow:0 1px 3px rgba(13,27,46,.18);text-decoration:none}
.gbtn svg{width:18px;height:18px;flex:none;display:block}
.gbtn.hdr-auth{padding:8px 14px}

/* ---------- v59: SEO As You Go wordmark + footer ----------
   Approved preview Option 4: extra-bold "SEO", the blue rising-graph
   mark at its top-right, "as you go" letter-spaced lowercase below.
   Dark letters on light; white letters on dark (the dark theme and
   .on-dark, kept for any genuinely always-dark surface; the footer
   used it until v85 made the footer follow the theme). Graph stroke #2563eb
   on light, #60a5fa on dark. */
.brand{display:inline-flex;flex-direction:column;line-height:1;text-decoration:none;color:var(--ink);--graph:#2563eb}
.brand:hover{text-decoration:none}
.brand-top{display:inline-flex;align-items:flex-start;font-weight:800;font-size:21px;letter-spacing:-.01em;line-height:1}
.brand-graph{width:14px;height:14px;flex:none;margin:1px 0 0 2px;fill:none;stroke:var(--graph);stroke-width:3.2;stroke-linecap:round;stroke-linejoin:round}
.brand-sub{font-size:10px;font-weight:600;letter-spacing:.34em;text-transform:lowercase;color:var(--muted);margin-top:3px;line-height:1}
html[data-theme="dark"] .brand{color:#fff;--graph:#60a5fa}
html[data-theme="dark"] .brand-sub{color:#97a9c0}
.brand.on-dark{color:#fff;--graph:#60a5fa}
.brand.on-dark .brand-sub{color:#c7d3e4}
.brand-sm .brand-top{font-size:18px}
.brand-sm .brand-graph{width:12px;height:12px}
.brand-sm .brand-sub{font-size:9px}
.foot-brand{display:flex;flex-direction:column;gap:10px}
.foot-tag{font-size:12.5px;color:#97a9c0;line-height:1.35}
footer.site .wrap{flex-direction:column;align-items:stretch}
.foot-main{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px 18px;width:100%}
.foot-copy{font-size:13.5px}
.foot-bottom{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px 18px;width:100%;margin-top:16px}
.foot-links{display:flex;flex-direction:row;flex-wrap:wrap;gap:8px 18px;align-items:center;justify-content:flex-end}
.foot-links a{white-space:nowrap}
@media (max-width:640px){.brand-top{font-size:19px}.brand-graph{width:12px;height:12px}.foot-links{justify-content:flex-start}}

/* v62: shared data-table system (sort + filter bar over loaded rows) */
.tblx-bar{display:flex;flex-wrap:wrap;gap:8px 14px;align-items:center;margin:10px 0 4px}
.tblx-bar input[type="text"],.tblx-bar input[type="number"],.tblx-bar select{padding:6px 9px;border:1px solid var(--line);border-radius:8px;background:var(--card);color:var(--ink);font:inherit;font-size:13.5px}
.tblx-bar .tblx-q{min-width:200px;flex:1;max-width:340px}
.tblx-bar .tblx-f{font-size:13px;color:var(--muted);display:inline-flex;gap:6px;align-items:center}
.tblx-bar .tblx-count{flex-basis:100%}
table.list th.sortable{cursor:pointer}
table.list th.sortable:hover{color:var(--accent)}
.kf-chip.q{background:#7c3aed;color:#fff}
.blx{margin:10px 0}

/* ---------- v84: table words never break mid-word (owner) ----------
   The shared base rule used to put word-break:break-all on every th/td,
   so when a wide table was squeezed into the content area the browser
   split single words: "WORDS" rendered as "WORD/S", "LOW-VALUE
   SIGNALS" as "LOW-VALUE SIGN/ALS" and a word count "4,894" as
   "4,89/4" (the owner's whole-site Content Quality screenshot). Now:
   header cells never wrap at all; numeric columns never wrap (the
   enhancer tags every data-t="num" column's cells .num — see
   enhanceDataTables); ordinary prose cells wrap at spaces and break a
   token only when it cannot fit whole; the first column (the page/URL
   column in nearly every table) may break its long tokens and keeps a
   sensible minimum width, so it cannot balloon the table or crush the
   other columns. And wide tables no longer squeeze at all: the
   enhancer wraps each tblx table in .tblx-scroll, which scrolls
   horizontally inside its own box — the page itself never gains
   horizontal overflow. Row action buttons never wrap either ("Open
   report" rendered as "Open repo/rt" in the same screenshot). The
   Keyword Finder's own .kf-scroll rules (higher specificity, nowrap
   already) and the v82 full-width layout are untouched. */
.tblx-scroll{overflow-x:auto;max-width:100%;-webkit-overflow-scrolling:touch}
.tblx-scroll>table.list{width:auto;min-width:100%}
table.list th{white-space:nowrap;word-break:normal;overflow-wrap:normal}
table.list td{word-break:normal;overflow-wrap:break-word}
table.list th.num,table.list td.num{white-space:nowrap;word-break:normal;min-width:64px}
table.list .btn,table.list button{white-space:nowrap}
table.tblx td:first-child{overflow-wrap:anywhere;min-width:150px}
/* Print (the "Download PDF" view): every scrollable area on a tool
   page prints EXPANDED, so the PDF holds the full content — all the
   table's rows and columns, the full Keyword Finder table, the whole
   chat/agent log — across as many printed pages as it takes, instead
   of only the slice that happened to be visible on screen. Table
   headers may wrap BETWEEN words in print (never mid-word) so a wide
   table can fit the paper; numbers stay on one line. */
@media print{.tblx-scroll{overflow:visible;max-width:none}.tblx-scroll>table.list{width:100%;min-width:100%}.tblx-scroll>table.list th{white-space:normal}.kf-scroll{overflow:visible;max-height:none;height:auto}#ai-panel.open{position:static;max-height:none !important;height:auto;overflow:visible;box-shadow:none}#ai-log{overflow:visible;max-height:none !important;height:auto}#agent-log{max-height:none !important;height:auto;overflow:visible !important}}

/* ---------- v63: approved dashboard design ported + homepage hero +
   company pages full width + guide ad rail + ad-ready slots + floating
   buttons stack. All colours from the existing theme vars; dark stays
   full black. ---------- */
/* Company pages: text runs the full content width like tool pages */
main.company p.lead,main.company .tool-head p{max-width:none}
/* Tool pages: content column flanked by reserved ad rails */
.tool-cols{display:flex;gap:18px;align-items:flex-start}
.tool-main{flex:1;min-width:0}
.ad-rail{flex:none;width:300px;position:sticky;top:84px}
@media (max-width:1280px){.ad-rail{display:none}}
/* Guide/article pages: article left, ad rail right */
.article-cols{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:24px;align-items:start}
.article-main{min-width:0}
.article-rail{position:sticky;top:84px}
@media (max-width:1020px){.article-cols{grid-template-columns:1fr}.article-rail{position:static}}
/* Ad slots: standard sizes, space reserved from the start so nothing
   shifts when real ads switch on. Ads OFF (current): the slot is an
   empty reserved area — nothing visible is rendered inside it. */
.ad-slot{margin:14px auto}
.ad-top,.ad-bottom{max-width:970px;height:90px}
.ad-rail-box{width:300px;height:600px;margin:0}
.ad-article-box{width:300px;height:250px;margin:0}
/* Local placement check only: ?showadslots=1 outlines + labels slots */
body.show-ad-slots .ad-slot{outline:2px dashed var(--warn);outline-offset:-2px;position:relative;background:color-mix(in srgb,var(--warn) 8%,transparent)}
body.show-ad-slots .ad-slot::after{content:"Ad slot: " attr(data-ad-slot);position:absolute;top:6px;left:8px;font-size:12px;font-weight:700;color:var(--warn)}
/* ---------- v82: tool pages full width, content on the left (owner) ----------
   The v63 rails reserved 300px on BOTH sides of every tool page for
   future ads; while ads are off they were invisible empty margins that
   squeezed the working area (form, results, wide tables) into a narrow
   centred column — the owner's screenshot of the whole-site results.
   Now, while ads are off and no placement check is running, the rails
   take no space at all: .tool-main (already flex:1) starts right after
   the sidebar with .wrap's normal margin and uses the FULL width of
   the content area. The reserved rail rules above are untouched and
   return exactly as before the moment real ads switch on (body.ads-on,
   set by initAds when the central ADS config is enabled) or during the
   ?showadslots=1 placement check (body.show-ad-slots). Guide/article
   pages keep their own .article-cols rail layout; the homepage and
   dashboard never used .tool-cols and are not affected. No widths are
   added here, so nothing can overflow horizontally at any size. */
body:not(.ads-on):not(.show-ad-slots) .tool-cols .ad-rail{display:none}
@media print{.ad-slot,.ad-rail,.article-rail{display:none !important}}
/* Floating chat button (v92: the back-to-top arrow is REMOVED — its
   rules are gone with its element): footer off screen the button
   sits LOW at the corner (bottom 24px); footer on screen it docks
   ON the footer's top edge, its bottom edge resting 2px above that
   edge (v85 ITEM 4 flush rule — v84's 12px air left it hanging
   visibly above the footer in the owner's live screenshot), the
   panel's bottom following the button (+ 68px) and its height
   capped against the viewport top (no header bar since v92). The
   bottoms below are the base / no-JS fallback values; app.js sets
   the live values inline via floatStack. */
#ai-fab{bottom:24px}
#ai-panel{bottom:92px}
/* v81: reduced motion — the chat widget and the bubbles stop
   animating entirely for users who opted out. */
@media (prefers-reduced-motion: reduce){#ai-panel,#ai-fab,.ai-msg{transition:none;animation:none}}
/* v81: the content watchdog's note — fixed and body-level, so it stays
   visible even if the page's main area is the thing that went missing. */
#fst-watchdog-note{position:fixed;left:50%;transform:translateX(-50%);bottom:18px;z-index:80;width:min(560px,92vw);margin:0}
/* Homepage hero: brand wordmark + tagline, categorized tools + search */
.hero-brand{display:flex;justify-content:center;margin-bottom:12px}
.brand-xl .brand-top{font-size:46px}
.brand-xl .brand-graph{width:27px;height:27px;margin-left:4px}
.brand-xl .brand-sub{font-size:15px}
.hero p.hero-tagline{font-size:20px;font-weight:600;color:var(--ink);margin-bottom:6px}
.home-search{max-width:520px;margin:2px 0 4px}
.home-search input{width:100%;padding:12px 14px;font-size:16px;border:1.5px solid var(--line);border-radius:10px;background:var(--card);color:var(--ink)}
.home-cat-head{font-size:19px;margin:24px 0 0}
.home-cat .grid{margin:14px 0 8px}
/* Dashboard — preview arrangement */
.dash-eyebrow{font-size:12px;font-weight:700;letter-spacing:.14em;color:var(--muted);text-transform:uppercase}
.dash-site-row{display:flex;justify-content:space-between;align-items:flex-end;gap:12px 18px;flex-wrap:wrap;margin:4px 0 16px}
.dash-site-name{font-size:30px;margin:3px 0 0;letter-spacing:-.01em;word-break:break-all}
.dash-card{background:var(--glass);border:1px solid var(--glass-brd);border-radius:14px;padding:20px;box-shadow:var(--glass-shadow)}
.dash-score-label{font-size:12px;font-weight:700;letter-spacing:.08em;color:var(--muted);text-transform:uppercase}
.score-trio{display:grid;grid-template-columns:1fr 1.15fr 1fr;gap:16px;margin:0 0 16px}
.dash-big{font-size:44px;font-weight:800;line-height:1.1}
.dash-big span{font-size:16px;color:var(--muted);font-weight:600}
.score-bar{height:10px;border-radius:99px;background:var(--line);overflow:hidden;margin:12px 0 6px}
.score-bar i{display:block;height:100%;background:var(--accent)}
.score-bar.orange i{background:#ea580c}
.dash-delta{font-size:13.5px;font-weight:600;margin:5px 0 0}
.dash-delta.up{color:var(--good)}
.dash-delta.down{color:var(--bad)}
.dash-center{text-align:center}
.dash-ring-wrap{position:relative;width:118px;height:118px;margin:6px auto 8px}
.dash-ring{transform:rotate(-90deg);display:block}
.dash-ring .ring-track{fill:none;stroke:var(--line);stroke-width:10}
.dash-ring .ring-arc{fill:none;stroke-width:10;stroke-linecap:round}
.dash-ring-num{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:34px;font-weight:800;line-height:1}
.dash-ring-num span{font-size:11.5px;font-weight:600;color:var(--muted);margin-top:4px}
.dash-stats3{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin:0 0 16px}
.stat-card .sc-top{display:flex;justify-content:space-between;align-items:center;gap:8px}
.est-chip{font-size:10px;font-weight:700;letter-spacing:.06em;border:1px solid var(--line);border-radius:99px;padding:2px 8px;color:var(--muted);background:var(--card);white-space:nowrap}
.sc-value{font-size:32px;font-weight:800;line-height:1.15;margin-top:6px}
.dash-two{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:0 0 4px}
.dash-steps{list-style:none;margin:4px 0;padding:0}
.dash-steps li{display:flex;gap:12px;padding:12px 0;border-bottom:1px solid var(--line)}
.dash-steps li:last-child{border-bottom:0;padding-bottom:2px}
.step-num{width:28px;height:28px;flex:none;border-radius:50%;background:var(--accent);color:#fff;font-weight:700;display:flex;align-items:center;justify-content:center;font-size:14px;margin-top:1px}
.step-body{min-width:0}
.use-tag{display:inline-block;margin-top:6px;background:color-mix(in srgb,var(--accent) 12%,transparent);color:var(--accent);border-radius:99px;padding:3px 11px;font-size:12.5px;font-weight:700}
a.use-tag:hover{text-decoration:none;filter:brightness(1.08)}
.dash-cta{background:#ea580c;box-shadow:0 2px 8px rgba(13,27,46,.14)}
.dash-cta:hover{filter:brightness(1.07);box-shadow:0 4px 12px rgba(13,27,46,.18)}
.insights-text{white-space:pre-wrap;font-size:15px;line-height:1.6}
.dash-grouped{margin:28px 0 4px}
.gt-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-top:14px}
.gt-head{display:flex;align-items:center;gap:10px}
.gt-name{font-size:16.5px;font-weight:800}
.gt-count{margin-left:auto;font-size:11.5px;font-weight:700;color:var(--muted);border:1px solid var(--line);border-radius:99px;padding:2px 9px;white-space:nowrap}
.gt-card ul{list-style:none;margin:10px 0 0;padding:0}
.gt-card li{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:5px 0;border-bottom:1px dashed var(--line)}
.gt-card li:last-child{border-bottom:0}
.gt-status{font-size:11px;font-weight:700;letter-spacing:.04em;white-space:nowrap}
.st-free{color:var(--good)}
.st-key,.st-real{color:var(--muted)}
.gt-more{color:var(--muted);font-size:13.5px}
@media (max-width:1100px){.gt-grid{grid-template-columns:1fr 1fr}}
@media (max-width:900px){.score-trio,.dash-stats3,.dash-two{grid-template-columns:1fr}.gt-grid{grid-template-columns:1fr}}
/* Signed-out gate (preview shape) */
.dash-gate{text-align:center;padding:42px 22px;max-width:680px;margin:24px auto}
.gate-lock{font-size:34px;line-height:1}
.gate-ticks{list-style:none;padding:0;margin:20px auto 8px;max-width:430px;text-align:left}
.gate-ticks li{padding:4px 0;color:var(--muted)}
.gate-ticks b{color:var(--good);font-weight:700}
/* Search Console panel — native Performance-report style tabs + tables */
.gsc-tabs{display:flex;gap:2px;border-bottom:2px solid var(--line);margin:18px 0 6px;flex-wrap:wrap}
.gsc-tab{border:0;background:transparent;color:var(--muted);font:inherit;font-size:14.5px;font-weight:600;padding:9px 14px;cursor:pointer;border-bottom:2.5px solid transparent;margin-bottom:-2px}
.gsc-tab:hover{color:var(--ink)}
.gsc-tab.active{color:var(--accent);border-bottom-color:var(--accent)}
table.list th.num,table.list td.num{text-align:right}
table.rep td,table.rep th{word-break:normal}
table.rep td:first-child{word-break:break-all}
/* GA4-style summary cards row */
.ga-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin:0 0 14px}
/* v66: CrUX field-data distribution bars (Speed Checker full report) */
.crux-dist{display:flex;height:10px;border-radius:99px;overflow:hidden;background:var(--line);margin:6px 0 3px}
.crux-dist i{display:block;height:100%}
.crux-dist .cd-good{background:var(--good)}
.crux-dist .cd-mid{background:var(--warn)}
.crux-dist .cd-poor{background:var(--bad)}
.crux-legend{font-size:12.5px;color:var(--muted)}

/* ---------- v85: everything LEFT + full width, theme-true footer,
   dark goes black, compact footer (owner, three orders) ----------
   ITEM 3 — "saray pages ko left kr, center me kuch na rkh": the v82
   treatment (tool pages) extended to every page type. The shells were
   already main.wrap (full width since v37); what remained centred was
   inside them: the homepage hero (centred text, auto-margin tagline
   and audit box, centred brand row), the dashboard's signed-out gate
   (a 680px auto-margin column) and the guide pages' reserved 300px
   article rail, which kept its grid column even while ads are off.
   All of it now sits LEFT and uses the full content width. Placement
   and width only — no copy, no colours, no sidebar changes. */
.hero{text-align:left}
.hero p{margin:0 0 24px;max-width:none}
.hero-brand{justify-content:flex-start}
.audit-box{margin:0;max-width:none;justify-content:flex-start}
.dash-gate{text-align:left;max-width:none;margin:24px 0}
.gate-ticks{margin-left:0;margin-right:0}
/* Guides: while ads are off (or no placement check is running) the
   article rail takes no space at all — the article starts at the left
   and uses the FULL width, exactly like .tool-main since v82. The
   reserved two-column layout returns untouched when real ads switch
   on (body.ads-on) or during the ?showadslots=1 placement check. */
body:not(.ads-on):not(.show-ad-slots) .article-cols{grid-template-columns:minmax(0,1fr)}
body:not(.ads-on):not(.show-ad-slots) .article-rail{display:none}
/* ITEM 5a — the footer FOLLOWS THE THEME (it was navy #0d1b2e in both
   modes): light mode gets a light footer from the light surface
   family with dark text; dark mode gets a dark footer from the dark
   surface family. Same content, links and layout; only the colours
   adapt, through the shared theme variables — no per-page hacks. */
footer.site{background:var(--card);color:var(--muted)}
footer.site a{color:var(--accent)}
.foot-tag{color:var(--muted)}
html[data-theme="dark"] footer.site a{color:#60a5fa}
/* ITEM 5b — dark theme: blue/navy OUT of the backgrounds, black in.
   The page background was already #000; the surfaces still carried a
   navy cast (--glass rgba(13,20,34), the chat panel rgba(8,14,26))
   and the decorative page glows were blue/purple. All neutral
   near-black / black-grey now. The brand accent on buttons, links
   and active states is NOT a background tint and stays untouched. */
html[data-theme="dark"]{--glass:rgba(20,20,22,.85)}
html[data-theme="dark"] #ai-panel{background:rgba(10,10,12,.94)}
html[data-theme="dark"] body::before{background:
  radial-gradient(560px 380px at 12% 8%,rgba(255,255,255,.05),transparent 65%),
  radial-gradient(620px 420px at 88% 18%,rgba(255,255,255,.04),transparent 65%),
  radial-gradient(700px 500px at 55% 105%,rgba(255,255,255,.03),transparent 65%)}
/* ITEM 6 — compact footer: the old stack (footer padding 22 + wrap
   padding 22 top AND bottom) left a tall empty band under the bottom
   line. The footer now hugs its content: wordmark + motto block,
   then the bottom line, with the air below it cut to a breath. */
footer.site{padding:0}
footer.site .wrap{padding-top:16px;padding-bottom:10px}
.foot-bottom{margin-top:12px}

/* ---------- v88: footer links are NOT blue (owner) ----------
   The v85 theme-true footer pointed its links at the accent
   (var(--accent) on light, #60a5fa on dark), so the company links
   rendered blue in both themes — the owner's live screenshot:
   "footer link k blue kiu krdie?" The links now take the footer's
   own text colour family: var(--muted), exactly like the footer
   text around them, in BOTH themes. Hover/focus may step up to
   the full text colour (var(--ink)) with the underline — still no
   blue. The wordmark is an <a> too, so it is pinned explicitly to
   the theme text colour (var(--ink)) like the header's — in dark
   it needs its own scoped rule, because the dark link rule above
   (html + attribute + .site + two elements) outranks a plain
   footer.site .brand rule. Its small rising-graph arrow keeps
   the brand accent via --graph (it is the logo, same as the
   header) — untouched below. Background, compact height,
   content and layout are exactly as v85 left them; these rules
   win purely by sitting after the v85 ones. */
footer.site a{color:var(--muted)}
footer.site a:hover,footer.site a:focus-visible{color:var(--ink);text-decoration:underline}
html[data-theme="dark"] footer.site a{color:var(--muted)}
html[data-theme="dark"] footer.site a:hover,html[data-theme="dark"] footer.site a:focus-visible{color:var(--ink)}
footer.site .brand{color:var(--ink)}
html[data-theme="dark"] footer.site .brand{color:var(--ink)}
/* ---------- v92: no header bar — account controls in the content's top-right ---------- */
/* The old site header bar is gone: no background, no border, no strip,
   and its brand logo went with it (the hero and the footer keep
   theirs). The account cluster (name chip / sign-in button + the
   settings gear and its dropdown) sits where the owner marked it:
   at the top-right INSIDE the main content area — on the homepage
   the hero band's right side — positioned absolute against the page
   (right offset = the main column's own side padding, so it aligns
   with the content's right edge) and scrolling away with the
   content; it is NOT a fixed overlay and NOT at the viewport's top
   edge. Its z-index 70 is the bar's old layer: above the chat layer
   (60), below the mobile drawer (80) and its scrim (75), so the
   gear menu opens above the content and the chat, under the
   drawer, exactly as it did inside the bar. The top offset
   (44px in v92; 41px since v94, which also cut the hero's top
   padding to 28px) centres the cluster on the hero logo's line —
   centre 60px = 28 + half the 64px brand-xl, the cluster being
   38px tall (the gear) — and keeps it clear of every other page's
   first heading. */
.acct-corner{position:absolute;top:32px;right:40px;z-index:70;display:flex;align-items:center;gap:14px}
.acct-corner .hdr-auth{margin-left:0}
@media (max-width:900px){.acct-corner{top:32px;right:16px}}
/* Very narrow screens (phones): the cluster no longer fits BESIDE
   the hero brand / first heading — the sign-in button + gear are
   ~250px on their own — so it takes its own slim transparent row
   at the top of the content instead (no bar styling: no background,
   no border), right-aligned, clear of everything by construction. */
@media (max-width:640px){.acct-corner{position:static;justify-content:flex-end;padding:10px 16px 0}}
/* Narrow screens: the ☰ button that lived in the bar now floats at
   the top-left corner and opens the same sidebar drawer. It stays
   display:none at desktop widths (base rule with the sidebar
   section), where the sidebar is always visible. */
@media (max-width:900px){#tb-toggle{position:fixed;top:10px;left:10px;z-index:70}}
/* v92 (owner: "dono sides se jaga chorri kiu hui hai"): the footer's
   wrap kept the standard 40px side padding, so its edge items sat
   inset from both sides. The footer wrap now runs to the footer's
   own edges with only a small 18px edge padding, in both themes,
   at desktop and mobile widths — the brand block sits at the left
   edge and the links row ends at the right edge. Nothing else
   about the footer changes. */
footer.site .wrap{padding-left:18px;padding-right:18px}

/* ---------- v94: sidebar brand, dead top space removed, account corner level with the hero logo ---------- */
/* Three owner corrections on the live v93 build:
   (1) The sidebar still carried its header-era 78px top padding and
   opened straight at the Dashboard button, so its top was an empty
   stretch with no logo. The sidebar's top padding is now 16px (the
   base rule above) and the shared brand mark is its first element,
   above Dashboard (app.js layout()). The rules here keep the mark a
   stacked wordmark inside the sidebar: the sidebar's block-link
   styling (display:block, hover tint, active paint) must not reach
   it — it is also excluded from the active-link loop in app.js, so
   the homepage never paints it as the "current" tool.
   (2) The header's clearance outlived the header: the hero kept a
   74px top padding and every tool/guide page opened with the
   reserved 90px top ad band. The hero's top padding is now 28px
   (base rule + the <=900px block above), and the top ad band takes
   NO space while ads are off — the v82 rails precedent: the
   reserved .ad-top rule itself is untouched and the band returns
   exactly as before the moment real ads switch on (body.ads-on) or
   during the ?showadslots=1 placement check (body.show-ad-slots).
   First content now starts near the top on every page type.
   (3) The account corner was not level with the hero logo. Since
   v97 the hero brand is ONE line of 46px text (line-height 1), so
   its centre is 28 (hero top padding) + 23 (half of 46px) = 51px,
   and the 38px-tall cluster at top:32px is centred at 32 + 19 =
   51px — the same line. (Before v97 the two-line 64px brand put
   the centre at 60px and the cluster at top:41px.) */
#tools-bar .tb-brand{display:inline-flex;padding:6px 10px 14px}
#tools-bar a.tb-brand:hover{background:transparent;color:var(--ink)}
html[data-theme="dark"] #tools-bar a.tb-brand:hover{color:#fff}
body:not(.ads-on):not(.show-ad-slots) .ad-top{display:none}
