/* ===============================
   CheckThemLinks — On-Page SEO Comparison
   SEMrush-inspired bright dashboard
   =============================== */

:root {
  /* Brand + accent */
  --accent: #FF642D;
  --accent-hover: #E85419;
  --accent-soft: #FFF1EA;
  --accent-line: #FFDCC7;

  /* Status colors */
  --good: #16A34A;
  --good-bg: #ECFDF3;
  --good-line: #B7EBC6;
  --bad: #DC2626;
  --bad-bg: #FEF2F2;
  --bad-line: #FDCDCD;
  --warn: #D97706;
  --warn-bg: #FFF7ED;
  --warn-line: #FCD9A8;
  --info: #2563EB;
  --info-bg: #EFF6FF;

  /* Grays (SEMrush is bright with light gray dividers) */
  --bg: #F7F8FA;
  --surface: #FFFFFF;
  --surface-alt: #F1F3F6;
  --border: #E4E7EC;
  --border-strong: #CBD1D9;
  --text: #101828;
  --text-2: #475467;
  --text-3: #667085;
  --text-dim: #98A2B3;

  /* Type + radius */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow: 0 2px 6px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-lg: 0 8px 24px rgba(16, 24, 40, 0.08);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ========== HEADER ========== */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand-word {
  font-size: 17px;
  line-height: 1;
  /* Optically center wordmark against the icon (bars are top-weighted in SVG). */
  position: relative;
  top: 1px;
}
.brand svg { display: block; flex-shrink: 0; }
.header-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.header-nav a {
  color: var(--text-2);
  font-weight: 500;
  font-size: 14px;
}
.header-nav a:hover {
  color: var(--text);
  text-decoration: none;
}

/* ========== HERO ========== */
.hero {
  position: relative;
  padding: 64px 0 56px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 900px 400px at 15% 10%, rgba(255, 100, 45, 0.08), transparent 60%),
    radial-gradient(ellipse 700px 300px at 90% 90%, rgba(37, 99, 235, 0.06), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero-copy { min-width: 0; }
.form-card { align-self: center; }
.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.hero h1 {
  margin: 14px 0 12px;
  font-size: 42px;
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 800;
}
.hero h1 .hl {
  background: linear-gradient(180deg, transparent 62%, var(--accent-line) 62%);
  padding: 0 4px;
}
.lede {
  font-size: 17px;
  color: var(--text-2);
  margin: 0 0 20px;
  max-width: 560px;
}
.hero-bullets {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hero-bullets li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-2);
  font-size: 15px;
}
.hero-bullets .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* ========== FORM CARD ========== */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-lg);
}
.form-title {
  margin: 0 0 20px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.field { display: block; margin-bottom: 16px; }
.field-label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 6px;
}
.field-label .optional {
  font-weight: 400;
  color: var(--text-dim);
  font-size: 12px;
}
.field input,
.field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea {
  resize: vertical;
  min-height: 84px;
  line-height: 1.45;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 100, 45, 0.12);
}
.field-hint {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 4px;
}
.form-error {
  color: var(--bad);
  font-size: 13px;
  margin: 12px 0 0;
  min-height: 18px;
}

