:root {
  --sp-primary: #0284c7;
  --sp-primary-hover: #0369a1;
  --sp-bg-card: #ffffff;
  --sp-border: #e2e8f0;
  --sp-text-main: #0f172a;
  --sp-text-muted: #64748b;
  --sp-pill-bg: #f1f5f9;
  --sp-pill-hover: #e2e8f0;
  --sp-result-bg: #f8fafc;
  --sp-serp-blue: #1a0dab;
}

.sp-tool-container {
  max-width: 900px;
  margin: 0 auto 3rem auto;
  font-family: inherit;
  color: var(--sp-text-main);
}

.sp-editor-card {
  background: var(--sp-bg-card);
  border: 1px solid var(--sp-border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.sp-presets-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--sp-border);
}

.sp-presets-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--sp-text-muted);
}

.sp-pill-btn {
  background: var(--sp-pill-bg);
  border: 1px solid var(--sp-border);
  color: var(--sp-text-main);
  border-radius: 9999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.sp-pill-btn:hover {
  background: var(--sp-pill-hover);
  border-color: var(--sp-primary);
}

.sp-view-toggle {
  display: flex;
  gap: 1.5rem;
  background: var(--sp-pill-bg);
  padding: 0.65rem 1rem;
  border-radius: 8px;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.sp-view-toggle label {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.sp-field {
  margin-bottom: 1.25rem;
}

.sp-field-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}

.sp-field label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--sp-text-main);
}

.sp-meter-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--sp-primary);
}

.sp-req {
  color: #dc2626;
}

.sp-field input,
.sp-field textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--sp-border);
  border-radius: 8px;
  background: var(--sp-bg-card);
  color: var(--sp-text-main);
  font-size: 0.95rem;
  font-family: inherit;
  box-sizing: border-box;
}

.sp-field input:focus,
.sp-field textarea:focus {
  outline: none;
  border-color: var(--sp-primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.sp-bar-track {
  height: 6px;
  background: var(--sp-pill-bg);
  border-radius: 9999px;
  overflow: hidden;
  margin-top: 0.35rem;
}

.sp-bar-fill {
  height: 100%;
  border-radius: 9999px;
  background: #10b981;
  transition: width 0.2s ease, background 0.2s ease;
}

.sp-action-row {
  display: flex;
  gap: 0.75rem;
}

.sp-primary-btn {
  flex: 2;
  background: var(--sp-primary);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}

.sp-primary-btn:hover {
  background: var(--sp-primary-hover);
}

.sp-secondary-btn {
  background: var(--sp-pill-bg);
  color: var(--sp-text-main);
  border: 1px solid var(--sp-border);
  border-radius: 8px;
  padding: 0.85rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.sp-results-card {
  background: var(--sp-result-bg);
  border: 1px solid var(--sp-border);
  border-radius: 12px;
  padding: 1.75rem;
}

.sp-sub-title {
  font-size: 0.95rem;
  font-weight: 800;
  margin: 0 0 1rem 0;
  color: var(--sp-text-main);
}

/* Simulated Google SERP card */
.sp-serp-preview {
  background: var(--sp-bg-card);
  border: 1px solid var(--sp-border);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  font-family: Arial, sans-serif;
}

.sp-serp-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}

.sp-serp-favicon {
  width: 26px;
  height: 26px;
  background: var(--sp-pill-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.sp-serp-urls {
  display: flex;
  flex-direction: column;
}

.sp-serp-site {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--sp-text-main);
}

.sp-serp-breadcrumb {
  font-size: 0.75rem;
  color: var(--sp-text-muted);
}

.sp-serp-title {
  font-size: 20px;
  line-height: 1.3;
  color: var(--sp-serp-blue);
  margin: 0 0 0.4rem 0;
  cursor: pointer;
}

.sp-serp-title:hover {
  text-decoration: underline;
}

.sp-serp-desc {
  font-size: 14px;
  line-height: 1.45;
  color: var(--sp-text-muted);
  margin: 0;
}

.sp-specs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
  .sp-specs-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .sp-specs-grid {
    grid-template-columns: 1fr;
  }
}

.sp-spec-item {
  background: var(--sp-bg-card);
  border: 1px solid var(--sp-border);
  border-radius: 10px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sp-spec-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--sp-text-muted);
}

.sp-spec-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--sp-text-main);
}

.sp-spec-sub {
  font-size: 0.75rem;
  color: var(--sp-text-muted);
}

.sp-tip-box {
  background: var(--sp-bg-card);
  border: 1px solid var(--sp-border);
  border-radius: 8px;
  padding: 1.25rem;
}

.sp-tip-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0 0 0.25rem 0;
  color: var(--sp-primary);
}

.sp-tip-box p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--sp-text-muted);
  line-height: 1.5;
}

.sp-ad {
  overflow: hidden;
  min-height: 280px;
  margin: 32px 0;
  text-align: center;
}
/* tf:dark-palette — generated by migrate_chrome.py */
/* Neutrals inherit the shared chrome tokens so all tools share one
   ground; brand hues are kept and lightened, never inverted. */
[data-theme="dark"] {
  --sp-primary: #81bcda;
  --sp-primary-hover: #69aed4;
  --sp-bg-card: var(--tf-surface);
  --sp-border: var(--tf-surface);
  --sp-text-main: var(--tf-ink);
  --sp-text-muted: var(--tf-ink-faint);
  --sp-pill-bg: var(--tf-surface);
  --sp-pill-hover: var(--tf-surface);
  --sp-result-bg: var(--tf-surface);
  --sp-serp-blue: #8179d8;
}
