:root {
  --primary: #e60023;
  --primary-600: #c9001f;
  --primary-soft: #fff1f4;
  --primary-tint: #ffe4ea;
  --bg: #f8fafc;
  --bg-warm: #fff8fa;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --muted-2: #9ca3af;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --green: #16a34a;
  --amber: #f59e0b;
  --blue: #2563eb;
  --shadow-sm: 0 8px 24px rgba(17, 24, 39, .06);
  --shadow-md: 0 18px 50px rgba(17, 24, 39, .1);
  --shadow-red: 0 18px 46px rgba(230, 0, 35, .18);
  --radius: 24px;
  --radius-sm: 16px;
  --sidebar: 260px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
  background:
    radial-gradient(circle at 12% 28%, rgba(230, 0, 35, .1), transparent 34rem),
    radial-gradient(circle at 86% 24%, rgba(255, 177, 193, .18), transparent 36rem),
    linear-gradient(180deg, #fff 0%, #fff9fb 48%, var(--bg) 100%);
  overflow-x: hidden;
}
body::before {
  content: none;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { border: 0; cursor: pointer; }
strong, b { font-weight: 700; }
h1, h2, h3, p { margin-top: 0; }
p { color: var(--muted); line-height: 1.7; }
h1 {
  max-width: 900px;
  margin-bottom: 18px;
  color: var(--text);
  font-size: clamp(34px, 4.4vw, 62px);
  font-weight: 760;
  line-height: 1.06;
  letter-spacing: -.025em;
}
h2 {
  margin-bottom: 12px;
  color: var(--text);
  font-size: clamp(22px, 2.6vw, 36px);
  font-weight: 720;
  line-height: 1.08;
  letter-spacing: -.02em;
}
h3 { margin-bottom: 10px; color: var(--text); font-size: 19px; font-weight: 700; line-height: 1.25; }
.hidden { display: none !important; }
.view { display: none; animation: viewIn .28s ease both; }
.view.active { display: block; }
body.app-mode .topbar { display: none; }
body.app-mode .app-view { min-height: 100vh; }
.app-drawer-toggle { display: none; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 76px;
  padding: 14px clamp(18px, 5vw, 72px);
  border-bottom: 1px solid rgba(229, 231, 235, .82);
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 40px rgba(17,24,39,.04);
}
.brand, .nav, .top-actions { display: flex; align-items: center; gap: 14px; }
.brand { font-weight: 760; color: var(--text); letter-spacing: -.02em; }
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #fff;
  background: var(--primary);
  box-shadow: 0 14px 28px rgba(230,0,35,.22);
}
.nav { gap: 6px; }
.nav a {
  padding: 9px 12px;
  border-radius: 999px;
  color: #4b5563;
  font-size: 14px;
  font-weight: 650;
  transition: color .2s ease, background .2s ease, transform .2s ease;
}
.nav a:hover { color: var(--primary); background: var(--primary-soft); transform: translateY(-1px); }
.nav-tools {
  position: relative;
}
.nav-tools-trigger {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  color: #4b5563;
  background: transparent;
  font-size: 14px;
  font-weight: 650;
}
.nav-tools-trigger:hover,
.nav-tools:focus-within .nav-tools-trigger {
  color: var(--primary);
  background: var(--primary-soft);
}
.nav-tools-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 120;
  display: none;
  min-width: 250px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-md);
}
.nav-tools:hover .nav-tools-menu,
.nav-tools:focus-within .nav-tools-menu {
  display: grid;
  gap: 4px;
}
.nav-tools-menu a {
  display: block;
  padding: 11px 12px;
  border-radius: 12px;
}
.menu-toggle {
  display: none;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  background: #fff;
  font-weight: 650;
}
.primary, .secondary, .ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  font-weight: 700;
  white-space: nowrap;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #ff4b63);
  box-shadow: var(--shadow-red);
}
.secondary {
  color: var(--primary);
  border: 1px solid #ffc4cf;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.ghost {
  color: var(--text);
  border: 1px solid var(--border);
  background: rgba(255,255,255,.88);
}
.primary:hover, .secondary:hover, .ghost:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.large { min-height: 56px; padding-inline: 26px; border-radius: 16px; }
.small { min-height: 34px; padding-inline: 12px; border-radius: 999px; font-size: 13px; }

.page { min-height: calc(100vh - 76px); padding: 0 clamp(18px, 5vw, 72px); overflow-x: clip; }
.hero {
  position: relative;
  max-width: 1220px;
  margin: 0 auto;
  padding: clamp(56px, 8vw, 96px) 0 72px;
  text-align: center;
  overflow: visible;
}
.hero::before, .hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 999px;
  filter: blur(28px);
  pointer-events: none;
}
.hero::before { width: 640px; height: 640px; left: -10%; top: 5%; background: radial-gradient(circle, rgba(230,0,35,.1), transparent 68%); }
.hero::after { width: 620px; height: 620px; right: -8%; top: 6%; background: radial-gradient(circle, rgba(255,172,187,.18), transparent 68%); }
.hero-copy { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; }
.label-row, .trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.label-row span, .trust-row span, .eyebrow {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}
.label-row span {
  padding: 9px 13px;
  border: 1px solid #ffd0da;
  border-radius: 999px;
  color: #4b5563;
  background: rgba(255, 241, 244, .78);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}
.label-row span::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: #6ee7b7;
}
.gradient-text {
  color: var(--primary);
  background: linear-gradient(135deg, var(--primary), #ff3157);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-text {
  max-width: 760px;
  margin-inline: auto;
  color: #5f6471;
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.58;
}
.hero-search {
  display: flex;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 820px;
  margin: 30px auto 18px;
}
input, select, textarea {
  width: 100%;
  min-height: 48px;
  padding: 0 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  outline: none;
  color: var(--text);
  background: #fff;
  box-shadow: 0 1px 0 rgba(17,24,39,.02);
  transition: border-color .2s ease, box-shadow .2s ease;
}
textarea { min-height: 130px; padding: 14px 15px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--muted-2); }
input:focus, select:focus, textarea:focus {
  border-color: #ff9dae;
  box-shadow: 0 0 0 4px rgba(230,0,35,.08);
}
.trust-row { margin-top: 6px; color: var(--muted); }
.trust-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.72);
}
.trust-row span::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--primary);
}