/* ========== BUTTONS ========== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 20px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
  margin-top: 4px;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-primary .btn-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.btn-primary.loading .btn-spinner { display: inline-block; }
.btn-primary.loading .btn-text { opacity: 0.85; }
@keyframes spin { to { transform: rotate(360deg); } }

.btn-ghost {
  padding: 9px 14px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.btn-ghost:hover { background: var(--surface-alt); border-color: var(--text-3); }

/* ========== PROGRESS ========== */
.progress-section { padding: 60px 0; }
.progress-card {
  max-width: 640px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow);
  text-align: center;
}
.progress-card h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.progress-sub {
  color: var(--text-3);
  font-size: 14px;
  margin: 0 0 28px;
}
.stepper {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stepper li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 4px;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}
.stepper li.active {
  background: var(--accent-soft);
}
.stepper li.done {
  color: var(--text-3);
}
.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-alt);
  color: var(--text-2);
  font-weight: 700;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  transition: all 0.2s;
  flex-shrink: 0;
}
.stepper li.active .step-num {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.stepper li.done .step-num {
  background: var(--good);
  color: transparent;
  border-color: var(--good);
  position: relative;
}
.stepper li.done .step-num::after {
  content: '✓';
  color: #fff;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
}
.step-label {
  font-size: 15px;
  font-weight: 500;
}

/* ========== RESULTS ========== */
.results-section { padding: 40px 0 80px; }
.results-container { display: flex; flex-direction: column; gap: 20px; }

.results-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.results-header h2 {
  margin: 8px 0 14px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.url-pair {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  max-width: 720px;
}
.url-block {
  min-width: 0;
}
.url-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
  font-weight: 600;
  margin-bottom: 3px;
}
.url-mine .url-label { color: var(--accent); }
.url-theirs .url-label { color: var(--info); }
.url-block a {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.url-vs {
  font-weight: 700;
  color: var(--text-dim);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.header-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* ========== KPI CARDS ========== */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.kpi-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--accent);
}
.kpi-card.good::before { background: var(--good); }
.kpi-card.bad::before { background: var(--bad); }
.kpi-card.warn::before { background: var(--warn); }
.kpi-card.info::before { background: var(--info); }
.kpi-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.kpi-value {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 6px 0 4px;
}
.kpi-sub {
  font-size: 12px;
  color: var(--text-3);
}

/* ========== CARDS ========== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  gap: 16px;
}
.card-header h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.card-sub {
  font-size: 13px;
  color: var(--text-3);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* Chart wrappers */
.chart-wrap {
  position: relative;
  width: 100%;
  height: 280px;
}
.chart-bars { height: 340px; }
.chart-gauge {
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gauge-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -34%);
  text-align: center;
  pointer-events: none;
}
.gauge-value {
  font-size: 52px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text);
}
.gauge-label {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}
.chart-quickwins { height: 320px; }

/* Analysis card content */
.why-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.why-list li {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  font-size: 14px;
  line-height: 1.55;
  border-left: 3px solid var(--accent);
}
.why-list li.loading {
  color: var(--text-dim);
  border-left-color: var(--border-strong);
}

/* Meta rewrite */
.meta-rewrite { display: flex; flex-direction: column; gap: 12px; }
.meta-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
}
.meta-value {
  padding: 12px 14px;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  font-size: 14px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}
.meta-value:hover { background: var(--accent-soft); }
.meta-value::after {
  content: 'Click to copy';
  display: block;
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* Quick wins */
.quickwins-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
  align-items: start;
}
.quickwins-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
}
.quickwins-list li {
  padding: 10px 12px;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
}
.quickwins-list .qw-tags {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.qw-tag {
  padding: 2px 7px;
  font-size: 10.5px;
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.qw-tag.impact-high { background: var(--good-bg); color: var(--good); }
.qw-tag.impact-medium { background: var(--warn-bg); color: var(--warn); }
.qw-tag.impact-low { background: var(--surface-alt); color: var(--text-3); }
.qw-tag.effort-low { background: var(--good-bg); color: var(--good); }
.qw-tag.effort-medium { background: var(--warn-bg); color: var(--warn); }
.qw-tag.effort-high { background: var(--bad-bg); color: var(--bad); }

/* Brief grid */
.brief-summary {
  color: var(--text-2);
  font-size: 15px;
  margin: 0 0 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.brief-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
}
.brief-grid h4 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-3);
}
.chip-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip-list li {
  padding: 6px 10px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--accent-line);
}
.chip-list-small li { font-size: 12px; padding: 4px 8px; }
.goal-box {
  padding: 12px 14px;
  background: var(--good-bg);
  color: var(--good);
  border-radius: var(--radius-sm);
  border: 1px solid var(--good-line);
  font-weight: 600;
  font-size: 14px;
  margin: 0;
}

