:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #111827;
  --muted: #667085;
  --line: #e5e7eb;
  --brand: #111827;
  --accent: #f16222;
  --good: #067647;
  --warn: #b54708;
  --bad: #b42318;
  --info: #175cd3;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: radial-gradient(circle at top left, #fff7ed, transparent 30%), var(--bg);
  color: var(--text);
}
.layout { max-width: 1180px; margin: 0 auto; padding: 36px 18px 80px; }
.hero { display: grid; grid-template-columns: 1fr 330px; gap: 24px; align-items: end; margin-bottom: 24px; }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 12px; }
h1 { font-size: clamp(32px, 5vw, 58px); line-height: 1; margin: 0 0 16px; max-width: 850px; }
.lead { color: var(--muted); max-width: 780px; font-size: 18px; line-height: 1.5; margin: 0; }
.note { background: #111827; color: #fff; border-radius: 22px; padding: 22px; line-height: 1.45; box-shadow: 0 20px 50px rgba(17,24,39,.18); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 12px 35px rgba(17,24,39,.08); padding: 24px; margin: 18px 0; }
.form-card form { display: grid; gap: 16px; }
label { display: grid; gap: 7px; font-weight: 700; font-size: 14px; color: #344054; }
input, select { width: 100%; padding: 14px 15px; border: 1px solid #d0d5dd; border-radius: 14px; font-size: 16px; background: #fff; color: var(--text); }
input:focus, select:focus { outline: 2px solid rgba(241,98,34,.25); border-color: var(--accent); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
button { border: 0; border-radius: 16px; background: var(--accent); color: #fff; padding: 15px 22px; font-weight: 800; font-size: 16px; cursor: pointer; transition: transform .15s, box-shadow .15s; }
button:hover { transform: translateY(-1px); box-shadow: 0 12px 25px rgba(241,98,34,.28); }
.hidden { display: none !important; }
.loader { width: 34px; height: 34px; border: 4px solid #fed7aa; border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#loading { display: flex; align-items: center; gap: 16px; color: var(--muted); }
.summary { display: grid; grid-template-columns: 260px 1fr; gap: 20px; }
.score-card { border-radius: 24px; padding: 24px; background: #111827; color: #fff; display: grid; align-content: center; text-align: center; min-height: 240px; }
.score { font-size: 72px; font-weight: 900; line-height: 1; }
.score small { font-size: 24px; color: #d0d5dd; }
.status { margin-top: 10px; font-weight: 800; }
.meta-list { display: grid; gap: 10px; }
.meta-row { display: grid; grid-template-columns: 140px 1fr; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.meta-row span:first-child { color: var(--muted); }
.columns { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.list { margin: 0; padding-left: 20px; line-height: 1.55; }
.block { border: 1px solid var(--line); border-radius: 18px; padding: 18px; margin: 14px 0; background: #fff; }
.block-head { display: flex; justify-content: space-between; gap: 14px; align-items: center; margin-bottom: 12px; }
.block h3 { margin: 0; }
.badge { display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.badge.good, .badge.pass { background: #dcfae6; color: var(--good); }
.badge.medium, .badge.warn { background: #fef0c7; color: var(--warn); }
.badge.weak, .badge.fail, .badge.low { background: #fee4e2; color: var(--bad); }
.badge.high { background: #dcfae6; color: var(--good); }
.badge.info { background: #d1e9ff; color: var(--info); }
.check { display: grid; grid-template-columns: 92px 1fr 90px; gap: 12px; align-items: start; padding: 12px 0; border-top: 1px solid var(--line); }
.check-title { font-weight: 800; }
.check-comment { color: var(--muted); font-size: 14px; margin-top: 4px; line-height: 1.45; }
.rec { border-left: 5px solid var(--accent); padding: 14px 16px; background: #fff7ed; border-radius: 14px; margin: 12px 0; }
.rec h4 { margin: 0 0 7px; }
.rec p { margin: 0 0 7px; color: #344054; line-height: 1.5; }
.code { background: #f2f4f7; padding: 10px 12px; border-radius: 10px; font-family: Consolas, monospace; overflow: auto; }
.error { border-left: 5px solid var(--bad); background: #fff1f3; }
.download-row { display:flex; gap:10px; flex-wrap:wrap; margin-top: 14px; }
.secondary { background: #111827; }
@media (max-width: 850px) {
  .hero, .summary, .columns, .grid-3 { grid-template-columns: 1fr; }
  .check { grid-template-columns: 1fr; }
  .meta-row { grid-template-columns: 1fr; }
}
.history-item {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
  cursor: pointer;
}
.history-item:hover { opacity: .82; }
.history-item small {
  display: block;
  margin-top: 4px;
  color: #64748b;
  word-break: break-all;
}
code {
  background: rgba(15, 23, 42, .06);
  padding: 2px 6px;
  border-radius: 6px;
}
.extra-checks {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  background: #fff7ed;
}
.extra-checks summary {
  cursor: pointer;
  font-weight: 900;
  color: #111827;
  margin-bottom: 12px;
}
.checks-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.check-toggle {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  background: #fff;
  border: 1px solid rgba(241, 98, 34, .18);
  border-radius: 14px;
  padding: 10px;
}
.check-toggle input {
  width: auto;
  margin-top: 2px;
  accent-color: var(--accent);
}
.check-toggle span {
  display: block;
  font-weight: 500;
  color: var(--muted);
  margin-top: 2px;
}
.check-toggle.optional { grid-column: span 2; }
@media (max-width: 850px) {
  .checks-grid { grid-template-columns: 1fr; }
  .check-toggle.optional { grid-column: span 1; }
}
.field-hint {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

/* v08 landing + auth + UTM */
body.landing-page {
  background:
    radial-gradient(circle at 5% 0%, rgba(241,98,34,.18), transparent 28%),
    radial-gradient(circle at 90% 10%, rgba(23,92,211,.12), transparent 30%),
    #f6f7fb;
}
.site-header-shell {
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  backdrop-filter: blur(14px);
  background: rgba(246, 247, 251, .82);
  border-bottom: 1px solid rgba(17,24,39,.06);
}
.site-header {
  max-width: 1560px;
  margin: 0 auto;
  padding: 18px clamp(18px, 2.2vw, 34px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand-mark { width: 40px; height: 40px; border-radius: 14px; background: #111827; color: #fff; display: grid; place-items: center; font-weight: 900; box-shadow: 0 12px 25px rgba(17,24,39,.18); }
.brand small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.top-nav { display: flex; align-items: center; gap: 20px; }
.top-nav a, .secondary-link { color: #344054; text-decoration: none; font-weight: 800; }

.nav-dropdown { position: relative; }
.dropdown-toggle {
  appearance: none;
  border: 0;
  background: transparent;
  color: #344054;
  text-decoration: none;
  font-weight: 800;
  font-size: 16px;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 0;
}
.dropdown-toggle::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transition: transform .2s ease;
}
.dropdown-menu {
  position: absolute;
  top: calc(100% + 16px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 340px;
  background: rgba(255,255,255,.98);
  border: 1px solid rgba(17,24,39,.08);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(17,24,39,.14);
  padding: 10px;
  display: none;
  z-index: 70;
}
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu { display: block; }
.nav-dropdown:hover .dropdown-toggle::after,
.nav-dropdown:focus-within .dropdown-toggle::after { transform: rotate(225deg) translateY(-1px); }
.dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  color: #111827;
  text-decoration: none;
}
.dropdown-item:hover { background: #f8fafc; }
.dropdown-item > span { display: grid; gap: 4px; }
.dropdown-item strong { font-size: 14px; line-height: 1.2; }
.dropdown-item small { color: #667085; font-weight: 600; line-height: 1.35; }
.dropdown-item em {
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
  color: #c2410c;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  padding: 6px 8px;
  white-space: nowrap;
}
.dropdown-item.soon { opacity: .86; cursor: default; }
.dropdown-item.active,
.top-nav a.active,
.dropdown-toggle.active { color: var(--accent); }
.header-actions { display: flex; gap: 10px; align-items: center; }
.ghost-btn { background: transparent; border: 1px solid #d0d5dd; color: #111827; box-shadow: none; }
.ghost-btn:hover { box-shadow: none; background: #fff; }
.small-btn { padding: 11px 16px; border-radius: 12px; font-size: 14px; }
.landing-hero { max-width: 1220px; margin: 0 auto; padding: 62px 18px 40px; display: grid; grid-template-columns: 1.02fr .78fr; gap: 34px; align-items: center; }
.hero-copy h1 { font-size: clamp(40px, 5.7vw, 76px); letter-spacing: -.05em; max-width: 780px; }
.hero-actions { display: flex; align-items: center; gap: 18px; margin-top: 26px; flex-wrap: wrap; }
.trust-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; color: #344054; }
.trust-row span { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; font-weight: 800; font-size: 13px; }
.product-preview { background: #111827; color: #fff; border-radius: 30px; padding: 22px; box-shadow: 0 35px 80px rgba(17,24,39,.28); transform: rotate(1.5deg); }
.preview-top { display:flex; gap:7px; margin-bottom: 18px; }
.preview-top span { width: 11px; height: 11px; border-radius: 50%; background: rgba(255,255,255,.32); }
.preview-score { display:grid; grid-template-columns: 1fr 150px; gap: 18px; align-items:end; padding: 18px; background: rgba(255,255,255,.08); border-radius: 22px; }
.preview-score small { color: #cbd5e1; display:block; margin-bottom: 6px; }
.preview-score strong { font-size: 46px; letter-spacing: -.04em; }
.mini-chart { display:flex; align-items:end; gap:8px; height: 92px; }
.mini-chart i { flex:1; background: linear-gradient(#fb923c, #fed7aa); border-radius: 8px 8px 0 0; }
.preview-list { margin-top: 16px; display: grid; gap: 10px; }
.preview-list p { margin:0; background:#fff; color:#111827; border-radius: 14px; padding: 12px; font-weight: 700; }
.preview-list b { color: var(--bad); margin-right: 8px; }
.preview-list .warn-word { color: var(--warn); }
.preview-list .pass-word { color: var(--good); }
.metrics-strip { max-width: 1220px; margin: 0 auto 42px; padding: 0 18px; display:grid; grid-template-columns: repeat(4,1fr); gap: 12px; }
.metrics-strip div { background:#fff; border:1px solid var(--line); border-radius:22px; padding:18px; box-shadow: 0 12px 35px rgba(17,24,39,.06); }
.metrics-strip strong { display:block; font-size: 34px; letter-spacing:-.04em; }
.metrics-strip span { color: var(--muted); font-weight:700; }
.landing-section { max-width: 1220px; margin: 0 auto 48px; padding: 0 18px; }
.section-head { max-width: 820px; margin-bottom: 22px; }
.section-head h2, .landing-section h2 { font-size: clamp(30px, 4vw, 48px); letter-spacing:-.04em; margin: 0 0 12px; }
.section-head p, .landing-section p { color: var(--muted); line-height: 1.55; }
.feature-grid { display:grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.feature-grid article, .audience-grid div, .pricing-card, .utm-card { background:#fff; border:1px solid var(--line); border-radius:24px; padding:22px; box-shadow: 0 12px 35px rgba(17,24,39,.07); }
.feature-grid article span { display:inline-flex; width:36px; height:36px; border-radius:12px; background:#fff7ed; color:var(--accent); align-items:center; justify-content:center; font-weight:900; }
.feature-grid h3, .audience-grid h3 { margin: 16px 0 8px; }
.split-section { display:grid; grid-template-columns: .8fr 1fr; gap: 26px; align-items:start; }
.clean-list { margin: 18px 0 0; padding-left: 20px; color:#344054; line-height:1.7; }
.utm-card form { display:grid; gap: 14px; }
.grid-2 { display:grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
.utm-result { margin-top: 16px; display:grid; gap: 8px; }
.utm-result textarea { min-height: 96px; resize: vertical; width:100%; border:1px solid #d0d5dd; border-radius:14px; padding:12px; font-family: Consolas, monospace; }
.error-text { color: var(--bad) !important; font-weight: 800; }
.audience-grid { display:grid; grid-template-columns: repeat(4,1fr); gap: 14px; }
.pricing-section { display:grid; grid-template-columns: 1fr 320px; gap: 22px; align-items:center; background:#111827; color:#fff; border-radius: 30px; padding: 32px; }
.pricing-section p { color:#cbd5e1; }
.pricing-card { color:#111827; }
.pricing-card strong { display:block; font-size: 42px; margin: 10px 0; }
.landing-footer { max-width:1220px; margin: 0 auto; padding: 24px 18px 40px; display:flex; align-items:center; justify-content:space-between; gap: 14px; color:#667085; }
.modal { position: fixed; inset: 0; background: rgba(17,24,39,.62); display:grid; place-items:center; z-index: 100; padding:18px; }
.modal-card { width: min(470px, 100%); background:#fff; border-radius:28px; padding:22px; box-shadow: 0 30px 90px rgba(0,0,0,.35); position:relative; }
.modal-close { position:absolute; right:14px; top:12px; width:36px; height:36px; padding:0; border-radius:50%; background:#f2f4f7; color:#111827; }
.auth-tabs { display:flex; gap:8px; background:#f2f4f7; padding:6px; border-radius:16px; margin-bottom:18px; }
.auth-tabs .tab { flex:1; background:transparent; color:#344054; box-shadow:none; padding:11px; border-radius:12px; }
.auth-tabs .tab.active { background:#111827; color:#fff; }
.auth-form { display:grid; gap: 14px; }
.auth-form h2 { margin: 0; }
.auth-note { color: var(--muted); font-size:13px; line-height:1.45; }
.auth-message { margin-top:14px; border-radius:14px; padding:12px; background:#d1e9ff; color:#175cd3; font-weight:800; }
.auth-message.error { background:#fee4e2; color:#b42318; }
.app-page { display:flex; align-items:flex-start; }
.app-sidebar { position: sticky; top: 0; width: 250px; min-height: 100vh; background:#111827; color:#fff; padding:18px; display:flex; flex-direction:column; gap:20px; }
.app-sidebar .brand { color:#fff; }
.app-sidebar .brand-mark { background:#f16222; }
.app-sidebar .brand small { color:#cbd5e1; }
.side-nav { display:grid; gap:8px; }
.side-nav a { color:#d0d5dd; text-decoration:none; padding:12px; border-radius:14px; font-weight:800; }
.side-nav a.active, .side-nav a:hover { background:rgba(255,255,255,.1); color:#fff; }
.side-nav a.soon { opacity:.6; }
.ghost-btn.full { width:100%; margin-top:auto; color:#fff; border-color:rgba(255,255,255,.25); }
.app-layout { margin: 0 auto; }
@media (max-width: 960px) {
  .site-header { flex-wrap: wrap; }
  .top-nav { flex-wrap: wrap; }
  .landing-hero, .split-section, .pricing-section { grid-template-columns: 1fr; }
  .feature-grid, .metrics-strip, .audience-grid { grid-template-columns: 1fr 1fr; }
  .app-page { display:block; }
  .app-sidebar { position: static; width: 100%; min-height:auto; }
  .side-nav { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 620px) {
  .feature-grid, .metrics-strip, .audience-grid, .grid-2 { grid-template-columns: 1fr; }
  .landing-footer { flex-direction: column; align-items:flex-start; }
  .hero-copy h1 { font-size: 40px; }
  .top-nav { display:none; }
}

/* v09 URL comparison */
.section-title-row { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:18px; }
.section-title-row h2 { margin:0 0 6px; }
.pill { display:inline-flex; align-items:center; border-radius:999px; padding:8px 12px; background:#fff7ed; color:#c2410c; font-weight:900; font-size:12px; border:1px solid #fed7aa; white-space:nowrap; }
.compare-loading { margin-top:18px; border-top:1px solid var(--line); padding-top:18px; display:flex; gap:12px; align-items:center; }
.compare-result { margin-top:22px; display:grid; gap:22px; }
.compare-summary-grid { display:grid; grid-template-columns: repeat(3,1fr); gap:12px; }
.mini-score { border:1px solid var(--line); border-radius:22px; padding:18px; background:#fff; box-shadow:0 10px 25px rgba(17,24,39,.06); }
.mini-score span, .mini-score small { display:block; color:var(--muted); font-weight:800; }
.mini-score strong { display:block; font-size:42px; letter-spacing:-.05em; margin:8px 0; color:#111827; }
.mini-score.competitor { background:#111827; color:#fff; border-color:#111827; }
.mini-score.competitor strong { color:#fff; }
.mini-score.competitor span, .mini-score.competitor small { color:#cbd5e1; }
.mini-score.gap { background:#fff7ed; border-color:#fed7aa; }
.compare-note { border-radius:18px; background:#f8fafc; color:#475467; padding:14px 16px; line-height:1.45; border:1px solid var(--line); }
.table-wrap { overflow:auto; border:1px solid var(--line); border-radius:18px; background:#fff; }
.compare-table { width:100%; border-collapse:collapse; min-width:720px; }
.compare-table th, .compare-table td { padding:12px 14px; border-bottom:1px solid var(--line); text-align:left; vertical-align:top; font-size:14px; }
.compare-table th { background:#f8fafc; font-weight:900; color:#344054; }
.compare-table tr:last-child td { border-bottom:0; }
.gap-card { border:1px solid var(--line); border-radius:18px; padding:16px; display:grid; gap:12px; background:#fff; }
.gap-card p { margin:6px 0 0; color:var(--muted); }
.mini-check { background:#f8fafc; border:1px solid var(--line); border-radius:14px; padding:12px; color:#344054; }
.mini-check small { color:#667085; }
.compare-rec .code { margin-top:10px; }
@media (max-width: 760px) { .compare-summary-grid { grid-template-columns:1fr; } .section-title-row { display:block; } }

/* v10 separate tools pages */
.app-utm-card { max-width: 920px; }
.small-feature-grid { grid-template-columns: repeat(3, 1fr); }
.side-nav a[href="/app/compare"].active, .side-nav a[href="/app/utm"].active { background: rgba(255,255,255,.1); color:#fff; }
@media (max-width: 850px) { .small-feature-grid { grid-template-columns: 1fr; } }

/* v13 advanced UTM generator */
.compact-hero { padding-top: 22px; padding-bottom: 18px; }
.utm-pro-form h2 { font-size: 20px; margin: 0; }
.utm-pro-form .section-title-row p { margin: 0; color: var(--muted); }
.utm-pro-form small { display:block; margin-top: 4px; color: var(--muted); font-weight: 700; }
.utm-preset-help { border:1px solid #fed7aa; background:#fff7ed; border-radius:18px; padding:14px 16px; color:#7c2d12; }
.utm-preset-help p { margin: 6px 0 0; color:#9a3412; line-height:1.45; }
.utm-details { border:1px solid var(--line); border-radius:18px; padding:14px 16px; background:#fff; }
.utm-details summary { cursor:pointer; font-weight:900; color:#111827; }
.macro-panel { display:grid; grid-template-columns: repeat(3,1fr); gap:14px; margin-top:14px; }
.macro-panel h3 { margin: 0 0 8px; font-size:15px; }
.macro-chips { display:flex; flex-wrap:wrap; gap:8px; }
.macro-chip { background:#f2f4f7; color:#344054; border:1px solid #e4e7ec; box-shadow:none; border-radius:999px; padding:7px 10px; font-size:12px; font-weight:900; }
.macro-chip:hover { background:#111827; color:#fff; }
.hint { color:var(--muted); font-size:13px; line-height:1.45; margin:12px 0 0; }
.hint code, .utm-details code { background:#f2f4f7; border-radius:8px; padding:2px 6px; }
.utm-options { display:grid; gap:10px; align-content:start; }
.check-row { display:flex; align-items:center; gap:10px; background:#f8fafc; border:1px solid var(--line); border-radius:14px; padding:10px 12px; font-weight:800; }
.check-row input { width:auto; }
.utm-quality { background:#f8fafc; border:1px solid var(--line); border-radius:18px; padding:14px 16px; }
.utm-quality h3 { margin: 0 0 10px; }
.utm-quality ul { list-style:none; padding:0; margin:0; display:grid; gap:8px; }
.utm-issue { border-radius:12px; padding:10px 12px; }
.utm-issue.pass { background:#dcfae6; color:#067647; }
.utm-issue.warn { background:#fffaeb; color:#b54708; }
.utm-issue.fail { background:#fee4e2; color:#b42318; }
.utm-issue.info { background:#d1e9ff; color:#175cd3; }
.mini-table { width:100%; border-collapse:collapse; }
.mini-table th, .mini-table td { padding:10px 12px; border-bottom:1px solid var(--line); text-align:left; vertical-align:top; }
.mini-table tr:last-child td { border-bottom:0; }
.mini-table code { white-space:nowrap; }
.utm-multi-table textarea { min-height:70px; min-width:420px; font-size:12px; }
@media (max-width: 960px) { .macro-panel { grid-template-columns:1fr; } }

/* v16 wide layout polish: wider SaaS landing and dashboard workspace */
:root {
  --landing-wide: 1560px;
  --app-sidebar-w: 260px;
  --app-content-pad: clamp(24px, 3vw, 64px);
}

/* Wider public landing */
.site-header,
.landing-hero,
.metrics-strip,
.landing-section,
.landing-footer {
  max-width: var(--landing-wide);
}
.site-header {
  padding-left: clamp(18px, 3vw, 44px);
  padding-right: clamp(18px, 3vw, 44px);
}
.landing-hero {
  grid-template-columns: minmax(0, 1.04fr) minmax(420px, .96fr);
  gap: clamp(36px, 5vw, 86px);
  padding-left: clamp(18px, 3vw, 44px);
  padding-right: clamp(18px, 3vw, 44px);
}
.hero-copy h1 {
  max-width: 940px;
}
.product-preview {
  width: min(100%, 590px);
  justify-self: end;
}
.metrics-strip,
.landing-section,
.landing-footer {
  padding-left: clamp(18px, 3vw, 44px);
  padding-right: clamp(18px, 3vw, 44px);
}
.feature-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.audience-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.metrics-strip {
  gap: 18px;
}
.pricing-section {
  grid-template-columns: minmax(0, 1fr) 380px;
}

/* Wider app workspace */
.app-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 0%, rgba(241,98,34,.12), transparent 28%),
    linear-gradient(90deg, #111827 0, #111827 var(--app-sidebar-w), #f6f8fc var(--app-sidebar-w), #f6f8fc 100%);
}
.app-sidebar {
  width: var(--app-sidebar-w);
  flex: 0 0 var(--app-sidebar-w);
  padding: 18px 18px 24px;
}
.app-layout {
  width: calc(100vw - var(--app-sidebar-w));
  max-width: none;
  margin: 0;
  padding: 38px var(--app-content-pad) 90px;
}
.app-layout > .hero,
.app-layout > .card,
.app-layout > section:not(.hidden) {
  width: 100%;
}
.app-layout .hero {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: clamp(28px, 4vw, 72px);
  align-items: center;
}
.app-layout h1 {
  max-width: 1060px;
  font-size: clamp(42px, 4.8vw, 72px);
  letter-spacing: -0.05em;
}
.app-layout .lead {
  max-width: 980px;
}
.app-layout .card {
  border-radius: 26px;
}
.app-layout .form-card {
  padding: clamp(24px, 2.2vw, 36px);
}
.app-layout .grid-3 {
  grid-template-columns: minmax(260px, .9fr) minmax(220px, .9fr) minmax(220px, .9fr);
  gap: 18px;
}
.app-layout .checks-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.app-layout .check-toggle.optional {
  grid-column: span 2;
}
.compare-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.summary {
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
}
.columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.check {
  grid-template-columns: 110px minmax(0, 1fr) 100px;
}

@media (min-width: 1600px) {
  :root { --landing-wide: 1680px; }
  .app-layout .checks-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 1180px) {
  .landing-hero { grid-template-columns: 1fr; }
  .product-preview { justify-self: start; width: min(100%, 720px); }
  .app-layout .checks-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-layout .grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
  .app-page {
    display: block;
    background: #f6f8fc;
  }
  .app-sidebar {
    width: 100%;
    min-height: auto;
    position: static;
  }
  .app-layout {
    width: 100%;
    padding: 28px 18px 70px;
  }
  .app-layout .hero,
  .summary,
  .columns,
  .compare-summary-grid {
    grid-template-columns: 1fr;
  }
  .app-layout h1 { font-size: clamp(34px, 8vw, 52px); }
}

@media (max-width: 620px) {
  .app-layout .checks-grid { grid-template-columns: 1fr; }
  .app-layout .check-toggle.optional { grid-column: span 1; }
}

/* v18 CMS/admin panel */
.admin-link {
  display: block;
  color: #fff;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 14px;
  padding: 12px;
  text-decoration: none;
  font-weight: 900;
  text-align: center;
  margin-top: auto;
}
.admin-link + .ghost-btn.full { margin-top: 8px; }
.admin-layout textarea {
  width: 100%;
  border: 1px solid #d0d5dd;
  border-radius: 14px;
  padding: 14px 15px;
  font-size: 14px;
  font-family: Consolas, Monaco, monospace;
  min-height: 90px;
  resize: vertical;
}
.admin-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.admin-tab {
  background: #fff;
  color: #111827;
  border: 1px solid #d0d5dd;
  box-shadow: none;
  padding: 12px 16px;
  border-radius: 14px;
}
.admin-tab.active {
  background: #111827;
  color: #fff;
  border-color: #111827;
}
.admin-panel {
  margin-top: 18px;
}
.admin-warning {
  margin: 14px 0 0;
  color: #b54708;
  background: #fffaeb;
  border: 1px solid #fedf89;
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 800;
}
.admin-users-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}
.admin-user-card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 18px;
  padding: 16px;
  display: grid;
  gap: 12px;
}
.admin-user-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.admin-user-head strong { display: block; }
.admin-user-head small { color: var(--muted); display: block; margin-top: 4px; }
.admin-user-status {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.admin-badge {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
  background: #eef4ff;
  color: #175cd3;
}
.admin-badge.off { background: #fee4e2; color: #b42318; }
.admin-badge.good { background: #dcfae6; color: #067647; }
.admin-user-actions {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr auto;
  gap: 10px;
  align-items: end;
}
.admin-user-actions input[type="checkbox"] { width: auto; }
.admin-check-row, .check-row {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}
.check-row input { width: auto; accent-color: var(--accent); }
.admin-security-grid article { min-height: 160px; }
@media (max-width: 860px) {
  .admin-user-actions { grid-template-columns: 1fr; }
  .admin-user-head { display: grid; }
}

/* v20 mobile responsive fixes for Samsung S23 / Chrome */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}
img, svg, video, iframe {
  max-width: 100%;
}

@media (max-width: 760px) {
  body.landing-page {
    background:
      radial-gradient(circle at 0% 0%, rgba(241,98,34,.16), transparent 34%),
      #f6f7fb;
  }
  .site-header-shell {
    position: sticky;
    top: 0;
  }
  .site-header {
    max-width: none;
    padding: 14px 16px 16px;
    display: grid;
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 14px;
  }
  .brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }
  .brand strong {
    font-size: 18px;
  }
  .brand small {
    font-size: 13px;
  }
  .top-nav {
    display: none !important;
  }
  .header-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .header-actions button,
  .hero-actions button,
  .pricing-card button {
    width: 100%;
    min-height: 54px;
    padding: 14px 14px;
    font-size: 16px;
    border-radius: 16px;
  }
  .landing-hero {
    display: block;
    max-width: none;
    padding: 42px 18px 24px;
    overflow: hidden;
  }
  .hero-copy h1 {
    font-size: clamp(36px, 11vw, 48px);
    line-height: 1.04;
    letter-spacing: -0.055em;
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: normal;
  }
  .lead {
    font-size: 18px;
    line-height: 1.48;
    max-width: 100%;
  }
  .eyebrow {
    font-size: 11px;
    line-height: 1.35;
    letter-spacing: .07em;
    max-width: 100%;
  }
  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 24px;
  }
  .trust-row {
    gap: 8px;
  }
  .trust-row span {
    font-size: 12px;
    padding: 7px 10px;
  }
  .product-preview {
    display: none;
  }
  .metrics-strip,
  .landing-section,
  .landing-footer {
    max-width: none;
    padding-left: 18px;
    padding-right: 18px;
  }
  .metrics-strip,
  .feature-grid,
  .audience-grid,
  .small-feature-grid {
    grid-template-columns: 1fr !important;
  }
  .metrics-strip {
    margin-bottom: 34px;
  }
  .metrics-strip div,
  .feature-grid article,
  .audience-grid div,
  .pricing-card {
    padding: 20px;
    border-radius: 22px;
  }
  .section-head,
  .section-head.compact {
    max-width: 100%;
  }
  .section-head h2,
  .landing-section h2 {
    font-size: clamp(30px, 9vw, 42px);
    line-height: 1.06;
    overflow-wrap: break-word;
  }
  .section-head p,
  .landing-section p,
  .feature-grid p,
  .audience-grid p {
    font-size: 16px;
    line-height: 1.48;
    overflow-wrap: break-word;
  }
  .feature-grid h3,
  .audience-grid h3 {
    font-size: 22px;
    line-height: 1.14;
    overflow-wrap: break-word;
  }
  .pricing-section {
    display: grid;
    grid-template-columns: 1fr !important;
    padding: 24px 18px;
    border-radius: 28px;
    overflow: hidden;
  }
  .pricing-card {
    width: 100%;
    min-width: 0;
  }
  .landing-footer {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
  }
}

@media (max-width: 760px) {
  .modal {
    align-items: end;
    place-items: end stretch;
    padding: 0;
  }
  .modal-card {
    width: 100%;
    max-width: 100%;
    border-radius: 28px 28px 0 0;
    padding: 18px;
    max-height: 92vh;
    overflow-y: auto;
  }
  .auth-tabs {
    gap: 6px;
  }
  .auth-tabs .tab {
    font-size: 16px;
    padding: 12px 10px;
  }
  .auth-form h2 {
    font-size: 30px;
    line-height: 1.1;
  }
  .auth-form input {
    min-height: 54px;
    font-size: 16px;
  }
}

@media (max-width: 760px) {
  .app-page {
    display: block;
    min-width: 0;
    overflow-x: hidden;
  }
  .app-sidebar {
    width: 100%;
    min-height: auto;
    position: static;
    border-radius: 0 0 24px 24px;
  }
  .side-nav {
    grid-template-columns: 1fr 1fr;
  }
  .side-nav a {
    padding: 11px 10px;
    font-size: 14px;
  }
  .app-layout,
  .layout {
    width: 100%;
    max-width: 100%;
    padding: 24px 14px 72px;
    overflow-x: hidden;
  }
  .app-layout .hero,
  .hero,
  .summary,
  .columns,
  .grid-2,
  .grid-3,
  .compare-summary-grid,
  .app-layout .grid-3,
  .app-layout .checks-grid,
  .checks-grid,
  .macro-panel,
  .admin-user-actions {
    grid-template-columns: 1fr !important;
  }
  .app-layout h1,
  h1 {
    font-size: clamp(32px, 10vw, 42px);
    line-height: 1.06;
    letter-spacing: -0.045em;
    max-width: 100%;
    overflow-wrap: break-word;
  }
  .app-layout .lead,
  .lead {
    font-size: 16px;
    line-height: 1.45;
  }
  .card,
  .block,
  .form-card,
  .app-layout .form-card {
    padding: 18px;
    border-radius: 20px;
    max-width: 100%;
    overflow-x: hidden;
  }
  input, select, textarea {
    font-size: 16px;
    min-width: 0;
  }
  .extra-checks {
    padding: 12px;
  }
  .check-toggle,
  .check-toggle.optional {
    grid-column: span 1 !important;
  }
  .block-head,
  .section-title-row,
  .admin-user-head,
  .history-item {
    display: grid;
    grid-template-columns: 1fr;
  }
  .block h3,
  .section-title-row h2 {
    font-size: 26px;
    line-height: 1.12;
  }
  .check {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 8px;
    padding: 16px 0;
  }
  .check-title {
    font-size: 18px;
    line-height: 1.25;
    overflow-wrap: break-word;
  }
  .check-comment {
    font-size: 15px;
    line-height: 1.45;
    overflow-wrap: anywhere;
  }
  .badge {
    width: fit-content;
    max-width: 100%;
    white-space: normal;
  }
  .score-card {
    min-height: 180px;
  }
  .score {
    font-size: 56px;
  }
  .code,
  code,
  pre,
  textarea,
  .table-wrap {
    max-width: 100%;
    overflow-x: auto;
  }
  .compare-table,
  .mini-table {
    min-width: 620px;
  }
  .utm-multi-table textarea {
    min-width: 280px;
  }
  .admin-tabs {
    display: grid;
    grid-template-columns: 1fr;
  }
  .admin-tab {
    width: 100%;
  }
}

@media (max-width: 380px) {
  .header-actions {
    grid-template-columns: 1fr;
  }
  .side-nav {
    grid-template-columns: 1fr;
  }
  .hero-copy h1,
  .app-layout h1,
  h1 {
    font-size: 34px;
  }
}


/* v21 public UTM tool */
.public-tool-layout {
  width: min(1560px, 100%);
  margin: 0 auto;
  padding: 34px clamp(16px, 3vw, 44px) 72px;
}
.public-tool-hero {
  margin-bottom: 22px;
}
.public-limit-card {
  min-width: 290px;
  background: #111827;
  color: #fff;
  border-radius: 22px;
  padding: 20px;
  display: grid;
  gap: 6px;
  box-shadow: 0 18px 45px rgba(17,24,39,.18);
}
.public-limit-card span,
.public-limit-card small { color: #cbd5e1; }
.public-limit-card strong { font-size: 26px; line-height: 1.1; }
.public-limit-card.limit-low { background: #7c2d12; }
.public-limit-card.limit-auth { background: #065f46; }
.public-limit-card.limit-closed { background: #991b1b; }
.public-limit-reached {
  padding: 20px;
  border: 1px solid #fecaca;
  background: #fff7f7;
  border-radius: 20px;
}
.public-limit-reached h2 { margin: 12px 0 8px; }
.trust-tool-link {
  display: inline-flex;
  align-items: center;
  color: #344054;
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 800;
  font-size: 13px;
}
.top-nav a.active { color: var(--accent); }
.admin-public-tools { margin-top: 16px; }
.admin-inline-actions {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fafc;
}
.admin-inline-actions p { margin: 0; }
button:disabled { opacity: .6; cursor: wait; transform: none; }

@media (max-width: 700px) {
  .public-tool-layout { padding: 22px 14px 52px; }
  .public-tool-hero { display: grid; grid-template-columns: 1fr; gap: 16px; }
  .public-limit-card { width: 100%; min-width: 0; }
  .admin-inline-actions { align-items: stretch; flex-direction: column; }
}

/* v23: stable public tools dropdown */
.nav-dropdown { position: relative; padding: 8px 0; margin: -8px 0; }
.nav-dropdown::before {
  content: "";
  position: absolute;
  top: 100%;
  left: -24px;
  right: -24px;
  height: 20px;
}
.dropdown-toggle,
.dropdown-toggle:hover,
.dropdown-toggle:focus {
  border: 0 !important;
  outline: 0;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
  border-radius: 0;
}
.dropdown-menu {
  display: block !important;
  top: calc(100% + 10px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu,
.nav-dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}
.nav-dropdown.open .dropdown-toggle::after,
.nav-dropdown:hover .dropdown-toggle::after,
.nav-dropdown:focus-within .dropdown-toggle::after {
  transform: rotate(225deg) translateY(-1px);
}
.dropdown-item.active { background: #fff7ed; color: #c2410c; }
.dropdown-item.active small { color: #9a3412; }

/* v23: public Meta Tags checker */
.public-meta-form { display: grid; gap: 16px; }
.meta-result { margin-top: 24px; display: grid; gap: 22px; }
.meta-summary-card {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 20px;
  align-items: stretch;
}
.meta-score {
  min-height: 190px;
  border-radius: 24px;
  padding: 22px;
  background: #111827;
  color: #fff;
  display: grid;
  place-content: center;
  text-align: center;
}
.meta-score strong { font-size: 68px; line-height: .95; letter-spacing: -.06em; }
.meta-score span { font-size: 22px; color: #cbd5e1; }
.meta-score small { margin-top: 10px; color: #cbd5e1; font-weight: 700; }
.meta-score.good { background: #065f46; }
.meta-score.medium { background: #92400e; }
.meta-score.low { background: #991b1b; }
.meta-summary-data {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 24px;
  padding: 22px;
}
.meta-summary-data h2 { margin-top: 0; }
.meta-summary-data dl { margin: 0; display: grid; gap: 12px; }
.meta-summary-data dl div { display: grid; grid-template-columns: 160px 1fr; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.meta-summary-data dt { color: var(--muted); font-weight: 800; }
.meta-summary-data dd { margin: 0; overflow-wrap: anywhere; }
.meta-summary-data a { color: #175cd3; }
.meta-check-list,
.meta-headings-section {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 24px;
  padding: 22px;
}
.meta-check-list > h2,
.meta-headings-section > h2 { margin-top: 0; }
.meta-check-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.meta-check-row:first-of-type { border-top: 0; }
.meta-check-row h3 { margin: 0 0 7px; }
.meta-check-row p { margin: 6px 0; color: #475467; line-height: 1.5; }
.meta-check-value { color: #111827 !important; font-weight: 800; overflow-wrap: anywhere; }
.meta-recommendation { background: #fff7ed; border-radius: 12px; padding: 10px 12px; color: #9a3412 !important; }
.heading-level-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0; }
.heading-level-card { border: 1px solid var(--line); border-radius: 18px; padding: 16px; min-width: 0; }
.heading-level-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.heading-level-head strong { font-size: 20px; }
.heading-level-head span { min-width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: #fff7ed; color: #c2410c; font-weight: 900; }
.heading-level-card ol { padding-left: 22px; margin: 14px 0 0; display: grid; gap: 9px; }
.heading-level-card li { overflow-wrap: anywhere; line-height: 1.4; }
.meta-heading-order { width: 100%; }
.heading-tag { display: inline-flex; padding: 5px 8px; border-radius: 8px; background: #111827; color: #fff; font-size: 12px; font-weight: 900; }

@media (max-width: 900px) {
  .meta-summary-card { grid-template-columns: 1fr; }
  .meta-score { min-height: 150px; }
  .heading-level-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .meta-summary-data dl div { grid-template-columns: 1fr; gap: 4px; }
  .meta-check-row { grid-template-columns: 1fr; }
  .heading-level-grid { grid-template-columns: 1fr; }
}


/* v26 public report sharing */
.public-share-box {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #d0d5dd;
  border-radius: 18px;
  background: #f8fafc;
}
.public-share-box.success {
  border-color: #a6f4c5;
  background: #ecfdf3;
}
.public-share-box.error {
  border-color: #fda29b;
  background: #fff1f3;
}
.public-share-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.public-share-head strong {
  display: block;
  margin-top: 8px;
  font-size: 18px;
}
.public-share-head p {
  margin: 6px 0 0;
  color: #475467;
  line-height: 1.45;
}
.public-share-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  margin: 14px 0 10px;
}
.public-share-link input {
  min-width: 0;
  font-family: Consolas, monospace;
}
.public-share-box small { color: #667085; }

.public-report-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 0% 0%, rgba(241,98,34,.13), transparent 28%),
    radial-gradient(circle at 100% 0%, rgba(23,92,211,.10), transparent 30%),
    #f6f7fb;
}
.public-report-header {
  width: min(1560px, calc(100% - 36px));
  margin: 0 auto;
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid rgba(17,24,39,.08);
}
.public-report-label {
  color: #475467;
  font-weight: 800;
  font-size: 14px;
}
.public-report-layout {
  width: min(1380px, calc(100% - 36px));
  margin: 0 auto;
  padding: 30px 0 70px;
}
.public-report-loading {
  display: flex;
  align-items: center;
  gap: 16px;
}
.public-report-loading p { margin: 5px 0 0; }
.public-report-intro {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: end;
}
.public-report-intro h1 {
  font-size: clamp(34px, 5vw, 64px);
  max-width: 900px;
}
.public-report-meta {
  min-width: 270px;
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 18px;
  background: #111827;
  color: #fff;
}
.public-report-meta span {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: #cbd5e1;
}
.public-report-meta strong { color: #fff; }
.public-report-footer {
  width: min(1380px, calc(100% - 36px));
  margin: 0 auto;
  padding: 20px 0 36px;
  color: #667085;
  border-top: 1px solid rgba(17,24,39,.08);
}
.public-report-missing {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  padding: 60px 0;
}
.public-report-missing .brand { margin-bottom: 24px; }
.public-report-missing h1 { font-size: clamp(34px, 7vw, 58px); margin-top: 18px; }
.break-anywhere { overflow-wrap: anywhere; word-break: break-word; }

@media print {
  .public-report-page { background: #fff; }
  .public-report-header,
  .public-report-footer { display: none; }
  .public-report-layout { width: 100%; padding: 0; }
  .card { box-shadow: none; break-inside: avoid; }
}

@media (max-width: 760px) {
  .public-share-head,
  .public-report-header {
    align-items: stretch;
    flex-direction: column;
  }
  .public-share-link {
    grid-template-columns: 1fr;
  }
  .public-share-link button,
  .public-share-link a {
    width: 100%;
    text-align: center;
  }
  .public-report-layout,
  .public-report-header,
  .public-report-footer {
    width: min(100% - 24px, 100%);
  }
  .public-report-layout { padding-top: 18px; }
  .public-report-intro {
    grid-template-columns: 1fr;
  }
  .public-report-meta { min-width: 0; }
  .public-report-intro h1 { font-size: 36px; }
}

/* v27 Sitemap analyzer */
.sitemap-tool-layout,
.sitemap-app-layout {
  width: min(1560px, 100%);
}
.sitemap-form-card {
  margin-bottom: 24px;
}
.public-sitemap-form {
  display: grid;
  gap: 12px;
}
.tool-method-note {
  margin: 18px 0 0;
  padding: 14px 16px;
  border: 1px solid #d0d5dd;
  border-radius: 16px;
  color: #475467;
  background: #f8fafc;
  line-height: 1.5;
}
.sitemap-result {
  margin-top: 24px;
  display: grid;
  gap: 18px;
}
.sitemap-summary-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}
.sitemap-summary-main {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px;
  background: #fff;
  box-shadow: 0 12px 35px rgba(17,24,39,.06);
}
.sitemap-summary-main h2 {
  margin: 4px 0 18px;
  font-size: clamp(24px, 3vw, 38px);
  overflow-wrap: anywhere;
}
.sitemap-summary-main dl {
  display: grid;
  gap: 0;
  margin: 0;
}
.sitemap-summary-main dl div {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.sitemap-summary-main dt {
  color: #667085;
  font-weight: 800;
}
.sitemap-summary-main dd {
  margin: 0;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.sitemap-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
.sitemap-metrics article {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(17,24,39,.05);
}
.sitemap-metrics strong {
  display: block;
  font-size: 30px;
  letter-spacing: -.04em;
}
.sitemap-metrics span {
  display: block;
  margin-top: 4px;
  color: #667085;
  font-weight: 700;
}
.sitemap-section-card > h2 {
  margin-bottom: 18px;
}
.sitemap-issue-list {
  display: grid;
}
.sitemap-issue {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.sitemap-issue:last-child {
  border-bottom: 0;
}
.sitemap-issue > .badge {
  align-self: start;
  justify-content: center;
}
.sitemap-issue h3 {
  margin: 0 0 7px;
}
.sitemap-issue p {
  margin: 5px 0;
  line-height: 1.45;
  color: #475467;
}
.sitemap-examples {
  margin-top: 10px;
}
.sitemap-examples summary {
  cursor: pointer;
  color: #344054;
  font-weight: 800;
}
.sitemap-examples ul {
  display: grid;
  gap: 7px;
  margin: 10px 0 0;
  padding-left: 20px;
}
.sitemap-examples code,
.sitemap-url-samples code {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.sitemap-files-table,
.sitemap-deep-table {
  min-width: 950px;
}
.sitemap-files-table td:first-child,
.sitemap-deep-table td:first-child,
.sitemap-deep-table td:last-child {
  max-width: 440px;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.table-error,
.table-warning {
  display: block;
  margin-top: 5px;
  font-weight: 800;
}
.table-error { color: var(--bad); }
.table-warning { color: #b54708; }
.sitemap-deep-table tr.fail td { background: #fff8f7; }
.sitemap-deep-table tr.warn td { background: #fffcf5; }
.sitemap-recommendations {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 24px;
}
.sitemap-recommendations li {
  padding-left: 5px;
  line-height: 1.5;
}
.sitemap-url-samples {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}
.sitemap-url-samples code {
  display: block;
  padding: 9px 11px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
}
.sitemap-private-status span,
.sitemap-private-status strong,
.sitemap-private-status small {
  display: block;
}
.sitemap-private-status strong {
  margin: 5px 0;
  font-size: 22px;
}

@media (max-width: 1150px) {
  .sitemap-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .sitemap-summary-card {
    grid-template-columns: 1fr;
  }
  .sitemap-summary-card .meta-score {
    min-height: 180px;
  }
  .sitemap-summary-main dl div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .sitemap-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sitemap-issue {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .sitemap-issue > .badge {
    width: max-content;
  }
}


/* v28 YML feed analyzer */
.yml-tool-layout,
.yml-app-layout { width: min(1560px, 100%); }
.yml-form-card { overflow: visible; }
.yml-result { display: grid; gap: 22px; margin-top: 22px; }
.yml-summary-card h2 {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.yml-metrics { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.yml-offers-table { min-width: 980px; }
.yml-page-table { min-width: 900px; }
.yml-image-table { min-width: 720px; }
.yml-offers-table td:nth-child(2) { min-width: 220px; }
.yml-offers-table td:nth-child(3),
.yml-page-table td:nth-child(2),
.yml-image-table td:nth-child(1) {
  max-width: 420px;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.yml-private-status { min-width: 300px; }
.public-yml-form select { width: 100%; }
.yml-result .table-wrap a { overflow-wrap: anywhere; word-break: break-word; }

@media (max-width: 1100px) {
  .yml-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .yml-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .yml-private-status { min-width: 0; width: 100%; }
}

/* v30 robots.txt analyzer */
.robots-tool-layout,
.robots-app-layout { width: min(1560px, 100%); }
.robots-form-card { overflow: visible; }
.robots-result { display: grid; gap: 22px; margin-top: 22px; }
.robots-private-status { min-width: 300px; }
.robots-mode-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}
.robots-mode-switch label,
.robots-agents label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  cursor: pointer;
}
.robots-mode-switch label {
  padding: 11px 14px;
  border: 1px solid #d0d5dd;
  border-radius: 14px;
  background: #f8fafc;
}
.robots-mode-switch input,
.robots-agents input { width: auto; min-width: 16px; }
.robots-test-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, .7fr);
  gap: 18px;
  margin-top: 18px;
  align-items: stretch;
}
.robots-test-grid label small {
  display: block;
  color: #667085;
  font-weight: 600;
  margin: 4px 0 8px;
}
.robots-agents {
  margin: 0;
  border: 1px solid #d0d5dd;
  border-radius: 18px;
  padding: 16px;
  background: #f8fafc;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.robots-agents legend { font-weight: 900; padding: 0 7px; }
.robots-summary-card h2 {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.robots-metrics { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.robots-groups { display: grid; gap: 14px; }
.robots-group-card {
  border: 1px solid #e4e7ec;
  border-radius: 18px;
  padding: 16px;
  background: #fff;
}
.robots-group-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eaecf0;
}
.robots-group-head h3 { margin: 8px 0 0; }
.robots-group-head > span { color: #667085; font-weight: 700; }
.robots-rule-list { display: grid; gap: 8px; padding-top: 12px; }
.robots-rule {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 9px 10px;
  border-radius: 12px;
  background: #f8fafc;
}
.robots-rule code { overflow-wrap: anywhere; word-break: break-word; }
.robots-rule small { color: #667085; }
.robots-rule-type {
  display: inline-flex;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.robots-rule-type.allow { color: #067647; background: #dcfae6; }
.robots-rule-type.disallow { color: #b42318; background: #fee4e2; }
.robots-rule-type.extra { color: #344054; background: #e4e7ec; }
.robots-test-table { min-width: 1000px; }
.robots-sitemap-table { min-width: 760px; }
.robots-test-table td:nth-child(2),
.robots-test-table td:nth-child(4),
.robots-sitemap-table td:first-child {
  max-width: 460px;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.robots-test-table td small {
  display: block;
  margin-top: 5px;
  color: #667085;
}
.robots-engine-notes { display: grid; gap: 12px; padding-left: 20px; }
.robots-source-preview {
  max-height: 580px;
  overflow: auto;
  margin: 14px 0 0;
  padding: 18px;
  border-radius: 14px;
  background: #101828;
  color: #e4e7ec;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  tab-size: 2;
}

@media (max-width: 1100px) {
  .robots-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .robots-test-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .robots-private-status { min-width: 0; width: 100%; }
  .robots-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .robots-agents { grid-template-columns: 1fr; }
  .robots-rule { grid-template-columns: 1fr; align-items: start; }
  .robots-rule-type { width: max-content; }
  .robots-group-head { flex-direction: column; }
}


/* v32: Meta Tags внутри личного кабинета */
.meta-app-layout {
  width: min(1560px, 100%);
}

.meta-private-status {
  min-width: 300px;
}

.app-page .meta-tool-card {
  overflow: visible;
}

@media (max-width: 760px) {
  .meta-private-status {
    width: 100%;
    min-width: 0;
  }
}


/* v33: публичное отключение YML не относится к личному кабинету */
.yml-private-status {
  display: grid;
  gap: 8px;
  min-width: 320px;
  background: #111827;
  color: #fff;
  border: 0;
  box-shadow: 0 18px 45px rgba(17, 24, 39, .16);
}

.yml-private-status strong {
  color: #fff;
  font-size: 22px;
  line-height: 1.15;
}

.yml-private-status span {
  color: #cbd5e1;
  line-height: 1.4;
}

@media (max-width: 760px) {
  .yml-private-status {
    width: 100%;
    min-width: 0;
  }
}


/* v34: публичные переключатели не влияют на кабинетные инструменты */
.meta-private-status,
.sitemap-private-status,
.robots-private-status,
.yml-private-status {
  display: grid;
  gap: 8px;
  min-width: 310px;
  padding: 20px;
  border: 0;
  border-radius: 22px;
  background: #111827;
  color: #fff;
  box-shadow: 0 18px 45px rgba(17, 24, 39, .16);
}

.meta-private-status strong,
.sitemap-private-status strong,
.robots-private-status strong,
.yml-private-status strong {
  color: #fff;
  font-size: 22px;
  line-height: 1.15;
}

.meta-private-status span,
.sitemap-private-status span,
.robots-private-status span,
.yml-private-status span {
  color: #cbd5e1;
  line-height: 1.4;
}

@media (max-width: 760px) {
  .meta-private-status,
  .sitemap-private-status,
  .robots-private-status,
  .yml-private-status {
    width: 100%;
    min-width: 0;
  }
}


/* v35: AI visibility */
.ai-layout,
.ai-public-layout {
  width: min(1580px, 100%);
}

.ai-truth-note {
  display: grid;
  gap: 8px;
}

.ai-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ai-panel {
  scroll-margin-top: 110px;
}

.ai-result {
  display: grid;
  gap: 22px;
  margin-top: 24px;
}

.ai-summary {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
}

.ai-summary > div:last-child {
  background: #fff;
  border: 1px solid #e3e7ee;
  border-radius: 24px;
  padding: 26px;
  box-shadow: 0 16px 40px rgba(17,24,39,.06);
  overflow-wrap: anywhere;
}

.ai-result-section {
  margin: 0;
}

.ai-system-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.ai-system-card {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 20px;
  border: 1px solid #e2e7ee;
  border-radius: 20px;
  background: #fff;
}

.ai-system-card.pass {
  border-color: #b8ead0;
  background: #f4fff8;
}

.ai-system-card.fail {
  border-color: #f0c0c0;
  background: #fff6f6;
}

.ai-system-card h3,
.ai-system-card p {
  margin: 0;
}

.ai-system-card small {
  color: #667085;
}

.ai-system-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.ai-system-card dl div {
  padding: 9px;
  border-radius: 12px;
  background: rgba(255,255,255,.8);
}

.ai-system-card dt {
  color: #667085;
  font-size: 12px;
}

.ai-system-card dd {
  margin: 3px 0 0;
  font-weight: 800;
}

.ai-confirmed {
  color: #087443;
}

.ai-check-list {
  display: grid;
}

.ai-check-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 18px;
  padding: 20px 0;
  border-bottom: 1px solid #e6e9ef;
}

.ai-check-row:last-child {
  border-bottom: 0;
}

.ai-check-row .badge {
  align-self: start;
  justify-self: start;
  min-width: 104px;
  text-align: center;
}

.ai-check-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.ai-check-head h3 {
  margin: 0;
}

.ai-check-row p {
  margin: 7px 0 0;
}

.ai-check-row code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ai-live-metrics,
.ai-source-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.ai-live-metrics article,
.ai-source-grid article {
  display: grid;
  gap: 5px;
  padding: 18px;
  border: 1px solid #e2e7ee;
  border-radius: 18px;
  background: #fff;
}

.ai-live-metrics strong,
.ai-source-grid strong {
  font-size: 28px;
}

.ai-live-runs {
  display: grid;
  gap: 12px;
}

.ai-live-run {
  border: 1px solid #e1e5eb;
  border-radius: 16px;
  padding: 14px 16px;
}

.ai-live-run.fail {
  border-color: #efc0c0;
  background: #fff7f7;
}

.ai-live-run summary {
  font-weight: 800;
  cursor: pointer;
}

.ai-history-list,
.ai-import-list,
.ai-monitor-list,
.admin-backups-list {
  display: grid;
  gap: 10px;
}

.ai-history-item {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  text-align: left;
  background: #fff;
  color: #111827;
  border: 1px solid #e2e7ee;
  border-radius: 16px;
  padding: 14px 16px;
}

.ai-history-item span:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.ai-history-item small {
  color: #667085;
  overflow-wrap: anywhere;
}

.ai-import-list article,
.ai-monitor-list article,
.admin-backups-list article {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  border: 1px solid #e2e7ee;
  border-radius: 16px;
  padding: 15px 17px;
  background: #fff;
}

.ai-import-list article {
  display: grid;
  gap: 4px;
}

.ai-monitor-list article > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.ai-monitor-list small,
.ai-monitor-list p {
  color: #667085;
  overflow-wrap: anywhere;
  margin: 0;
}

.admin-secret-status,
.admin-integrity-card {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border-radius: 16px;
  background: #f4f6f9;
  margin: 12px 0;
}

.admin-secret-status.configured {
  background: #ecfff4;
  border: 1px solid #bce9cf;
}

.admin-secret-status.missing {
  background: #fff8e7;
  border: 1px solid #f2d894;
}

.admin-secret-status span {
  color: #667085;
}

.admin-integrity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.admin-integrity-grid span {
  padding: 10px;
  background: #fff;
  border-radius: 12px;
}

.admin-backups-list {
  margin-top: 16px;
}

.ai-public-page .ai-summary {
  margin-top: 20px;
}

@media (max-width: 1180px) {
  .ai-system-grid,
  .ai-live-metrics,
  .ai-source-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .ai-summary {
    grid-template-columns: 1fr;
  }

  .ai-system-grid,
  .ai-live-metrics,
  .ai-source-grid,
  .admin-integrity-grid {
    grid-template-columns: 1fr;
  }

  .ai-check-row {
    grid-template-columns: 1fr;
  }

  .ai-check-head,
  .ai-history-item,
  .ai-monitor-list article,
  .admin-backups-list article {
    align-items: stretch;
    flex-direction: column;
  }

  .ai-monitor-list .download-row {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }
}


.ai-cited-answer {
  white-space: pre-wrap;
  line-height: 1.7;
}

.ai-inline-citation {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 25px;
  height: 23px;
  margin: 0 3px;
  padding: 0 6px;
  border-radius: 999px;
  background: #edf3ff;
  color: #1849a9;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  vertical-align: baseline;
}

.ai-inline-citation:hover {
  background: #dce8ff;
}


/* v36: batch broken links */
.batch-broken-layout,
.batch-broken-public-layout {
  width: min(1580px, 100%);
}

.batch-broken-private-note {
  display: grid;
  gap: 8px;
}

.batch-broken-external-toggle {
  margin: 14px 0 18px;
  align-items: flex-start;
}

.batch-broken-external-toggle span {
  display: grid;
  gap: 3px;
}

.batch-broken-external-toggle small {
  color: #667085;
  font-weight: 400;
}

.batch-progress {
  margin-top: 22px;
  padding: 22px;
  border: 1px solid #e1e6ed;
  border-radius: 22px;
  background: #f9fafb;
}

.batch-progress-head,
.batch-progress-label,
.batch-result-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.batch-progress-head h3 {
  margin: 4px 0 0;
}

.batch-progress-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.batch-progress-label {
  margin-bottom: 7px;
  font-size: 14px;
}

.batch-progress-bar {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e9ef;
}

.batch-progress-bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff621f, #ff9b4d);
  transition: width .25s ease;
}

.batch-live-counters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.batch-live-counters span {
  padding: 8px 12px;
  border: 1px solid #e1e6ed;
  border-radius: 999px;
  background: #fff;
}

.batch-broken-result {
  display: grid;
  gap: 20px;
  margin-top: 24px;
}

.batch-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.batch-summary article {
  display: grid;
  gap: 4px;
  min-height: 118px;
  align-content: center;
  padding: 18px;
  border: 1px solid #e1e6ed;
  border-radius: 18px;
  background: #fff;
}

.batch-summary article strong {
  font-size: 30px;
  line-height: 1;
}

.batch-summary article span {
  color: #667085;
}

.batch-summary article.danger {
  border-color: #f0c0c0;
  background: #fff5f5;
}

.batch-summary article.success {
  border-color: #bce7cd;
  background: #f3fff7;
}

.batch-section {
  margin: 0;
}

.batch-link-table td:nth-child(2),
.batch-link-table td:nth-child(3),
.batch-link-table td:nth-child(6) {
  max-width: 340px;
  overflow-wrap: anywhere;
}

.table-error {
  display: block;
  margin-top: 4px;
  color: #a61b1b;
}

.batch-history-list {
  display: grid;
  gap: 10px;
}

.batch-history-item {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 15px 17px;
  text-align: left;
  color: #111827;
  background: #fff;
  border: 1px solid #e1e6ed;
  border-radius: 16px;
}

.batch-history-item > span:first-child {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.batch-history-item small {
  color: #667085;
  overflow-wrap: anywhere;
}

@media (max-width: 1200px) {
  .batch-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .batch-progress-grid,
  .batch-summary {
    grid-template-columns: 1fr;
  }

  .batch-progress-head,
  .batch-progress-label,
  .batch-result-actions,
  .batch-history-item {
    align-items: stretch;
    flex-direction: column;
  }

  .batch-result-actions .small-btn {
    width: 100%;
    text-align: center;
  }
}