@keyframes previewRise { from { opacity: 0; transform: translateY(22px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
.window-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fff, #f9fafb);
}
.window-bar span { width: 10px; height: 10px; border-radius: 50%; background: #34d399; }
.window-bar span:first-child { background: #ff6b7f; }
.window-bar span:nth-child(2) { background: #fbbf24; }
.window-bar b { margin-left: 8px; color: var(--muted); font-size: 12px; font-weight: 700; }
.shot-grid { display: grid; grid-template-columns: 170px 1fr; min-height: 430px; background: #fff; }
.shot-nav {
  padding: 20px;
  border-right: 1px solid var(--border);
  background: linear-gradient(180deg, #fff7f9, #fff);
}
.shot-nav b, .shot-nav span { display: block; }
.shot-nav b { margin-bottom: 12px; font-size: 13px; }
.shot-nav span {
  padding: 10px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.shot-main { padding: 22px; }
.shot-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.shot-header span { font-size: 20px; font-weight: 700; }
.shot-header button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-soft);
  font-weight: 650;
}
.mini-metrics, .stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mini-metrics article, .stat-grid article {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.mini-metrics b, .stat-grid b { display: block; color: var(--text); font-size: 28px; letter-spacing: -.03em; }
.mini-metrics span, .stat-grid span { color: var(--muted); font-size: 12px; font-weight: 700; }
.chart-card, .mini-preview {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, #fff7f9);
}
.bars, .analytics-chart {
  display: flex;
  align-items: end;
  gap: 10px;
  height: 140px;
}
.bars span, .analytics-chart span {
  flex: 1;
  min-width: 16px;
  border-radius: 999px 999px 6px 6px;
  background: linear-gradient(180deg, #ff5a72, var(--primary));
  box-shadow: 0 10px 22px rgba(230,0,35,.16);
}
.bars span:nth-child(1), .analytics-chart span:nth-child(1) { height: 38%; }
.bars span:nth-child(2), .analytics-chart span:nth-child(2) { height: 58%; }
.bars span:nth-child(3), .analytics-chart span:nth-child(3) { height: 45%; }
.bars span:nth-child(4), .analytics-chart span:nth-child(4) { height: 76%; }
.bars span:nth-child(5), .analytics-chart span:nth-child(5) { height: 64%; }
.bars span:nth-child(6), .analytics-chart span:nth-child(6) { height: 88%; }
.bars span:nth-child(7), .analytics-chart span:nth-child(7) { height: 52%; }
.chart-line { height: 4px; border-radius: 999px; background: linear-gradient(90deg, var(--primary), #ff94a5, #fecdd3); }
.keyword-table {
  display: grid;
  grid-template-columns: 1.4fr .8fr .6fr;
  gap: 8px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
}
.keyword-table span { color: var(--muted); font-size: 12px; font-weight: 650; }
.keyword-table b { font-size: 13px; font-weight: 650; }
.floating-card {
  position: absolute;
  z-index: 4;
  min-width: 168px;
  padding: 15px;
  text-align: left;
  border: 1px solid #ffd0da;
  border-radius: 18px;
  background: rgba(255,255,255,.86);
  box-shadow: 0 18px 46px rgba(230,0,35,.12);
  backdrop-filter: blur(14px);
}
.floating-card span, .floating-card small { display: block; color: var(--muted); font-size: 12px; font-weight: 650; }
.floating-card strong { display: block; margin: 3px 0; color: var(--primary); font-size: 30px; }
.float-keyword { right: 3%; bottom: 120px; }
.float-ai { left: 5%; top: 270px; }

.home-band, .feature-workflow, .cta-panel {
  max-width: 1220px;
  margin: 24px auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255,255,255,.86);
  box-shadow: var(--shadow-sm);
}
.home-band strong, .home-band span { display: block; }
.home-band strong { margin-bottom: 6px; font-size: 20px; letter-spacing: -.02em; }
.home-band span { color: var(--muted); }
.home-tools, .feature-matrix, .testimonial-grid, .blog-list {
  max-width: 1220px;
  margin: 24px auto 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.home-tools article, .feature-matrix article, .testimonial-card, .blog-list a, .panel, .result-card, .analysis-card, .cms-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.analysis-card, .result-card, .brief-item, .trend-card {
  min-width: 0;
  overflow-wrap: anywhere;
}
.analysis-card ul { padding-left: 20px; margin: 12px 0; }
.analysis-card li { margin: 6px 0; }
.preview-image {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: 380px;
  object-fit: contain;
  border-radius: 16px;
}
.home-tools article:hover, .feature-matrix article:hover, .blog-list a:hover, .panel:hover, .tool-card:hover {
  transform: translateY(-4px);
  border-color: #ffc4cf;
  box-shadow: var(--shadow-md);
}
.home-tools article span, .feature-matrix article > span, .blog-list a span, .testimonial-card span {
  color: var(--primary);
  font-size: 12px;
  font-weight: 720;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.home-tools article h2, .feature-matrix article h2 { font-size: 24px; }
.section-title, .page-head {
  max-width: 880px;
  margin: 86px auto 26px;
  text-align: center;
}
.section-title p, .page-head p { max-width: 720px; margin-inline: auto; font-size: 17px; }
.feature-matrix { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.faq-grid article h3 { font-size: 18px; }
.testimonial-card h3 { font-size: 21px; }
.stat-grid { min-width: min(420px, 100%); }
.cta-panel {
  margin-top: 64px;
  margin-bottom: 36px;
  background:
    radial-gradient(circle at 10% 20%, rgba(230,0,35,.13), transparent 22rem),
    linear-gradient(135deg, #fff, #fff1f4);
}
.site-footer {
  max-width: 1220px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(240px, .7fr) minmax(0, 1fr);
  align-items: start;
  gap: 24px;
  padding: 34px 0 54px;
  color: var(--muted);
}
.site-footer nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 12px 18px;
  justify-items: start;
}
.site-footer a {
  color: #475467;
  font-weight: 650;
  text-decoration: none;
}
.site-footer a:hover { color: var(--primary); }

.demo-section {
  position: relative;
  max-width: 1220px;
  margin: 12px auto 44px;
  padding: 76px 18px 82px;
  overflow: hidden;
}
.demo-section::before {
  content: none;
}
.demo-header {
  max-width: 760px;
  margin: 0 auto 34px;
  text-align: center;
}
.demo-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 7px 13px;
  border: 1px solid #ffc4cf;
  border-radius: 999px;
  color: var(--primary);
  background: #fff;
  font-size: 12px;
  font-weight: 650;
}
.demo-eyebrow span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .45; transform: scale(.75); } }
.demo-title {
  max-width: 760px;
  margin: 0 auto 14px;
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 760;
  line-height: 1.08;
}
.demo-title em {
  color: var(--primary);
  font-style: normal;
}
.demo-sub {
  max-width: 600px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 16px;
}
.tool-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin-bottom: 26px;
}
.tab-btn {
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: #4b5563;
  background: #fff;
  font-weight: 650;
  transition: .2s ease;
}
.tab-btn:hover, .progress-dot:hover {
  color: var(--primary);
  border-color: #ffc4cf;
  background: var(--primary-soft);
}
.tab-btn.active {
  color: #fff;
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: var(--shadow-red);
}
.demo-stage {
  max-width: 1080px;
  margin: 0 auto;
}
.browser-frame {
  overflow: hidden;
  border: 1.5px solid rgba(17,24,39,.1);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 32px 80px rgba(17,24,39,.12), 0 2px 8px rgba(17,24,39,.06);
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fff, #f9fafb);
}
.browser-dots { display: flex; gap: 6px; }
.browser-dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #34d399;
}
.browser-dots span:first-child { background: #ff6b7f; }
.browser-dots span:nth-child(2) { background: #fbbf24; }
.browser-url {
  flex: 1;
  max-width: 420px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
  background: #fff;
  font-size: 12px;
}
.browser-badge {
  padding: 6px 10px;
  border: 1px solid #ffd0da;
  border-radius: 10px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 11px;
  font-weight: 650;
}
.tool-panel { display: none; animation: viewIn .28s ease both; }
.tool-panel.active { display: block; }
.panel-inner {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 520px;
}
.panel-sidebar {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 24px 18px;
  border-right: 1px solid var(--border);
  background: #fff8fa;
}
.sidebar-title {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.sidebar-item {
  padding: 11px 12px;
  border-radius: 13px;
  color: #4b5563;
  font-weight: 650;
}
.sidebar-item.active {
  color: var(--primary);
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.panel-content { padding: 30px; }
.panel-heading {
  margin: 0 0 10px;
  font-size: 26px;
  font-weight: 720;
}
.panel-desc {
  max-width: 660px;
  margin-bottom: 20px;
  color: var(--muted);
}
.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 18px;
}
.fake-input {
  min-height: 46px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: #374151;
  background: #fff;
}
.fake-input.mono, .browser-url { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.cursor {
  display: inline-block;
  width: 2px;
  height: 18px;
  margin-left: 3px;
  background: var(--primary);
  animation: blink 1s infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.btn-red {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 14px;
  color: #fff;
  background: var(--primary);
  font-weight: 700;
}
.preview-grid, .competitor-grid, .generator-layout {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 16px;
}
.result-list, .insight-card, .gen-card, .comp-profile, .gap-list, .score-tile {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.result-row, .gap-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.results-table {
  width: 100%;
  min-width: 620px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.results-table th, .results-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.results-table th {
  color: var(--muted);
  background: #faf8f6;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.results-table tr:last-child td { border-bottom: 0; }
.badge-opp, .intent-pill, .score-ring {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
}
.badge-high { color: #047857; background: #ecfdf5; }
.badge-med { color: #9a6d00; background: #fef3c7; }
.badge-low { color: var(--primary); background: var(--primary-soft); }
.intent-pill { color: #4b5563; background: #f3f4f6; }
.score-ring { width: 34px; padding: 0; }
.results-table .score-ring {
  display: inline-flex;
  width: 34px;
  height: 24px;
  min-height: 24px;
  margin: 0;
  padding: 0;
  border-radius: 999px;
  background-image: none;
  font-size: 12px;
}
.ring-g { color: #047857; background: #ecfdf5; }
.ring-y { color: #9a6d00; background: #fef3c7; }
.ring-r { color: var(--primary); background: var(--primary-soft); }
.result-row:last-child, .gap-list div:last-child { border-bottom: 0; }
.result-row span, .gap-list span {
  color: #047857;
  font-weight: 700;
}
.insight-card span, .gen-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}
.score-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.score-tile strong {
  display: block;
  color: var(--primary);
  font-size: 34px;
}
.score-tile span { color: var(--muted); }
.check-list { display: grid; gap: 10px; margin: 0; padding-left: 20px; color: #374151; }
.generator-layout { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bar-track {
  position: relative;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #fee2e2;
}
.bar-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}
.comp-avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  border-radius: 16px;
  color: #fff;
  background: var(--primary);
}
.comp-profile span { display: block; margin: 4px 0 10px; color: var(--muted); }
.autoplay-bar {
  height: 4px;
  width: 0;
  background: linear-gradient(90deg, var(--primary), #ff7b90);
}
.autoplay-bar.active { animation: autoplayFill 5s linear forwards; }
@keyframes autoplayFill { to { width: 100%; } }
.demo-progress {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}
.stats-strip {
  max-width: 900px;
  margin: 34px auto 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255,255,255,.78);
  box-shadow: var(--shadow-sm);
}
.stat-cell {
  padding: 18px;
  text-align: center;
  border-right: 1px solid var(--border);
}
.stat-cell:last-child { border-right: 0; }
.stat-n { color: var(--primary); font-size: 28px; font-weight: 720; }
.stat-l { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.progress-dot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: #fff;
}
.progress-dot span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d1d5db;
}
.progress-dot.active { color: var(--primary); border-color: #ffc4cf; background: var(--primary-soft); }
.progress-dot.active span { background: var(--primary); }

.article-page { max-width: 940px; margin: 0 auto; padding-top: 72px; }
.article-detail { max-width: 1180px; margin: 0 auto; padding-top: 48px; }
.article-shell {
  margin-top: 20px;
  padding: 34px;
  border: 1px solid var(--border);
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.article-hero { max-width: 780px; }
.article-hero h1 { font-size: clamp(32px, 4vw, 54px); }
.article-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 30px;
  margin-top: 24px;
}
.toc {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 8px;
  align-self: start;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff8fa;
}
.toc a { color: var(--muted); font-size: 14px; }
.toc a:hover { color: var(--primary); }
.article-body { color: #374151; font-size: 17px; line-height: 1.75; }
.article-body h1, .article-body h2, .article-body h3 { margin-top: 28px; }
.article-body p, .article-body li { color: #374151; }
.article-body img { max-width: 100%; height: auto; border-radius: 18px; }
.category-filter { max-width: 1220px; margin: 0 auto 18px; display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid #ffd0da;
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 12px;
  font-weight: 650;
}
.pill.opp { color: #047857; border-color: #bbf7d0; background: #ecfdf5; }

.app-view {
  min-height: 100vh;
  background:
    radial-gradient(circle at 86% 6%, rgba(230, 0, 35, .055), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 44%, #f6f8fb 100%);
}
.app-shell {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  min-height: 100vh;
}
.app-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 16px;
  border-right: 1px solid var(--border);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(18px);
}
.app-sidebar .brand { margin: 2px 8px 22px; }
.sidebar-nav { display: grid; gap: 7px; }
.sidebar-section-label {
  margin: 14px 10px 4px;
  color: #8b95a7;
  font-size: 11px;
  font-weight: 760;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.app-sidebar button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #344054;
  background: transparent;
  text-align: left;
  font-weight: 640;
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}
.app-sidebar button::before {
  content: none;
}
.app-sidebar .nav-icon {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  color: #667085;
  background: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .02em;
}
.app-sidebar button:hover {
  color: var(--primary);
  border-color: #ffd0da;
  background: #fff7f9;
  transform: translateX(1px);
}
.app-sidebar button.active {
  color: #101828;
  border-color: #ffd0da;
  background: linear-gradient(135deg, #fff, #fff4f6);
  box-shadow: 0 8px 24px rgba(230, 0, 35, .08);
}
.app-sidebar button.active .nav-icon {
  color: #fff;
  border-color: var(--primary);
  background: var(--primary);
}
.app-main {
  min-width: 0;
  padding: 22px clamp(18px, 3vw, 36px) 44px;
}
.app-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  margin: -22px calc(clamp(18px, 3vw, 36px) * -1) 28px;
  padding: 16px clamp(18px, 3vw, 36px);
  border-bottom: 1px solid var(--border);
  background: rgba(248,250,252,.88);
  backdrop-filter: blur(18px);
}
.app-home-link {
  min-height: 42px;
  padding-inline: 18px;
  border-color: #ffd0da;
  color: var(--primary);
  background: #fff;
}
.icon-button, .avatar {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: var(--primary);
  border: 1px solid #ffd0da;
  background: #fff;
  font-weight: 700;
}
.avatar {
  color: #fff;
  border: 0;
  background: linear-gradient(135deg, var(--primary), #ff5a72);
  box-shadow: var(--shadow-red);
}
.dashboard-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.workspace-score-card {
  width: min(280px, 100%);
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(17, 24, 39, .05);
}
.workspace-score-card span,
.workspace-score-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}
.workspace-score-card strong {
  display: inline-block;
  margin: 6px 8px 4px 0;
  color: var(--primary);
  font-size: 24px;
  line-height: 1;
}
.tool-head {
  display: block;
  margin-bottom: 22px;
}
.dashboard-header h1, .tool-head h1 { margin-bottom: 8px; font-size: clamp(26px, 2.1vw, 34px); font-weight: 700; }
.dashboard-header p, .tool-head p { max-width: 720px; margin: 0; }
.limit-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.limit-strip span {
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted);
  background: var(--bg);
  font-weight: 650;
}
.limit-strip b { color: var(--text); }
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.metric-grid article {
  position: relative;
  min-height: 118px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.metric-grid article::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 18px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 50%, var(--primary) 0 5px, transparent 6px),
    var(--primary-soft);
  border: 1px solid #ffd0da;
}
.metric-grid span { display: block; color: var(--muted); font-size: 13px; font-weight: 650; }
.metric-grid strong {
  display: block;
  margin: 14px 0 6px;
  color: var(--text);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.04em;
}
.metric-grid small { color: var(--muted); }
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, .82fr);
  gap: 18px;
}
.panel.wide { grid-column: 1 / -1; }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}
.panel h2 { font-size: 21px; margin-bottom: 10px; font-weight: 700; }
.keyword-report-panel h2,
.keyword-detail-panel h2,
.insight-rail .panel h2 {
  font-size: 18px;
  font-weight: 680;
}
.panel-subtitle {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.analytics-chart {
  height: 220px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff8fa, #fff);
}
.launcher-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.launcher-list button, .brief-item, .cluster-item {
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 16px;
  color: var(--text);
  background: #fff;
  text-align: left;
  font-weight: 650;
}
.launcher-list button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  column-gap: 12px;
  row-gap: 2px;
  align-items: center;
  min-height: 78px;
}
.launcher-list button > span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #fff;
  background: var(--primary);
  font-size: 11px;
  font-weight: 850;
}
.launcher-list button b { font-size: 14px; }
.launcher-list button small { color: var(--muted); font-weight: 600; }
.launcher-list button:hover { color: var(--primary); border-color: #ffc4cf; background: #fff8fa; }
.stack { display: grid; gap: 12px; }
.brief-item b, .brief-item span { display: block; }
.brief-item span { margin-top: 4px; color: var(--muted); font-weight: 650; }
.keyword-detail-panel .brief-item,
.insight-rail .brief-item,
.insight-rail .cluster-item {
  padding: 12px 0;
  border-width: 1px 0 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.keyword-detail-panel .stack,
.insight-rail .stack { gap: 0; }
.workflow-steps,
.intelligence-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.workflow-steps article,
.intelligence-grid article {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
}
.workflow-steps span {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-bottom: 12px;
  border-radius: 999px;
  color: #fff;
  background: var(--primary);
  font-weight: 800;
}
.workflow-steps b,
.intelligence-grid b,
.intelligence-grid span {
  display: block;
}
.workflow-steps small,
.intelligence-grid small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.55;
}
.intelligence-grid span {
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.score-ring {
  display: grid;
  place-items: center;
  width: 168px;
  height: 168px;
  margin: 10px auto;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 0 56%, transparent 57%),
    conic-gradient(var(--primary) 0 82%, #fee2e2 82% 100%);
}
.score-ring b { color: var(--primary); font-size: 38px; font-weight: 720; }
.score-ring span { color: var(--muted); font-size: 12px; font-weight: 650; }

.tool-form, .mini-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
  gap: 12px;
  margin-bottom: 18px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(17, 24, 39, .045);
}
.mini-form { grid-template-columns: minmax(0, 1fr) auto; padding: 0; border: 0; box-shadow: none; }
.switch {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--muted);
  background: #fff;
  font-weight: 650;
}
.switch input { width: auto; min-height: auto; box-shadow: none; }
#keywordForm {
  grid-template-columns: minmax(220px, 1.3fr) 150px 150px minmax(170px, .85fr);
  align-items: center;
}
#keywordForm input[type="text"] {
  min-height: 44px;
  border-radius: 12px;
  background: #fff;
  box-shadow: inset 0 0 0 1px #eef2f7;
}
#keywordForm .primary {
  min-height: 44px;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(230, 0, 35, .16);
}
.keyword-report-panel {
  border-color: #e8edf3;
  box-shadow: 0 18px 44px rgba(17, 24, 39, .055);
}
.research-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 18px;
}
.insight-rail { display: grid; gap: 18px; align-content: start; }
.table-actions { display: flex; gap: 10px; align-items: center; }
.table-wrap { width: 100%; overflow-x: auto; border-radius: 16px; }
table { width: 100%; border-collapse: collapse; min-width: 980px; }
th, td { padding: 12px 12px; border-bottom: 1px solid var(--border); text-align: left; font-size: 13px; }
th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; background: #fff8fa; }
td { color: #374151; }
.keyword-details-row td { padding-top: 0; background: #fff; }
.keyword-evidence {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, #fff8fa);
}
.keyword-evidence + .keyword-evidence { margin-top: 10px; }
.keyword-evidence span {
  display: grid;
  gap: 2px;
  min-height: 54px;
  padding: 10px;
  border-radius: 12px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  box-shadow: 0 8px 22px rgba(17, 24, 39, .04);
}
.keyword-evidence b { color: var(--ink); font-size: 12px; }
.keyword-evidence-soft { grid-template-columns: 1fr 1fr 1fr; }
.keyword-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 14px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.keyword-overview-grid article {
  min-width: 0;
  padding: 14px 16px;
  border: 0;
  border-right: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.keyword-overview-grid article:nth-child(3n) { border-right: 0; }
.keyword-overview-grid .overview-primary {
  background: transparent;
}
.keyword-overview-grid span,
.keyword-overview-grid small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}
.keyword-overview-grid strong {
  display: block;
  margin: 7px 0 3px;
  color: var(--text);
  font-size: 18px;
  font-weight: 680;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.kd-overview.easy strong,
.metric-tone.easy { color: #059669; }
.kd-overview.medium strong,
.metric-tone.medium { color: #d97706; }
.kd-overview.hard strong,
.metric-tone.hard { color: #dc2626; }
.keyword-intel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 16px;
  border-bottom: 1px solid var(--border);
}
.intel-card {
  min-width: 0;
  min-height: 0;
  padding: 14px 16px;
  border: 0;
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
}
.intel-card:nth-child(2n) { border-right: 0; }
.intel-card > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}
.intel-card > strong {
  display: block;
  margin: 6px 0 12px;
  color: var(--text);
  font-size: 16px;
  font-weight: 680;
  overflow-wrap: anywhere;
}
.intel-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.trend-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.trend-title-row > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}
.trend-title-row > b {
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}
.trend-up .trend-title-row > b { color: #047857; background: #ecfdf5; }
.trend-stable .trend-title-row > b { color: #b45309; background: #fffbeb; }
.trend-down .trend-title-row > b { color: #b91c1c; background: #fee2e2; }
.trend-card > strong {
  margin-bottom: 7px;
  font-size: 15px;
}
.trend-card > p {
  margin-top: 8px;
  color: #667085;
  font-size: 12px;
  line-height: 1.55;
}
.trend-sparkline {
  margin-top: 6px;
  color: var(--primary);
}
.trend-sparkline svg {
  display: block;
  width: 100%;
  height: 74px;
  padding: 4px 0;
  overflow: visible;
}
.trend-sparkline polyline {
  filter: drop-shadow(0 6px 10px rgba(5, 150, 105, .12));
}
.trend-sparkline circle {
  fill: #fff;
  stroke: currentColor;
  stroke-width: 2;
}
.trend-sparkline.up { color: #059669; }
.trend-sparkline.down { color: #dc2626; }
.trend-sparkline.stable { color: #f59e0b; }
.trend-sparkline-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: -4px;
  padding-top: 8px;
  border-top: 1px solid #eef2f7;
}
.trend-sparkline-meta span {
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}
.trend-sparkline-meta b {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}
.country-bars {
  display: grid;
  gap: 10px;
}
.country-bars span {
  display: grid;
  grid-template-columns: minmax(108px, .9fr) minmax(70px, 1fr) 38px;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
}
.country-bars b { color: #475467; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.country-flag {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 7px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 0 1px #e5e7eb;
  font-size: 13px;
  vertical-align: middle;
}
.country-bars i {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #059669 var(--w), #f1f5f9 var(--w));
}
.country-bars span:nth-child(2) i { background: linear-gradient(90deg, #10b981 var(--w), #f1f5f9 var(--w)); }
.country-bars span:nth-child(3) i { background: linear-gradient(90deg, #f59e0b var(--w), #f1f5f9 var(--w)); }
.country-bars span:nth-child(4) i { background: linear-gradient(90deg, #fb923c var(--w), #f1f5f9 var(--w)); }
.country-bars em { font-style: normal; font-weight: 700; color: #667085; }
.keyword-row {
  cursor: pointer;
  transition: background .16s ease, box-shadow .16s ease;
}
.keyword-row:hover,
.keyword-row.selected {
  background: #fff8fa;
}
.keyword-row.selected td:first-child {
  box-shadow: inset 4px 0 0 var(--primary);
}
.keyword-name-btn {
  display: block;
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: var(--text);
  background: transparent;
  text-align: left;
  font-size: 14px;
  font-weight: 680;
  white-space: normal;
}
.keyword-name-btn:hover {
  color: var(--primary);
  transform: none;
  box-shadow: none;
}
.keyword-row small {
  display: block;
  max-width: 360px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}
.kd-pill,
.trend-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.kd-pill.easy { color: #047857; background: #ecfdf5; }
.kd-pill.medium { color: #9a6d00; background: #fef3c7; }
.kd-pill.hard { color: #b91c1c; background: #fee2e2; }
.trend-chip.up { color: #047857; background: #ecfdf5; }
.trend-chip.down { color: #b91c1c; background: #fee2e2; }
.trend-chip.stable { color: #374151; background: #f3f4f6; }
.keyword-detail-panel {
  position: sticky;
  top: 18px;
}
.keyword-detail-panel h3 {
  margin-bottom: 14px;
  font-size: 18px;
  font-weight: 680;
  overflow-wrap: anywhere;
}
.keyword-detail-metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-bottom: 14px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.keyword-detail-metrics span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 650;
}
.keyword-detail-metrics span:last-child { border-bottom: 0; }
.keyword-detail-metrics b {
  display: inline-block;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.keyword-detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
.keyword-score-strip {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
  padding: 0 0 14px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
}
.keyword-score-strip span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  gap: 10px;
  align-items: center;
}
.keyword-score-strip i {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary) var(--w), #f1f5f9 var(--w));
}
.keyword-score-strip b {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}
.seo-copy {
  max-width: 1040px;
  margin: 28px auto;
  padding: 34px;
  border: 1px solid #ffd4dc;
  border-radius: 28px;
  background: linear-gradient(135deg, #fff, #fff7f9);
  box-shadow: var(--shadow-sm);
}
.seo-copy p {
  color: var(--muted);
  line-height: 1.8;
}
.seo-copy a {
  color: var(--primary);
  font-weight: 750;
  text-decoration: none;
}
.link-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}
.link-cloud a {
  padding: 10px 14px;
  border: 1px solid #ffd4dc;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(230, 0, 35, .06);
}
.authority-links {
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 14px;
}
.pin-score-card {
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #ffd4dc;
  border-radius: 24px;
  background: linear-gradient(135deg, #fff, #fff5f7);
}
.pin-score-gauge {
  width: 126px;
  height: 126px;
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 50%;
  background: conic-gradient(var(--primary) 0 86%, #ffe0e5 86% 100%);
  box-shadow: inset 0 0 0 16px #fff, 0 18px 35px rgba(230, 0, 35, .14);
}
.pin-score-gauge b {
  color: var(--primary);
  font-size: 32px;
}
.pin-score-gauge span {
  margin-top: -34px;
  color: var(--muted);
  font-size: 11px;
}
.pin-score-metrics {
  display: grid;
  gap: 8px;
}
.pin-score-metrics span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff;
  color: var(--muted);
  box-shadow: 0 8px 18px rgba(17, 24, 39, .04);
}
.pin-score-metrics b { color: var(--primary); }
.trend-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.trend-card {
  align-content: start;
  line-height: 1.55;
}
.trend-card > b {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
}
.trend-meta-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 10px;
  margin: 12px 0;
}
.trend-meta-list span {
  display: block;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.trend-meta-list b {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-size: 12px;
}
.score-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  margin: 12px 0;
}
.score-grid.compact .brief-item {
  min-width: 0;
  padding: 12px;
  overflow: hidden;
}
.score-grid.compact .brief-item b {
  display: block;
  max-width: 100%;
  font-size: 12px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pin-output, .analysis-output {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.result-card.prompt-card { grid-column: 1 / -1; }
.check-grid { display: grid; gap: 10px; }
.check-grid label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 650;
}
.check-grid input { width: auto; min-height: auto; }
.analysis-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.tool-card p { min-height: 76px; }
.preview-image { width: 100%; max-width: 100%; max-height: 380px; object-fit: contain; border-radius: 16px; border: 1px solid var(--border); }

.cms-layout {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 18px;
}
.cms-editor { display: grid; gap: 10px; }
.cms-list { display: grid; gap: 12px; align-content: start; }
.cms-card {
  display: grid;
  gap: 8px;
  padding: 18px;
}
.cms-card h3 { margin: 0; font-size: 18px; }
.cms-card small { color: var(--muted); }
.cms-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.admin-user-actions {
  min-width: 260px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.admin-user-actions input,
.admin-user-actions select {
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  font: inherit;
}
.admin-user-actions button { min-height: 38px; }
.cms-editor label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 650;
}

.auth-dialog, .loading-dialog {
  width: min(920px, calc(100vw - 28px));
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 0;
  background: #fff;
  box-shadow: var(--shadow-md);
}
.auth-dialog::backdrop, .loading-dialog::backdrop { background: rgba(17,24,39,.22); backdrop-filter: blur(8px); }
.dialog-close { position: absolute; right: 14px; top: 14px; z-index: 2; }
.dialog-close button { width: 36px; height: 36px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.auth-shell { display: grid; grid-template-columns: .9fr 1.1fr; min-height: 520px; }
.auth-art {
  padding: 34px;
  background:
    radial-gradient(circle at 20% 20%, rgba(230,0,35,.18), transparent 18rem),
    linear-gradient(135deg, #fff1f4, #fff);
}
.auth-bullets { display: flex; flex-wrap: wrap; gap: 8px; }
.auth-bullets span { padding: 8px 10px; border-radius: 999px; background: #fff; color: var(--primary); font-weight: 650; }
.auth-forms { padding: 44px 34px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; padding: 6px; border-radius: 16px; background: var(--bg); }
.tabs button { min-height: 42px; border-radius: 12px; background: transparent; color: var(--muted); font-weight: 650; }
.tabs button.active { background: #fff; color: var(--primary); box-shadow: var(--shadow-sm); }
.auth-form, .resend-form { display: none; gap: 12px; }
.auth-form.active, .resend-form:not(.hidden) { display: grid; }
.link-button { color: var(--primary); background: transparent; font-weight: 650; }
.form-note { margin: 0; font-size: 13px; }
.loading-dialog { width: min(460px, calc(100vw - 28px)); padding: 34px; text-align: center; }
.loader-ring {
  width: 54px;
  height: 54px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 4px solid #fee2e2;
  border-top-color: var(--primary);
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-bar { height: 8px; overflow: hidden; border-radius: 999px; background: #fee2e2; }
.loading-bar span { display: block; height: 100%; width: 42%; border-radius: inherit; background: var(--primary); animation: loading 1.1s ease-in-out infinite; }
@keyframes loading { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 200;
  max-width: 360px;
  padding: 14px 16px;
  border: 1px solid #ffc4cf;
  border-radius: 16px;
  color: var(--text);
  background: #fff;
  box-shadow: var(--shadow-md);
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  transition: .2s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
.skeleton {
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f3f4f6, #ffe4ea, #f3f4f6);
  background-size: 220% 100%;
  animation: shimmer 1.2s infinite linear;
}
@keyframes shimmer { to { background-position: -220% 0; } }
.fade-up { opacity: 0; transform: translateY(16px); transition: .42s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1100px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .keyword-overview-grid, .keyword-intel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .keyword-overview-grid article:nth-child(3n) { border-right: 1px solid var(--border); }
  .keyword-overview-grid article:nth-child(2n),
  .keyword-intel-grid .intel-card:nth-child(2n) { border-right: 0; }
  .site-footer { grid-template-columns: 1fr; }
  .site-footer nav { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
  .analysis-grid, .home-tools, .testimonial-grid, .blog-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .research-layout, .cms-layout { grid-template-columns: 1fr; }
  .tool-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #keywordForm { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool-form .primary { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .topbar { position: static; flex-wrap: wrap; padding-inline: 16px; }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav {
    display: none;
    order: 5;
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-sm);
  }
  .nav.open { display: grid; grid-template-columns: 1fr 1fr; }
  .top-actions { margin-left: auto; }
  .hero { padding-top: 42px; }
  .hero-search { flex-direction: column; }
  .hero-search .primary, .top-actions .primary, .top-actions .ghost { width: 100%; }
  .top-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; position: static; }
  .shot-grid { grid-template-columns: 1fr; min-height: auto; }
  .shot-nav { display: none; }
  .floating-card { display: none; }
  .home-band, .cta-panel, .site-footer, .dashboard-header, .tool-head { align-items: stretch; flex-direction: column; }
  .feature-matrix, .home-tools, .testimonial-grid, .blog-list, .dashboard-grid, .pin-output, .analysis-output, .analysis-grid, .article-layout, .panel-inner, .stats-strip, .keyword-evidence, .keyword-evidence-soft, .keyword-overview-grid, .keyword-intel-grid, .workflow-steps, .intelligence-grid, .trend-grid, .trend-meta-list, .score-grid.compact, .pin-score-card { grid-template-columns: 1fr; }
  .keyword-overview-grid article,
  .keyword-intel-grid .intel-card { border-right: 0; }
  .toc { position: static; }
  .panel-sidebar { display: none; }
  .keyword-detail-panel { position: static; }
  .keyword-detail-actions { grid-template-columns: 1fr; }
  .results-table { min-width: 560px; }
  .stat-cell { border-right: 0; border-bottom: 1px solid var(--border); }
  .stat-cell:last-child { border-bottom: 0; }
  .panel.wide, .result-card.prompt-card { grid-column: auto; }
  .app-shell { grid-template-columns: 1fr; }
  body.app-mode .app-drawer-toggle {
    display: inline-flex;
    position: fixed;
    z-index: 260;
    right: 16px;
    top: 16px;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid rgba(230, 0, 35, .18);
    border-radius: 999px;
    color: var(--primary);
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 16px 40px rgba(230, 0, 35, .16);
    backdrop-filter: blur(12px);
    font-weight: 800;
  }
  body.app-mode .app-drawer-toggle::before {
    content: "";
    width: 9px;
    height: 9px;
    margin-right: 8px;
    border-radius: 999px;
    background: var(--primary);
    box-shadow: 0 0 0 6px #fff1f4;
  }
  body.sidebar-open::before {
    display: none;
  }
  .app-sidebar {
    display: none;
    position: fixed;
    z-index: 250;
    inset: 74px 14px auto 14px;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    padding: 16px;
    border-right: 0;
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: 0 24px 70px rgba(17, 24, 39, .22);
    background: rgba(255,255,255,.98);
    backdrop-filter: none;
  }
  body.sidebar-open .app-sidebar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .app-sidebar .brand { grid-column: 1 / -1; margin: 0 4px 8px; }
  .app-main { padding: 16px; }
  .app-topbar {
    display: none;
  }
  .launcher-list, .metric-grid, .mini-metrics, .stat-grid { grid-template-columns: 1fr; }
  table { min-width: 680px; }
}

@media (max-width: 560px) {
  .page { padding-inline: 14px; }
  h1 { font-size: clamp(34px, 11vw, 46px); line-height: 1.04; }
  h2 { font-size: 28px; }
  .trend-title-row {
    align-items: flex-start;
    flex-direction: column;
  }
  .country-bars span {
    grid-template-columns: minmax(0, 1fr) 80px 34px;
  }
  .country-bars b {
    white-space: normal;
  }
  .label-row, .trust-row { align-items: stretch; flex-direction: column; }
  .article-shell { padding: 20px; }
  .demo-section { padding-inline: 0; }
  .browser-bar { align-items: stretch; flex-direction: column; }
  .browser-url { max-width: none; width: 100%; }
  .panel-content { padding: 18px; }
  .shot-main { padding: 16px; }
  .keyword-table { grid-template-columns: 1fr; }
  body.sidebar-open .app-sidebar { grid-template-columns: 1fr; }
  .tool-form, .mini-form { grid-template-columns: 1fr; }
  #keywordForm { grid-template-columns: 1fr; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .auth-forms { padding: 36px 20px; }
  .top-actions { grid-template-columns: 1fr; }
  .nav.open { grid-template-columns: 1fr; }
  .primary, .secondary, .ghost { width: 100%; }
}

/* ── Google OAuth button ── */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px 16px;
  border: 1.5px solid var(--border, #e5e7eb);
  border-radius: 12px;
  background: #fff;
  color: #111;
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: box-shadow .15s, border-color .15s;
  box-sizing: border-box;
}
.btn-google:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,.10);
  border-color: #bbb;
}
.btn-google--lg {
  padding: 15px 20px;
  font-size: 17px;
  border-radius: 14px;
  border-width: 2px;
  margin-top: 8px;
}
.btn-google--lg svg { width: 22px; height: 22px; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted, #9ca3af);
  font-size: 13px;
  margin: 4px 0;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border, #e5e7eb);
}

/* ── Google-only dialog layout ── */
.auth-dialog--google .auth-shell--google {
  grid-template-columns: 1fr 1fr;
  min-height: 380px;
}
.auth-forms--google {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 44px 38px;
  gap: 0;
}
.auth-welcome {
  font-size: 22px;
  font-weight: 750;
  color: var(--text, #111);
  margin: 0 0 8px;
}
.auth-sub {
  font-size: 14px;
  color: var(--muted, #6b7280);
  margin: 0 0 28px;
  line-height: 1.5;
}
.auth-terms {
  font-size: 12px;
  color: var(--muted, #9ca3af);
  text-align: center;
  margin: 14px 0 0;
}
.auth-terms a {
  color: var(--muted, #9ca3af);
  text-decoration: underline;
}
@media (max-width: 600px) {
  .auth-dialog--google .auth-shell--google { grid-template-columns: 1fr; }
  .auth-forms--google { padding: 32px 20px; }
}

/* Phase 1 conversion and public SEO landing upgrades */
.free-preview-section {
  max-width: 1120px;
  margin: 0 auto clamp(38px, 6vw, 72px);
  padding: 0 clamp(16px, 4vw, 24px);
}
.free-preview-copy {
  max-width: 780px;
  margin: 0 auto 20px;
  text-align: center;
}
.free-preview-copy h2 { margin-bottom: 10px; }
.free-preview-copy p { max-width: 680px; margin-inline: auto; }
.free-preview-card {
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid rgba(230, 0, 35, .16);
  border-radius: 24px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 24px 70px rgba(17, 24, 39, .08);
}
.free-preview-input label {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-weight: 700;
}
.free-preview-input > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}
.free-preview-input small {
  display: block;
  margin-top: 9px;
  color: var(--muted);
}
.free-preview-results { margin-top: 18px; }
.free-preview-empty {
  display: grid;
  gap: 4px;
  padding: 18px;
  border: 1px dashed #ffd0da;
  border-radius: 16px;
  background: #fff8fa;
}
.free-preview-empty span { color: var(--muted); }
.preview-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.preview-summary div {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
}
.preview-summary strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.preview-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}
.free-preview-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
}
.free-preview-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}
.free-preview-table th,
.free-preview-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}
.free-preview-table th {
  color: var(--muted);
  background: #fff8fa;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.free-preview-table tr:last-child td { border-bottom: 0; }
.score-pill,
.trend-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  color: #047857;
  background: #ecfdf5;
  font-size: 12px;
  font-weight: 750;
}
.trend-pill { color: var(--primary); background: var(--primary-soft); }
.free-preview-skeleton {
  display: grid;
  gap: 10px;
}
.free-preview-skeleton span {
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(90deg, #f3f4f6, #fff1f4, #f3f4f6);
  background-size: 220% 100%;
  animation: shimmer 1s linear infinite;
}
.free-preview-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #ffd0da;
  border-radius: 18px;
  background: #fff8fa;
}
.free-preview-cta span {
  color: var(--text);
  font-weight: 700;
}
@keyframes shimmer { to { background-position: -220% 0; } }
.seo-tool-page {
  background:
    radial-gradient(circle at 8% 8%, rgba(230, 0, 35, .09), transparent 28rem),
    linear-gradient(180deg, #fff 0%, #fff8fa 42%, var(--bg) 100%);
}
.seo-tool-shell { max-width: 1120px; margin: 0 auto; }
.seo-tool-hero,
.seo-tool-demo,
.seo-tool-grid,
.seo-tool-cta {
  margin-bottom: 22px;
  padding: clamp(20px, 4vw, 34px);
  border: 1px solid var(--border);
  border-radius: 26px;
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow-sm);
}
.seo-tool-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  gap: 24px;
  align-items: stretch;
}
.seo-tool-hero h1 {
  max-width: 760px;
  font-size: clamp(34px, 4.2vw, 58px);
}
.seo-tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}
.seo-tool-preview {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  border: 1px solid #ffd0da;
  border-radius: 22px;
  background: linear-gradient(180deg, #fff, #fff8fa);
}
.seo-tool-preview > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.seo-tool-preview > strong { font-size: 24px; }
.mini-metrics { display: grid; gap: 10px; }
.mini-metrics span,
.related-tool-links a,
.seo-faq details {
  display: block;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
}
.seo-tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.seo-tool-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}
.seo-tool-block {
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow-sm);
}
.seo-tool-block:first-child {
  grid-column: 1 / -1;
}
.tool-demo-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 12px 0 0;
  list-style: none;
}
.tool-demo-list.wide {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.tool-demo-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
}
.tool-demo-list strong {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 28px;
  border-radius: 999px;
  color: #047857;
  background: #ecfdf5;
  font-size: 12px;
}
.tool-preview-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin: 18px 0;
}
.tool-demo-output {
  margin-top: 12px;
}
.tool-result-grid,
.hashtag-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.tool-result-grid article,
.hashtag-groups article {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
}
.tool-result-grid article.wide,
.tool-result-grid .wide {
  grid-column: 1 / -1;
}
.tool-result-grid article span,
.hashtag-groups article span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.tool-result-grid article strong,
.hashtag-groups article strong {
  color: var(--text);
}
.tool-checklist {
  margin: 0;
  padding: 16px 18px 16px 34px;
  border: 1px solid #ffd0da;
  border-radius: 16px;
  background: #fff8fa;
  color: var(--text);
  line-height: 1.8;
}
.tool-page-footer {
  margin-top: 28px;
  padding-inline: 0;
}
.seo-tool-grid ol {
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.8;
}
.related-tool-links,
.seo-faq {
  display: grid;
  gap: 10px;
}
.related-tool-links a span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}
.seo-faq summary {
  color: var(--text);
  font-weight: 750;
  cursor: pointer;
}
.seo-faq p { margin: 10px 0 0; }
.seo-tool-cta { text-align: center; }
.seo-tool-cta p {
  max-width: 640px;
  margin-inline: auto;
}
@media (max-width: 860px) {
  html, body { max-width: 100%; overflow-x: hidden; }
  .hero { padding: 48px 0 42px; }
  .hero h1 { font-size: clamp(34px, 10vw, 46px); line-height: 1.08; }
  .hero-search,
  .free-preview-input > div,
  .free-preview-cta,
  .seo-tool-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .hero-search .primary,
  .hero-search .ghost,
  .hero-search input,
  .free-preview-input .primary,
  .free-preview-cta .primary,
  .seo-tool-actions .primary,
  .seo-tool-actions .ghost {
    width: 100%;
  }
  .preview-summary,
  .seo-tool-hero,
  .seo-tool-grid,
  .seo-tool-content,
  .tool-result-grid,
  .hashtag-groups {
    grid-template-columns: 1fr;
  }
  .tool-preview-form {
    grid-template-columns: 1fr;
  }
  .tool-preview-form .primary {
    width: 100%;
  }
  .seo-tool-block:first-child { grid-column: auto; }
  .nav-tools,
  .nav-tools-menu {
    position: static;
  }
  .nav-tools-trigger {
    width: 100%;
    justify-content: flex-start;
    background: #fff8fa;
  }
  .nav-tools-menu {
    display: grid;
    min-width: 0;
    margin-top: 8px;
    box-shadow: none;
  }
}
@media (max-width: 640px) {
  .free-preview-table {
    min-width: 0;
  }
  .free-preview-table thead {
    display: none;
  }
  .free-preview-table,
  .free-preview-table tbody,
  .free-preview-table tr,
  .free-preview-table td {
    display: block;
    width: 100%;
  }
  .free-preview-table tr {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
  }
  .free-preview-table td {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 8px 0;
    border: 0;
  }
  .free-preview-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
  }
}
@media (max-width: 430px) {
  .page { padding-inline: 14px; }
  .topbar { padding-inline: 14px; }
  .top-actions { gap: 8px; }
  .top-actions .ghost,
  .top-actions .primary {
    min-height: 42px;
    padding-inline: 12px;
  }
  .free-preview-section { padding-inline: 0; }
  .seo-tool-hero,
  .seo-tool-demo,
  .seo-tool-grid,
  .seo-tool-cta,
  .free-preview-card {
    border-radius: 20px;
  }
}