/* Internal linking opportunities */
.internal-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}
.internal-pick {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 14px;
  padding: 14px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.15s;
}
.internal-pick:hover { border-color: var(--accent); }
.internal-pick-idx {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}
.internal-pick-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.internal-pick-title {
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--text);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
}
.internal-pick-url {
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: none;
  word-break: break-all;
}
.internal-pick-url:hover { text-decoration: underline; }
.internal-pick-anchors {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.internal-pick-anchors-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.anchor-pills {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.anchor-pills li {
  padding: 4px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--text);
  font-family: var(--font-mono);
}

/* Backlink opportunities */
.link-opps-empty {
  padding: 24px;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  color: var(--text-3);
  font-size: 14px;
  text-align: center;
  margin: 0;
}
.link-opps-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.link-opps-table th {
  text-align: left;
  padding: 12px 14px;
  background: var(--surface-alt);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-3);
  border-bottom: 1px solid var(--border);
}
.link-opps-table td {
  padding: 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.5;
}
.link-opps-table tr:last-child td { border-bottom: none; }
.link-opps-table tr:hover td { background: var(--surface-alt); }
.opp-idx {
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.opp-site a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  word-break: break-all;
}
.opp-site a:hover { text-decoration: underline; }
.rank-pill {
  display: inline-block;
  padding: 3px 10px;
  background: var(--good-bg);
  color: var(--good);
  border: 1px solid var(--good-line);
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.opp-pitch {
  color: var(--text-2);
  font-size: 13px;
}

/* Compare table */
.table-wrap { overflow-x: auto; }
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.compare-table th {
  text-align: left;
  padding: 12px 14px;
  background: var(--surface-alt);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-3);
  border-bottom: 1px solid var(--border);
}
.compare-table th:first-child { border-top-left-radius: var(--radius-sm); }
.compare-table th:last-child { border-top-right-radius: var(--radius-sm); }
.compare-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.compare-table tr:last-child td { border-bottom: none; }
.compare-table tr:hover td { background: var(--surface-alt); }
.compare-table td.mine { font-weight: 600; }
.compare-table td.delta {
  font-family: 'SF Mono', ui-monospace, Menlo, Consolas, monospace;
  font-size: 13px;
}
.compare-table td.delta.up { color: var(--good); }
.compare-table td.delta.down { color: var(--bad); }
.status-pill {
  display: inline-block;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.status-pill.good { background: var(--good-bg); color: var(--good); }
.status-pill.bad { background: var(--bad-bg); color: var(--bad); }
.status-pill.warn { background: var(--warn-bg); color: var(--warn); }
.status-pill.neutral { background: var(--surface-alt); color: var(--text-3); }

/* Schema missing */
.schema-missing {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.schema-missing .schema-pill {
  padding: 6px 12px;
  background: var(--bad-bg);
  color: var(--bad);
  border: 1px solid var(--bad-line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

/* ========== HOW / FAQ ========== */
.how { padding: 80px 0 30px; }
.how-inner { text-align: center; }
.how h2 {
  margin: 12px 0 40px;
  font-size: 32px;
  letter-spacing: -0.02em;
  font-weight: 800;
}
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  text-align: left;
}
.how-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.how-num {
  font-family: 'SF Mono', ui-monospace, monospace;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.how-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
}
.how-card p {
  margin: 0;
  color: var(--text-2);
  font-size: 14.5px;
}

.faq { padding: 60px 0 100px; }
.faq h2 {
  margin: 12px 0 32px;
  font-size: 32px;
  letter-spacing: -0.02em;
  font-weight: 800;
}
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.faq summary {
  font-weight: 600;
  cursor: pointer;
  font-size: 15px;
  color: var(--text);
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  float: right;
  color: var(--accent);
  font-weight: 700;
  font-size: 20px;
  line-height: 1;
}
.faq details[open] summary::after { content: '−'; }
.faq details p {
  margin: 12px 0 0;
  color: var(--text-2);
  font-size: 14.5px;
}

/* ========== FOOTER ========== */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 32px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.brand-footer { font-size: 15px; }
.brand-footer .brand-word { font-size: 15px; }
.footer-tag {
  color: var(--text-3);
  font-size: 13px;
  margin: 6px 0 0;
}
.footer-meta {
  display: grid;
  gap: 8px;
  color: var(--text-3);
  font-size: 13px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .hero h1 { font-size: 34px; }
  .kpi-row { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .brief-grid { grid-template-columns: 1fr; }
  .quickwins-grid { grid-template-columns: 1fr; }
  .how-grid { grid-template-columns: 1fr; }
  .results-header { flex-direction: column; }
  .header-actions { width: 100%; }
  .header-actions button { flex: 1; }
  .url-pair { grid-template-columns: 1fr; }
  .url-vs { justify-self: start; }
}
@media (max-width: 560px) {
  .hero { padding: 32px 0; }
  .hero h1 { font-size: 28px; }
  .kpi-row { grid-template-columns: 1fr; }
  .kpi-value { font-size: 26px; }
  .form-card { padding: 20px; }
  .card { padding: 18px; }
  .header-nav { display: none; }
}

/* ========== HERO PREVIEW MINI DASHBOARD ========== */
.hero-preview {
  margin-top: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 6px 20px rgba(16, 24, 40, 0.06);
  position: relative;
}
.hero-preview::before {
  content: "";
  position: absolute;
  top: -1px; left: -1px; right: -1px; bottom: -1px;
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(255, 100, 45, 0.25), transparent 40%, rgba(37, 99, 235, 0.18));
  z-index: -1;
  filter: blur(8px);
  opacity: 0.6;
}
.hero-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border);
}
.preview-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.preview-tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.4); }
}
.preview-url {
  font-size: 12px;
  color: var(--text-2);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  background: var(--surface-alt);
  padding: 3px 8px;
  border-radius: 4px;
}
.hero-preview-grid {
  display: grid;
  grid-template-columns: 130px 1fr;
  grid-template-rows: auto auto;
  gap: 12px;
}
.mini-card {
  background: var(--surface-alt);
  border-radius: 10px;
  padding: 12px;
}
.mini-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.mini-gauge {
  grid-row: 1;
  grid-column: 1;
  display: flex;
  flex-direction: column;
}
.mini-gauge-wrap {
  position: relative;
  flex: 1;
  min-height: 96px;
}
.mini-gauge-wrap canvas {
  width: 100% !important;
  height: 100% !important;
}
.mini-gauge-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  pointer-events: none;
}
.mini-gauge-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1;
}
.mini-radar {
  grid-row: 1;
  grid-column: 2;
}
.mini-radar-wrap {
  height: 120px;
}
.mini-radar-wrap canvas {
  width: 100% !important;
  height: 100% !important;
}
.mini-kpi-row {
  grid-row: 2;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.mini-kpi {
  background: var(--surface-alt);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
}
.mini-kpi-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.mini-kpi-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-top: 2px;
  line-height: 1;
}
.mini-kpi-sub {
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 2px;
}
.mini-kpi-accent {
  background: rgba(255, 100, 45, 0.08);
}
.mini-kpi-accent .mini-kpi-value {
  color: var(--accent);
}

/* ========== NAV CTA ========== */
.header-nav .nav-cta {
  background: var(--accent);
  color: #fff !important;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
}
.header-nav .nav-cta:hover {
  background: var(--accent-hover);
  color: #fff !important;
}

/* ========== SAMPLE REPORT SHOWCASE ========== */
.sample {
  padding: 80px 0 40px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.sample-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 40px;
}
.sample-head h2 {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 12px 0;
}
.sample-lede {
  font-size: 16px;
  color: var(--text-2);
  margin: 0;
}
.sample-showcase {
  max-width: 1000px;
  margin: 0 auto 60px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(16, 24, 40, 0.12), 0 6px 20px rgba(16, 24, 40, 0.06);
  border: 1px solid var(--border);
  background: white;
}
.sample-showcase img {
  display: block;
  width: 100%;
  height: auto;
}
.sample-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1080px;
  margin: 0 auto;
}
.feat {
  padding: 24px;
  background: var(--surface-alt);
  border-radius: 12px;
  border: 1px solid var(--border);
}
.feat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.feat-icon svg { width: 20px; height: 20px; }
.feat h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.feat p {
  font-size: 14px;
  color: var(--text-2);
  margin: 0;
  line-height: 1.5;
}

/* ========== HOW VISUAL ========== */
.how-visual {
  max-width: 720px;
  margin: 48px auto 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(16, 24, 40, 0.12), 0 6px 20px rgba(16, 24, 40, 0.06);
  border: 1px solid var(--border);
  background: white;
}
.how-visual img {
  display: block;
  width: 100%;
  height: auto;
}

/* ========== CTA STRIP ========== */
.cta-strip {
  background: linear-gradient(135deg, #1a1f2e 0%, #0f172a 100%);
  color: white;
  padding: 56px 0;
  margin-top: 40px;
}
.cta-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-inner h2 {
  font-size: 30px;
  font-weight: 800;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
  color: white;
}
.cta-inner p {
  margin: 0;
  color: rgba(255,255,255,0.7);
  font-size: 15px;
}
.btn-primary-inline {
  width: auto !important;
  padding: 14px 28px !important;
  margin: 0 !important;
  font-size: 15px !important;
  text-decoration: none !important;
  color: white !important;
  white-space: nowrap;
}

/* ========== RESPONSIVE OVERRIDES ========== */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 32px;
    align-items: start;
  }
  .form-card { align-self: start; }
  .hero-preview {
    margin-top: 24px;
  }
  .hero-preview-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }
  .mini-gauge { grid-column: 1; grid-row: 1; }
  .mini-radar { grid-column: 1; grid-row: 2; }
  .mini-kpi-row { grid-column: 1; grid-row: 3; }
  .sample-features {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .sample-head h2 { font-size: 26px; }
  .cta-inner { flex-direction: column; text-align: center; align-items: stretch; }
  .cta-inner h2 { font-size: 24px; }
  .btn-primary-inline { width: 100% !important; }
}

/* ========== ACCESSIBILITY ========== */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  position: fixed;
  left: 8px;
  top: 8px;
  width: auto;
  height: auto;
  background: var(--text);
  color: white;
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  z-index: 1000;
  text-decoration: none;
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ============ FORM LIMIT NOTE + HISTORY LINK ============ */

.form-limit {
  margin: 8px 0 0;
  font-size: 12.5px;
  color: var(--muted, #6b7280);
  text-align: center;
  font-weight: 500;
}

.form-history {
  margin: 14px 0 0;
  font-size: 13.5px;
  color: var(--muted, #6b7280);
  text-align: center;
}

.link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: #FF642D;
  font-weight: 600;
  font-size: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-family: inherit;
}

.link-btn:hover { color: #E5501C; }
.link-btn:focus-visible { outline: 2px solid #FF642D; outline-offset: 2px; border-radius: 2px; }

/* ============ MODAL ============ */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 5vh 20px 20px;
}
.modal.is-open { display: flex; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
}

.modal-panel {
  position: relative;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 640px;
  max-height: 88vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalPop 180ms ease-out;
}

@keyframes modalPop {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid #EEF0F3;
}

.modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #0F172A;
}

.modal-close {
  background: transparent;
  border: 0;
  padding: 6px;
  cursor: pointer;
  color: #6b7280;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover { background: #F5F6F8; color: #0F172A; }

.modal-body {
  padding: 20px 22px 22px;
  overflow-y: auto;
}

.modal-lede {
  margin: 0 0 14px;
  color: #4B5563;
  font-size: 14px;
  line-height: 1.5;
}

.history-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ============ HISTORY RESULTS LIST ============ */

.history-results {
  margin-top: 18px;
  border-top: 1px solid #EEF0F3;
  padding-top: 16px;
}

.history-empty {
  margin: 8px 0 0;
  color: #6b7280;
  font-size: 14px;
  text-align: center;
  padding: 20px 10px;
}

.history-summary {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  margin-bottom: 10px;
}

.history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-row { margin: 0; }

.history-item {
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: border-color 120ms, box-shadow 120ms, background 120ms;
}

.history-item:hover:not(:disabled) {
  border-color: #FF642D;
  background: #FFF7F2;
  box-shadow: 0 2px 8px rgba(255, 100, 45, 0.08);
}

.history-item:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.history-item.is-loading {
  opacity: 0.6;
  pointer-events: none;
}

.history-item-main {
  flex: 1;
  min-width: 0;
}

.history-keyword {
  font-weight: 600;
  color: #0F172A;
  font-size: 14.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

.history-urls {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: #6b7280;
  min-width: 0;
}

.history-host {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.history-vs {
  color: #9CA3AF;
  font-weight: 600;
  font-size: 11px;
}

.history-item-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.history-score {
  background: #FFF1EA;
  color: #C2410C;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.history-status {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.history-status.is-complete { background: #ECFDF5; color: #047857; }
.history-status.is-failed { background: #FEF2F2; color: #B91C1C; }
.history-status.is-partial { background: #FEF3C7; color: #92400E; }

.history-date {
  font-size: 11.5px;
  color: #6b7280;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .history-item {
    flex-direction: column;
    align-items: flex-start;
  }
  .history-item-meta {
    width: 100%;
    justify-content: space-between;
  }
  .modal-panel {
    max-height: 92vh;
  }
}

/* ============ DISCLAIMER ============ */

.form-trust {
  margin: 10px 0 0;
  text-align: center;
}

.form-disclaimer {
  margin: 10px 0 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: #94A3B8;
  text-align: center;
  font-style: italic;
}

.report-disclaimer {
  margin: 28px 0 0;
  padding: 14px 18px;
  background: #F8FAFC;
  border: 1px solid #E5E7EB;
  border-left: 3px solid #FF642D;
  border-radius: 8px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: #475569;
  font-size: 13px;
  line-height: 1.55;
}

.report-disclaimer strong {
  color: #0F172A;
  font-weight: 700;
}

.disclaimer-icon {
  color: #FF642D;
  flex-shrink: 0;
  margin-top: 1px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.disclaimer-body {
  flex: 1;
}

@media (max-width: 640px) {
  .report-disclaimer {
    padding: 12px 14px;
    font-size: 12.5px;
  }
}
