/* Sober, editorial palette — dashboard + app chrome */
:root {
  --bg: #0a0a0b;
  --bg-elevated: #141415;
  --bg-hover: #1e1e20;
  --border: rgba(255, 255, 255, 0.055);
  --border-strong: rgba(255, 255, 255, 0.1);
  --text: #f5f5f5;
  --text-muted: #a3a3a3;
  --text-faint: #737373;
  --accent: #d4d4d4;
  --accent-2: #a3a3a3;
  --accent-dim: rgba(255, 255, 255, 0.06);
  --accent-hover: #fafafa;
  --danger-bg: rgba(239, 68, 68, 0.12);
  --danger-text: #fca5a5;
  --success-bg: rgba(34, 197, 94, 0.12);
  --success-text: #86efac;
  --radius: 10px;
  --radius-sm: 6px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --shadow: 0 20px 56px rgba(0, 0, 0, 0.35);
}

body.landing {
  --bg: #090909;
  --bg-elevated: #111111;
  --bg-hover: #1a1a1a;
  --border: rgba(255, 255, 255, 0.05);
  --border-strong: rgba(255, 255, 255, 0.095);
  --text: #f5f5f5;
  --text-muted: #9ca3af;
  --text-faint: #6b7280;
  --shadow: 0 20px 48px rgba(0, 0, 0, 0.32);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

body.landing::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 85% 55% at 50% -15%, rgba(255, 255, 255, 0.035), transparent 52%),
    #090909;
  pointer-events: none;
  z-index: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
}

.landing-shell {
  position: relative;
  z-index: 1;
  padding-bottom: 48px;
}

.landing-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 12px 18px;
  background: #f5f5f5;
  color: #0a0a0a;
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--radius-sm);
  z-index: 1000;
}

.skip-link:focus {
  left: 24px;
  top: 16px;
}

.skip-link:focus-visible {
  outline: 2px solid #f5f5f5;
  outline-offset: 3px;
}

/* ——— Sticky nav ——— */
.landing-header-wrap {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(9, 9, 9, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.landing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 24px;
}

.law-logo {
  flex-shrink: 0;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  color: var(--text);
  text-decoration: none;
}

.law-logo:hover {
  color: var(--text);
}

.law-logo span {
  color: var(--text-muted);
  font-weight: 600;
}

.law-logo--footer {
  font-size: 1.5rem;
}

.landing-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 32px;
  flex: 1;
  min-width: 0;
  flex-wrap: nowrap;
}

.landing-nav-primary {
  display: flex;
  align-items: center;
  gap: 6px 26px;
  flex-wrap: wrap;
}

.landing-nav-primary a {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text-muted);
  text-decoration: none;
}

.landing-nav-primary a:hover {
  color: var(--text);
}

.landing-nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.landing-nav-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  transition: border-color 0.15s, background 0.15s;
}

.landing-nav-login:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.03);
}

.landing-nav-login--drawer {
  width: 100%;
  justify-content: center;
}

.btn-nav-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 0.03em !important;
  text-decoration: none !important;
  color: #0a0a0a !important;
  background: #ebebeb !important;
  border: 1px solid #ebebeb !important;
  border-radius: var(--radius-sm) !important;
  transition: background 0.15s, border-color 0.15s !important;
}

.btn-nav-primary:hover {
  background: #f5f5f5 !important;
  border-color: #f5f5f5 !important;
  color: #0a0a0a !important;
}

.btn-nav-primary--block {
  width: 100%;
}

.landing-nav-drawer-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.landing-nav-toggle {
  display: none;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  align-items: center;
  justify-content: center;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.landing-nav-toggle::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  box-shadow: 0 -6px 0 var(--text), 0 6px 0 var(--text);
}

@media (max-width: 960px) {
  .landing-nav {
    display: none;
  }

  .landing-nav-toggle {
    display: flex;
  }
}

.landing-nav-drawer {
  padding: 16px 24px 22px;
  border-bottom: 1px solid var(--border);
  background: rgba(9, 9, 9, 0.97);
}

.landing-nav-drawer:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.landing-nav-drawer[hidden] {
  display: none !important;
}

.landing-nav-drawer a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
}

.landing-nav-drawer a:hover {
  color: var(--text);
}

/* ——— Hero ——— */
.landing-hero {
  padding: 48px 0 72px;
}

.landing-hero-grid {
  display: grid;
  gap: 40px;
  align-items: start;
}

@media (min-width: 960px) {
  .landing-hero-grid {
    grid-template-columns: 1fr minmax(300px, 420px);
    gap: 56px;
    padding-top: 16px;
    align-items: start;
  }
}

.landing-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.landing-kicker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-faint);
  opacity: 0.85;
}

.landing-hero-title {
  margin: 0 0 22px;
  font-size: clamp(2.35rem, 5.5vw, 3.45rem);
  font-weight: 600;
  letter-spacing: -0.032em;
  line-height: 1.07;
  max-width: min(28ch, 100%);
  color: var(--text);
}

.landing-hero-auth-wrap {
  scroll-margin-top: 88px;
}

@media (max-width: 959px) {
  .landing-hero-auth-wrap {
    order: -1;
  }
}

.landing-hero-auth-eyebrow {
  margin-bottom: 8px;
}

.landing-hero-auth-title {
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.landing-hero-auth-lede {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted);
}

.landing-hero-auth-wrap .auth-card {
  padding: 24px;
  box-shadow: var(--shadow);
}

@media (min-width: 960px) {
  .landing-hero-auth-wrap .auth-card {
    padding: 26px 28px;
  }
}

.landing-lede {
  margin: 0 0 28px;
  max-width: 52ch;
  color: var(--text-muted);
  font-size: 1.125rem;
  line-height: 1.65;
}

.landing-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 32px;
}

.btn-lg {
  padding: 14px 26px !important;
  font-size: 15px !important;
}

body.landing .btn-primary {
  background: #ebebeb;
  color: #0a0a0a;
  border: 1px solid #ebebeb;
}

body.landing .btn-primary:hover {
  background: #f5f5f5;
  border-color: #f5f5f5;
  color: #0a0a0a;
}

.landing-trust {
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.landing-trust-score {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  font-size: 14px;
  color: var(--text-muted);
}

.landing-trust-mark {
  width: 36px;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

.landing-trust-note {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--text-faint);
}

.landing-hero-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: none;
}

.landing-hl-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 6px;
}

.landing-hero-highlights {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.landing-hero-highlights li {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.landing-hero-highlights li:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.landing-hl-value {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.45;
}

/* ——— Sections ——— */
.landing-section {
  padding: 72px 0;
}

.landing-section--surface {
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.landing-eyebrow {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.landing-section-title {
  margin: 0 0 16px;
  font-size: clamp(1.65rem, 3.2vw, 2.15rem);
  font-weight: 600;
  letter-spacing: -0.028em;
  line-height: 1.18;
}

.landing-section-lede {
  margin: 0 0 40px;
  max-width: 62ch;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.landing-section-lede--tight {
  margin-bottom: 32px;
}

.landing-practice-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .landing-practice-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .landing-practice-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.practice-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 24px;
  transition: border-color 0.2s;
}

.practice-card:hover {
  border-color: rgba(255, 255, 255, 0.11);
}

.practice-card-title {
  margin: 0 0 10px;
  font-size: 1.05rem;
  font-weight: 600;
}

.practice-card p {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
}

.landing-services-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .landing-services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .landing-services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.svc-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.svc-card-title {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.svc-card p {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
}

.landing-proof-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .landing-proof-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.proof-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.proof-metric {
  margin: 0 0 12px;
  font-size: clamp(2.1rem, 3.8vw, 2.55rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text);
}

.proof-cap {
  margin: 0 0 18px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

.proof-link {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  padding-bottom: 1px;
  align-self: flex-start;
}

.proof-link:hover {
  color: var(--text);
  border-bottom-color: rgba(255, 255, 255, 0.35);
}

.landing-split {
  display: grid;
  gap: 40px;
}

@media (min-width: 900px) {
  .landing-split {
    grid-template-columns: 1fr 380px;
    align-items: start;
    gap: 56px;
  }
}

.landing-checklist {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.landing-checklist li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 18px;
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.55;
}

.landing-checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-strong);
}

.landing-roadmap {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}

.landing-roadmap-title {
  margin: 0 0 18px;
  font-size: 1rem;
  font-weight: 600;
}

.landing-roadmap-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.landing-roadmap-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

.landing-roadmap-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.landing-roadmap-list span {
  display: block;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 4px;
}

.landing-cta-band {
  padding: 64px 0;
  background: #0c0c0c;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.landing-cta-inner {
  text-align: center;
  max-width: 640px;
}

.landing-cta-title {
  margin: 0 0 14px;
  font-size: clamp(1.55rem, 2.8vw, 1.95rem);
  font-weight: 600;
  letter-spacing: -0.025em;
}

.landing-cta-text {
  margin: 0 0 26px;
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.btn-cta-contrast {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

.auth-copy .landing-eyebrow {
  margin-bottom: 14px;
}

.auth-copy h2 {
  font-size: clamp(1.6rem, 2.5vw, 2rem);
}

.auth-copy code.landing-inline-code,
.landing-inline-code {
  font-family: var(--mono);
  font-size: 13px;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
}

.btn-primary:hover {
  background: #e4e4e7;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.btn-outline:hover {
  background: var(--bg-hover);
}

/* ——— Auth panel (hero + dashboard) ——— */
.auth-copy h2 {
  margin: 0 0 12px;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.auth-copy p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.auth-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.auth-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 24px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.auth-tab {
  flex: 1;
  padding: 10px 16px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.auth-tab:hover {
  color: var(--text);
}

.auth-tab[aria-selected="true"] {
  background: var(--bg-hover);
  color: var(--text);
}

.auth-google {
  margin-bottom: 20px;
}

.btn-google {
  width: 100%;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.btn-google:hover {
  background: var(--bg-hover);
}

.btn-google-icon {
  flex-shrink: 0;
}

.auth-alt-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.auth-alt-divider::before,
.auth-alt-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-alt-divider span {
  flex-shrink: 0;
}

.auth-panel[hidden] {
  display: none;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-faint);
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:focus {
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.field input::placeholder {
  color: var(--text-faint);
}

.form-footer {
  margin-top: 20px;
}

.form-footer .btn {
  width: 100%;
}

.alert {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 20px;
}

.alert-error {
  background: var(--danger-bg);
  color: var(--danger-text);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.alert-success {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.muted-hint {
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-faint);
  text-align: center;
}

.landing-footer-wide {
  margin-top: 48px;
  padding-top: 56px;
  border-top: 1px solid var(--border);
  background: #090909;
}

.landing-footer-grid {
  display: grid;
  gap: 36px;
  grid-template-columns: 1fr;
  padding-bottom: 40px;
}

@media (min-width: 768px) {
  .landing-footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
  }
}

.landing-footer-brand p {
  margin: 14px 0 0;
  max-width: 34ch;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
}

.landing-footer-heading {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.landing-footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.landing-footer-links li + li {
  margin-top: 10px;
}

.landing-footer-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}

.landing-footer-links a:hover {
  color: var(--text);
}

.landing-footer-bar {
  padding: 22px 24px 40px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-faint);
}

/* ——— Dashboard (matches sober landing chrome) ——— */
body.dashboard {
  background: #090909;
  color: var(--text);
  position: relative;
}

body.dashboard::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 85% 55% at 50% -15%, rgba(255, 255, 255, 0.035), transparent 52%),
    #090909;
  pointer-events: none;
  z-index: 0;
}

.dashboard-shell {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 100vh;
  grid-template-columns: 260px 1fr;
}

@media (max-width: 768px) {
  .dashboard-shell {
    grid-template-columns: 1fr;
  }
}

.dash-sidebar {
  border-right: 1px solid var(--border);
  padding: 28px 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #111111;
}

@media (min-width: 769px) {
  .dash-sidebar {
    position: sticky;
    top: 0;
    align-self: start;
    min-height: 100vh;
  }
}

@media (max-width: 768px) {
  .dash-sidebar {
    flex-direction: column;
    align-items: stretch;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 20px 18px;
    min-height: 0;
    position: relative;
  }

  .dash-brand {
    margin-bottom: 8px;
  }

  .dash-nav {
    flex-direction: row;
    flex-wrap: wrap;
    margin-bottom: 12px;
  }

  .dash-nav a.active {
    border-left: none;
    padding-left: 12px;
    box-shadow: inset 0 -2px 0 rgba(255, 255, 255, 0.22);
  }

  .dash-user {
    margin-top: 0;
  }
}

.dash-brand.law-logo {
  display: block;
  margin-bottom: 22px;
  padding: 4px 12px;
  text-decoration: none;
}

.dash-brand.law-logo:hover {
  color: var(--text);
}

.dash-brand.law-logo:focus-visible {
  outline: 2px solid rgba(245, 245, 245, 0.35);
  outline-offset: 3px;
  border-radius: 4px;
}

.dash-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dash-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border-left: 2px solid transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.dash-nav a:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.dash-nav a.active {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-left-color: rgba(245, 245, 245, 0.35);
  padding-left: 10px;
}

.dash-user {
  margin-top: auto;
  padding: 16px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #141415;
}

.dash-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.dash-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border-strong);
}

.dash-user-avatar--placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.dash-user-meta {
  min-width: 0;
}

.dash-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-user-email {
  font-size: 11px;
  color: var(--text-faint);
  word-break: break-all;
  margin-top: 2px;
  line-height: 1.35;
}

.dash-user .btn-logout {
  width: 100%;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-family: inherit;
  color: #0a0a0a;
  background: #ebebeb;
  border: 1px solid #ebebeb;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.dash-user .btn-logout:hover {
  background: #f5f5f5;
  border-color: #f5f5f5;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
}

.btn-text {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-text:hover {
  color: var(--text);
}

.profile-avatar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
}

.profile-avatar-preview {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-strong);
}

.profile-avatar-preview--empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.profile-avatar-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.profile-inline-form {
  margin: 0;
}

.profile-upload-label {
  cursor: pointer;
  margin: 0;
}

.profile-upload-label input:focus-visible + *,
.profile-upload-label:focus-within {
  outline: 2px solid rgba(245, 245, 245, 0.35);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.profile-upload-hint {
  margin: 0;
  font-size: 12px;
  color: var(--text-faint);
}

.profile-form .field {
  max-width: 400px;
}

.profile-form .form-footer .btn {
  width: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
}

.auth-forgot {
  margin: -4px 0 12px;
  font-size: 13px;
}

.auth-forgot a {
  color: var(--text-muted);
}

.auth-forgot a:hover {
  color: var(--text);
}

.auth-standalone {
  min-height: 100vh;
}

.auth-standalone-main {
  padding: 24px 24px 80px;
}

.auth-card--narrow {
  max-width: 420px;
  margin-inline: auto;
}

.auth-standalone-title {
  margin: 0 0 12px;
  font-size: 1.5rem;
  font-weight: 600;
}

.admin-table-wrap {
  overflow-x: auto;
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-table th,
.admin-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.admin-table th {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  background: rgba(255, 255, 255, 0.03);
}

.admin-table tbody tr:last-child td {
  border-bottom: none;
}

.admin-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.dash-main {
  padding: 40px 48px 56px;
  overflow-x: hidden;
  max-width: 1180px;
  width: 100%;
  margin-inline: auto;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .dash-main {
    padding: 28px 20px 40px;
    max-width: none;
  }
}

.dash-top {
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.dash-top h1 {
  margin: 0 0 10px;
  font-size: clamp(1.45rem, 2.5vw, 1.85rem);
  font-weight: 600;
  letter-spacing: -0.028em;
}

.dash-top p {
  margin: 0;
  max-width: 54ch;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
}

.dash-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.stat-card {
  background: #111111;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 24px;
  transition: border-color 0.15s;
  box-shadow: none;
}

.stat-card:hover {
  border-color: rgba(255, 255, 255, 0.11);
}

.stat-card .label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 10px;
}

.stat-card .value {
  font-size: clamp(1.6rem, 2.5vw, 1.85rem);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.stat-card .hint {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
}

.dash-panel {
  margin-top: 28px;
  background: #111111;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 26px 28px;
  box-shadow: none;
}

.dash-panel h2 {
  margin: 0 0 18px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.dash-panel ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text-muted);
  font-size: 14px;
}

.dash-panel li + li {
  margin-top: 8px;
}

.dash-panel code {
  font-family: var(--mono);
  font-size: 13px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
}

.dash-panel-lead {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
}

.dash-item-list {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #111111;
}

.dash-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}

.dash-item:last-child {
  border-bottom: none;
}

.dash-item-title {
  font-weight: 600;
  font-size: 15px;
}

.dash-item-meta {
  font-size: 13px;
  color: var(--text-muted);
}

.dash-settings-dl {
  margin: 0;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px 24px;
  font-size: 14px;
}

.dash-settings-dl dt {
  margin: 0;
  color: var(--text-faint);
  font-weight: 500;
}

.dash-settings-dl dd {
  margin: 0;
  color: var(--text-muted);
}

@media (max-width: 520px) {
  .dash-settings-dl {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .dash-settings-dl dd {
    margin-bottom: 12px;
  }
}

/* ——— Landing pricing strip ——— */
.landing-tier-band {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  padding: 36px 0;
}

.landing-tier-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.landing-tier-label {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.landing-tier-price-line {
  margin: 0 0 10px;
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text);
}

.landing-tier-dollar {
  font-size: 0.65em;
  font-weight: 600;
  vertical-align: super;
  margin-right: 2px;
  color: var(--text-muted);
}

.landing-tier-meta {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

/* ——— Paywall ——— */
body.paywall::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 85% 55% at 50% -15%, rgba(255, 255, 255, 0.035), transparent 52%),
    #090909;
  pointer-events: none;
  z-index: 0;
}

.paywall-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.paywall-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  border-bottom: 1px solid var(--border);
  background: rgba(9, 9, 9, 0.92);
  backdrop-filter: blur(12px);
}

.paywall-logo {
  text-decoration: none;
}

.paywall-signout {
  margin: 0;
}

.paywall-signout-btn {
  padding: 9px 16px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.paywall-signout-btn:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.22);
}

.paywall-main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 24px 72px;
}

.paywall-layout {
  width: 100%;
  max-width: 1020px;
  display: grid;
  gap: 36px;
  align-items: start;
}

@media (min-width: 900px) {
  .paywall-layout {
    grid-template-columns: 1fr minmax(340px, 400px);
    gap: 48px;
    padding-top: 12px;
  }
}

.paywall-intro {
  padding-top: 8px;
}

.paywall-intro .paywall-eyebrow {
  margin-bottom: 16px;
}

.paywall-intro .paywall-title {
  margin: 0 0 18px;
  font-size: clamp(1.75rem, 3.5vw, 2.35rem);
  font-weight: 600;
  letter-spacing: -0.028em;
  line-height: 1.15;
  max-width: 22ch;
}

.paywall-intro .paywall-lede {
  margin: 0 0 26px;
  max-width: 52ch;
}

.paywall-intro-list {
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}

.paywall-intro-list li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 14px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

.paywall-intro-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.48em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
}

.paywall-microcopy {
  margin: 0;
  font-size: 13px;
  color: var(--text-faint);
}

.paywall-microcopy strong {
  color: var(--text-muted);
  font-weight: 500;
}

.paywall-checkout-card {
  background: #111111;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.paywall-checkout-inner {
  padding: 32px 28px 34px;
}

.paywall-plan-name {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.paywall-price-badge {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text);
}

.paywall-plan-note {
  margin: 0 0 22px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
}

.paywall-paypal-wrap {
  position: relative;
  margin-top: 2px;
  min-height: 128px;
}

.paywall-paypal-wrap .paywall-paypal {
  position: relative;
  z-index: 2;
  min-height: 0;
}

.paywall-paypal-loading {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 12px;
  padding: 10px 0 14px;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.28s ease;
}

.paywall-paypal-wrap--ready .paywall-paypal-loading {
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.28s ease,
    visibility 0s linear 0.28s;
}

.paywall-paypal-loading-bar {
  height: 48px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(
    105deg,
    rgba(255, 255, 255, 0.03) 0%,
    rgba(255, 255, 255, 0.07) 42%,
    rgba(255, 255, 255, 0.03) 100%
  );
  background-size: 180% 100%;
  animation: paywall-paypal-shimmer 1.35s ease-in-out infinite;
}

.paywall-paypal-loading-text {
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--text-faint);
  text-align: center;
}

@keyframes paywall-paypal-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .paywall-paypal-loading-bar {
    animation: none;
    background-position: 0 0;
  }
}

.paywall-paypal iframe {
  border-radius: var(--radius-sm) !important;
}

.paywall-hint {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.paywall-hint--error {
  color: var(--danger-text);
}

.paywall-placeholder-box {
  padding: 20px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-strong);
  background: rgba(255, 255, 255, 0.02);
}

.paywall-placeholder-box p {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
}

.paywall-placeholder-box p:last-child {
  margin-bottom: 0;
}

.paywall-placeholder-sub {
  font-size: 13px !important;
  color: var(--text-faint) !important;
}

.paywall-fake-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

.paywall-fake-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: #ebebeb;
  color: #0a0a0a;
}

.paywall-fake-btn--muted {
  background: #2c2e2f;
  color: #fff;
}

.dash-sub-meta {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-faint);
  word-break: break-all;
}

.seo-field-micro {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.4;
}

.seo-firm-pin-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 8px;
}

.seo-firm-pin-status {
  font-size: 12px;
  color: var(--text-faint);
  flex: 1 1 140px;
  min-width: 0;
}

.seo-audit-live-wrap {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.seo-workspace-layout .seo-panel--accent .seo-audit-live-panel {
  margin-bottom: 0;
}

/* Overview · loading overlay + background audit live panel */
.seo-dash-minimal {
  margin-bottom: 16px;
}

.seo-dash-minimal-title {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* VetBill dashboard (SEO/map UI hidden via VETBILL_DASHBOARD) */
.vetbill-dash-top {
  margin-bottom: 20px;
}

.vetbill-dash-title {
  margin: 0 0 10px;
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.vetbill-dash-lede {
  margin: 0;
  max-width: 62ch;
}

.vetbill-dash-placeholder .vetbill-dash-checklist {
  margin: 16px 0 0;
  padding-left: 1.25rem;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
}

.vetbill-dash-placeholder .vetbill-dash-checklist li {
  margin-bottom: 8px;
}

.vetbill-dash-placeholder .vetbill-dash-checklist li:last-child {
  margin-bottom: 0;
}

.seo-audit-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(10, 10, 11, 0.72);
  backdrop-filter: blur(8px);
}

.seo-audit-loading-overlay[hidden] {
  display: none !important;
}

.seo-audit-loading-card {
  max-width: 380px;
  width: 100%;
  padding: 28px 26px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
  text-align: center;
}

.seo-audit-loading-spinner {
  width: 36px;
  height: 36px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 3px solid var(--border-strong);
  border-top-color: var(--accent-hover);
  animation: seo-audit-spin 0.85s linear infinite;
}

@keyframes seo-audit-spin {
  to {
    transform: rotate(360deg);
  }
}

.seo-audit-loading-title {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 600;
}

.seo-audit-loading-sub {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.seo-audit-live-panel {
  margin-bottom: 20px;
}

.seo-live-heading {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
}

.seo-live-status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 12px;
}

.seo-live-status-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid var(--border);
  background: var(--bg-hover);
  color: var(--text-muted);
}

.seo-live-status-chip--queued {
  color: var(--text);
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.35);
}

.seo-live-status-chip--running {
  color: var(--accent-hover);
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.28);
}

.seo-live-status-chip--done {
  color: var(--success-text);
  background: var(--success-bg);
  border-color: transparent;
}

.seo-live-status-chip--failed {
  color: var(--danger-text);
  background: var(--danger-bg);
  border-color: transparent;
}

.seo-live-elapsed {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--text-faint);
}

.seo-live-log-details {
  margin-top: 4px;
}

.seo-live-log-summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin-bottom: 8px;
  list-style: none;
}

.seo-live-log-details .seo-live-log-summary::-webkit-details-marker {
  display: none;
}

.seo-live-intro {
  margin: 0 0 14px;
}

.seo-live-progress-bar--initial {
  width: 0%;
}

.seo-live-progress-track {
  height: 8px;
  border-radius: 999px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  overflow: hidden;
}

.seo-live-progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-2), var(--accent-hover));
  transition: width 0.35s ease;
}

.seo-live-pending .seo-live-progress-bar {
  width: 22% !important;
  animation: seo-live-progress-pulse 1.2s ease-in-out infinite;
}

@keyframes seo-live-progress-pulse {
  0%,
  100% {
    opacity: 0.55;
    transform: scaleX(0.92);
  }

  50% {
    opacity: 1;
    transform: scaleX(1);
  }
}

.seo-live-progress-meta {
  margin: 10px 0 14px;
  font-size: 14px;
  color: var(--text-muted);
}

.seo-live-status-note {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--danger-text);
}

.seo-live-log {
  margin: 0;
  max-height: 220px;
  overflow: auto;
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-muted);
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  white-space: pre-wrap;
  word-break: break-word;
}

.seo-bg-option {
  padding-top: 0;
}

/* Overview · SEO workspace + Leaflet */
.seo-workspace-layout {
  display: grid;
  gap: 20px;
}

@media (min-width: 960px) {
  .seo-workspace-layout {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.seo-muted {
  color: var(--text-muted);
  font-size: 14px;
}

.seo-label-hint {
  font-weight: 400;
  color: var(--text-faint);
  font-size: 13px;
}

.seo-form-actions {
  margin-top: 8px;
}

.seo-audit-form {
  color-scheme: dark;
}

.seo-field-grid > .field {
  margin-bottom: 0;
}

.seo-audit-form .seo-grid-options {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.seo-audit-form .seo-bg-option {
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.seo-audit-form .field textarea {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  outline: none;
  resize: vertical;
  min-height: 132px;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.22);
}

.seo-audit-form .field textarea:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.seo-audit-form .field textarea:focus {
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.22),
    0 0 0 3px var(--accent-dim);
}

.seo-audit-form .field textarea::placeholder {
  color: var(--text-faint);
  font-family: var(--font);
}

.seo-audit-form .field select {
  width: 100%;
  max-width: min(280px, 100%);
  padding: 11px 40px 11px 14px;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.4;
  color: var(--text);
  background-color: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}

.seo-audit-form .field select:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.seo-audit-form .field select:focus {
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.seo-grid-options .seo-grid-rings-field {
  margin-bottom: 0;
}

.seo-map-controls {
  margin-bottom: 12px;
}

.seo-map-controls-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}

@media (min-width: 640px) {
  .seo-map-controls-row {
    flex-direction: row;
    align-items: flex-end;
  }

  .seo-map-search-field {
    flex: 1;
    min-width: 0;
  }

  .seo-map-use-center {
    flex-shrink: 0;
    white-space: nowrap;
  }
}

.seo-map-search-wrap {
  position: relative;
}

.seo-map-place-search {
  width: 100%;
}

.seo-map-search-hint {
  margin: 6px 0 0;
  font-size: 13px;
}

.seo-geocode-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 1000;
  margin: 0;
  padding: 4px;
  list-style: none;
  max-height: 240px;
  overflow-y: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
}

.seo-geocode-option {
  display: block;
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  text-align: left;
  font: inherit;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.seo-geocode-option:hover,
.seo-geocode-option:focus-visible {
  background: var(--bg-hover);
  outline: none;
}

.seo-geocode-option--active {
  background: var(--bg-hover);
}

.seo-firm-autocomplete-wrap .seo-geocode-suggestions {
  max-height: 280px;
}

.seo-firm-autocomplete-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 4px;
}

.seo-firm-suggest-main {
  font-weight: 600;
  line-height: 1.3;
}

.seo-firm-suggest-sub {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.35;
  font-weight: 400;
}

.seo-overview-map {
  height: 380px;
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-hover);
  margin-bottom: 16px;
}

.seo-geo-fields {
  display: grid;
  gap: 14px;
}

.seo-geo-fields .field.seo-field-span2 {
  grid-column: 1 / -1;
}

.seo-radius-slider-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 8px 0 10px;
}

.seo-radius-slider {
  flex: 1;
  min-width: 0;
  height: 8px;
  accent-color: var(--accent, #2563eb);
}

.seo-radius-value {
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 14px;
  min-width: 4.75rem;
  text-align: right;
}

.seo-radius-exact-label {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.seo-radius-mi-number {
  margin-top: 6px;
  max-width: 8rem;
}

@media (min-width: 520px) {
  .seo-geo-fields {
    grid-template-columns: 1fr 1fr;
  }
}

.seo-summary-tables {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.seo-kw-title {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 600;
}

.seo-our-rank {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--text-muted);
}

.seo-table-caption {
  margin: 14px 0 8px;
  font-size: 13px;
}

.seo-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.seo-rank-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.seo-rank-table--snapshot {
  table-layout: fixed;
}

.seo-rank-table--snapshot .seo-col-rank {
  width: 5.25rem;
}

.seo-rank-table--snapshot .seo-col-business {
  width: 44%;
}

.seo-rank-table--snapshot .seo-col-website {
  width: 36%;
}

.seo-rank-table--snapshot .seo-col-maps {
  width: 6.5rem;
}

.seo-business-stack {
  display: grid;
  gap: 6px 28px;
  align-items: start;
  min-width: 0;
}

.seo-cell-business .seo-cell-title {
  font-weight: 600;
}

@media (min-width: 720px) {
  .seo-business-stack {
    grid-template-columns: minmax(0, 38%) minmax(0, 1fr);
  }

  .seo-business-stack .seo-cell-title {
    grid-column: 1;
    grid-row: 1;
  }

  .seo-business-stack .seo-cell-sub {
    grid-column: 2;
    grid-row: 1;
  }
}

.seo-cell-website {
  vertical-align: top;
  word-break: break-word;
}

.seo-website-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  min-width: 0;
}

.seo-results-board .seo-website-inline .seo-host {
  display: inline;
  margin: 0;
  font-size: 13px;
}

.seo-cell-maps {
  vertical-align: middle;
  white-space: nowrap;
}

.seo-rank-table th,
.seo-rank-table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.seo-rank-table th {
  color: var(--text-muted);
  font-weight: 500;
  background: var(--bg-hover);
}

.seo-rank-table tr:last-child td {
  border-bottom: none;
}

.seo-rank-table--compact td {
  vertical-align: top;
}

.leaflet-container {
  font-family: var(--font);
}

.seo-rank-badge {
  background: transparent;
  border: none;
}

.seo-rank-badge span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: #dc2626;
  border: 2px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.seo-map-popup {
  font-size: 13px;
  line-height: 1.45;
}

/* Overview hero & Maps workspace polish */
.seo-dash-hero {
  display: grid;
  gap: 22px;
  margin-bottom: 8px;
}

@media (min-width: 900px) {
  .seo-dash-hero {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    align-items: start;
  }
}

.seo-dash-eyebrow {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.seo-dash-hero-text h1 {
  margin: 0 0 10px;
}

.seo-dash-lead {
  margin: 0;
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 62ch;
}

.seo-dash-meta {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--text-faint);
}

.seo-dash-highlights {
  margin: 0;
  padding: 18px 20px;
  list-style: none;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.seo-dash-highlights li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.seo-dash-highlights li:last-child {
  margin-bottom: 0;
}

.seo-hl-dot {
  position: absolute;
  left: 0;
  top: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.65;
}

.seo-panel-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.seo-panel-title {
  margin: 0 0 4px;
  font-size: 17px;
}

.seo-panel-sub {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.seo-panel-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: linear-gradient(145deg, var(--bg-hover), var(--bg-elevated));
}

.seo-panel-icon--search {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.seo-panel-icon--search::after {
  content: "";
  display: block;
  margin: 10px auto;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
}

.seo-panel-icon--pin::after {
  content: "";
  display: block;
  margin: 8px auto 0;
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 12px solid var(--accent);
  opacity: 0.75;
}

.seo-panel--accent {
  border-color: rgba(255, 255, 255, 0.07);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03);
}

.seo-panel-bullets {
  margin: 0 0 18px;
  padding-left: 18px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
}

.seo-field-grid {
  display: grid;
  gap: 12px;
}

@media (min-width: 560px) {
  .seo-field-grid {
    grid-template-columns: 1fr 1fr;
  }

  .seo-field-span2 {
    grid-column: 1 / -1;
  }
}

.seo-results-board {
  margin-top: 22px;
}

.seo-results-board-title {
  margin: 0 0 8px;
  font-size: 20px;
}

.seo-results-board-lead {
  margin: 0 0 14px;
  max-width: 75ch;
}

.seo-tooling-callout {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
}

.seo-tooling-callout-summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  list-style: none;
}

.seo-tooling-callout-summary::-webkit-details-marker {
  display: none;
}

.seo-tooling-callout-body {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.seo-tooling-callout-body p:last-child {
  margin-bottom: 0;
}

.seo-kw-card-at-a-glance {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 10px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 14px;
  line-height: 1.45;
}

.seo-at-a-glance-rank {
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.seo-at-a-glance-rank--hit {
  color: var(--success-text);
}

.seo-at-a-glance-rank--miss {
  color: var(--text-muted);
}

.seo-at-a-glance-text {
  flex: 1 1 200px;
  color: var(--text-muted);
  min-width: 0;
}

.seo-rank-table-shell {
  max-height: min(420px, 55vh);
  overflow: auto;
}

.seo-rank-table-shell .seo-rank-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bg-elevated);
  box-shadow: 0 1px 0 var(--border);
}

.seo-rank-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.seo-you-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-hover);
  background: rgba(59, 130, 246, 0.14);
  border: 1px solid rgba(59, 130, 246, 0.28);
}

.seo-rank-pill--you {
  background: rgba(59, 130, 246, 0.18);
  border-color: rgba(59, 130, 246, 0.4);
  color: var(--text);
}

.seo-row-highlight {
  background: rgba(59, 130, 246, 0.09);
  box-shadow: inset 3px 0 0 var(--accent-hover);
}

.seo-kw-card-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}

.seo-kw-card {
  padding: 18px 18px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.seo-kw-card-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}

.seo-kw-card-title {
  margin: 0;
  font-size: 16px;
}

.seo-kw-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.seo-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  background: var(--bg-hover);
  border: 1px solid var(--border);
}

.seo-chip--accent {
  color: var(--success-text);
  background: var(--success-bg);
  border-color: transparent;
}

.seo-chip--warn {
  color: var(--danger-text);
  background: var(--danger-bg);
  border-color: transparent;
}

.seo-your-rank-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  font-size: 14px;
}

.seo-your-rank-banner--hit {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.22);
}

.seo-your-rank-banner--miss {
  background: rgba(251, 191, 36, 0.06);
  border: 1px solid rgba(251, 191, 36, 0.2);
}

.seo-your-rank-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.seo-your-rank-value {
  flex: 1 1 auto;
  font-weight: 600;
  color: var(--text);
}

.seo-your-rank-link {
  font-size: 13px;
  font-weight: 500;
}

.seo-table-wrap--raised {
  border-color: var(--border-strong);
}

.seo-col-rank {
  min-width: 5.5rem;
  width: auto;
  vertical-align: middle;
}

.seo-rank-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  background: var(--bg-hover);
  border: 1px solid var(--border-strong);
}

.seo-rank-pill--muted {
  opacity: 0.75;
}

.seo-cell-title {
  font-weight: 500;
  color: var(--text);
}

.seo-cell-sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-faint);
  line-height: 1.45;
}

.seo-cell-nowrap {
  white-space: nowrap;
  font-size: 13px;
}

.seo-host {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.seo-muted-inline {
  color: var(--text-faint);
}

.seo-empty-panel {
  margin-top: 22px;
  text-align: center;
  padding: 28px 20px;
}

.seo-empty-title {
  margin: 0 0 10px;
}

/* Geo grid UI — must beat `.field label` (display block / font-size) */
.field label.seo-check-label {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
  margin-bottom: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-muted);
  cursor: pointer;
  text-align: left;
}

.field label.seo-check-label > span {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.field label.seo-check-label .seo-check-input {
  margin-top: 2px;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  cursor: pointer;
  accent-color: #e4e4e7;
}

.seo-grid-options-row {
  display: grid;
  gap: 12px;
}

@media (min-width: 640px) {
  .seo-grid-options-row {
    grid-template-columns: 160px 1fr;
    align-items: start;
  }
}

.seo-grid-rings-field select {
  width: 100%;
}

.seo-grid-hint {
  margin: 0;
  font-size: 13px;
}

.seo-grid-report {
  margin-top: 22px;
}

.seo-grid-report-title {
  margin: 0 0 10px;
  font-size: 18px;
}

.seo-grid-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  margin: 14px 0 18px;
  font-size: 12px;
  color: var(--text-muted);
}

.seo-grid-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.seo-legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
}

.seo-legend-swatch--high {
  background: #22c55e;
}

.seo-legend-swatch--mid {
  background: #ca8a04;
}

.seo-legend-swatch--low {
  background: #ef4444;
}

.seo-legend-swatch--na {
  background: #ef4444;
}

.seo-report-export-panel .seo-panel-title {
  font-size: 17px;
}

.seo-report-export-grid {
  display: grid;
  gap: 22px;
}

@media (min-width: 720px) {
  .seo-report-export-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.seo-save-report-form .field {
  margin-bottom: 12px;
}

.seo-report-export-links .btn {
  margin-right: 10px;
  margin-bottom: 8px;
}

.seo-export-links-label {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
}

.seo-report-actions-cell {
  white-space: normal;
}

.seo-report-actions-cell .btn-sm {
  margin-right: 6px;
  margin-bottom: 4px;
}

.seo-grid-details {
  margin-top: 10px;
}

.seo-grid-summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
}

.seo-grid-table-wrap {
  margin-top: 12px;
}

.seo-grid-marker {
  background: transparent !important;
  border: none !important;
}

.seo-grid-marker span,
.seo-grid-marker .seo-grid-pin-face {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 6px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
}

.seo-grid-pin--high span,
.seo-grid-pin--high .seo-grid-pin-face {
  background: linear-gradient(145deg, #4ade80, #22c55e);
}

.seo-grid-pin--mid span,
.seo-grid-pin--mid .seo-grid-pin-face {
  background: linear-gradient(145deg, #facc15, #ca8a04);
}

.seo-grid-pin--low span,
.seo-grid-pin--low .seo-grid-pin-face {
  background: linear-gradient(145deg, #f87171, #dc2626);
}

.seo-grid-pin--na span,
.seo-grid-pin--na .seo-grid-pin-face {
  background: linear-gradient(145deg, #f87171, #dc2626);
}

.seo-grid-popup {
  font-size: 13px;
  line-height: 1.45;
  min-width: 180px;
}

.seo-grid-popup-coords {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
}

.seo-grid-popup-kw {
  font-size: 13px;
  margin-bottom: 6px;
}

.seo-grid-popup-our-rank {
  margin: 10px 0 6px;
  font-size: 14px;
  line-height: 1.4;
}

.seo-grid-popup-link {
  margin-top: 10px;
  font-size: 12px;
}

.seo-grid-popup-row--line {
  display: block;
  font-size: 13px;
  line-height: 1.45;
}

.seo-grid-popup-pos-n {
  font-weight: 600;
  color: var(--text-muted);
}

.seo-grid-popup-ours-mark {
  font-weight: 700;
  color: var(--accent, #2563eb);
  white-space: nowrap;
}

.seo-grid-popup-pack {
  margin-top: 10px;
  max-height: 220px;
  overflow-y: auto;
  border-top: 1px solid var(--border, #e2e8f0);
  padding-top: 8px;
}

.seo-grid-popup-pack-hdr {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.seo-grid-popup-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 12px;
  padding: 4px 6px;
  margin: 0 -4px;
  border-radius: 6px;
}

.seo-grid-popup-row--ours {
  background: rgba(37, 99, 235, 0.1);
  outline: 1px solid rgba(37, 99, 235, 0.35);
}

.seo-grid-popup-pos {
  flex: 0 0 1.5rem;
  font-family: var(--mono);
  font-weight: 600;
  color: var(--text-muted);
}

.seo-grid-popup-line {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.seo-grid-popup-title {
  font-weight: 500;
  line-height: 1.35;
}

.seo-grid-popup-host {
  font-size: 11px;
  color: var(--text-muted);
  word-break: break-all;
}

.seo-grid-popup-you {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent, #2563eb);
  white-space: nowrap;
}

/* App-level modal layer (outside dashboard / map DOM; avoids Leaflet + overflow clipping) */
.seo-modal-layer {
  position: static;
}

/* Grid point modal (full-width results) */
body.seo-grid-modal-open {
  overflow: hidden;
}

.seo-grid-modal[hidden] {
  display: none !important;
}

.seo-grid-modal {
  position: fixed;
  inset: 0;
  z-index: 200000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

.seo-grid-modal-backdrop {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: none;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
}

.seo-grid-modal-panel {
  position: relative;
  z-index: 1;
  width: min(1100px, 100%);
  max-height: min(92vh, 900px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

.seo-grid-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--border);
}

.seo-grid-modal-title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.02em;
  padding-right: 8px;
}

.seo-grid-modal-close {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  margin: -8px -6px 0 0;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
  background: transparent;
}

.seo-grid-modal-close:hover {
  color: var(--text);
  background: var(--bg-hover);
}

.seo-grid-modal-body {
  flex: 1;
  overflow: auto;
  padding: 14px 18px 20px;
  min-height: 0;
}

.seo-grid-modal-meta {
  margin: 0 0 10px;
  font-size: 13px;
  font-family: var(--mono);
}

.seo-grid-modal-rank {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  background: var(--bg);
  border: 1px solid var(--border);
}

.seo-grid-modal-rank--warn {
  border-color: rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.06);
}

.seo-grid-modal-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin-bottom: 14px;
}

.seo-grid-modal-body .seo-rank-table--snapshot {
  min-width: 560px;
}

.seo-grid-modal-foot {
  margin: 0;
  padding-top: 4px;
}

.seo-grid-modal-maps-link {
  font-size: 14px;
  font-weight: 500;
}

.leaflet-tooltip.seo-grid-marker-tooltip {
  font-size: 11px;
  font-weight: 600;
  padding: 5px 8px;
}

/* Dashboard: delete confirmation modals (reports, projects) */
body.seo-report-delete-modal-open,
body.seo-project-delete-modal-open {
  overflow: hidden;
}

.seo-report-delete-modal,
.seo-project-delete-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.seo-report-delete-modal[hidden],
.seo-project-delete-modal[hidden] {
  display: none;
}

.seo-report-delete-modal__backdrop,
.seo-project-delete-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}

.seo-report-delete-modal__panel,
.seo-project-delete-modal__panel {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  max-height: min(90vh, 560px);
  overflow: auto;
  padding: 26px 26px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

.seo-report-delete-modal__title,
.seo-project-delete-modal__title {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.seo-report-delete-modal__instruction,
.seo-project-delete-modal__instruction {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.45;
}

.seo-report-delete-modal__actions,
.seo-project-delete-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 18px;
}

.seo-reports-table .seo-reports-kw-cell {
  max-width: 220px;
  word-break: break-word;
  line-height: 1.4;
  font-size: 13px;
}

.seo-reports-table .seo-reports-site-cell {
  max-width: 140px;
  word-break: break-all;
  font-size: 13px;
}

.seo-projects-table .seo-projects-kw-cell {
  max-width: 260px;
  word-break: break-word;
  line-height: 1.4;
  font-size: 13px;
}

.seo-grid-rank-list-details,
.seo-pack-business-list-details {
  margin: 14px 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  padding: 0 14px 12px;
}

.seo-grid-rank-list-summary,
.seo-pack-business-list-summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 0 10px;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--text);
}

.seo-grid-rank-list-summary::-webkit-details-marker,
.seo-pack-business-list-summary::-webkit-details-marker {
  display: none;
}

.seo-grid-rank-mini-wrap {
  margin-bottom: 2px;
}

.seo-grid-rank-mini-table {
  font-size: 13px;
}

.seo-grid-rank-mini-table th,
.seo-grid-rank-mini-table td {
  padding: 8px 10px;
}

.seo-pack-business-list {
  margin: 0 0 8px;
  padding-left: 1.25rem;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-muted);
  max-height: 220px;
  overflow: auto;
}

.seo-pack-you-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent, #0d9488);
}

.seo-pack-business-list-note {
  margin: 0;
  font-size: 12px;
}

/* Overview — audit history (collapsed details) */
.seo-audit-history-panel {
  margin: 0 0 12px;
}

.seo-audit-history-details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.seo-audit-history-summary {
  list-style: none;
  margin: 0;
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  font-weight: 600;
  color: var(--text);
}

.seo-audit-history-summary::-webkit-details-marker {
  display: none;
}

.seo-audit-history-summary-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.seo-audit-history-icon {
  flex-shrink: 0;
}

.seo-audit-history-summary-label {
  flex: 1;
  min-width: 0;
  font-size: 14px;
}

.seo-audit-history-count {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.seo-audit-history-hint {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-faint);
}

.seo-audit-history-body {
  padding: 0 10px 10px;
  border-top: 1px solid var(--border);
}

.seo-audit-history-micro {
  margin: 8px 4px 8px;
  font-size: 12px;
  line-height: 1.45;
}

.seo-snapshot-history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: min(200px, 38vh);
  overflow-y: auto;
}

.seo-snapshot-history-link {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  line-height: 1.35;
  transition:
    border-color 0.15s,
    background 0.15s;
}

.seo-snapshot-history-link:hover {
  border-color: var(--border-strong);
  background: var(--bg-hover);
  color: var(--text);
}

.seo-snapshot-history-link--active {
  border-color: rgba(34, 211, 238, 0.35);
  background: var(--bg-hover);
  color: var(--text);
}

.seo-snapshot-history-date {
  font-weight: 600;
  color: var(--text);
  font-size: 12px;
  white-space: nowrap;
}

.seo-snapshot-history-meta {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 12px;
  flex: 1;
  min-width: 0;
}

.seo-snapshot-history-firm {
  color: var(--text-muted);
}

.seo-snapshot-history-kw {
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 11px;
}

.seo-snapshot-history-latest-wrap {
  margin: 10px 4px 0;
}

.seo-map-history-note {
  margin: 0 0 14px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.5;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.seo-map-history-note a {
  white-space: nowrap;
}

/* Settings — shareable review link */
.seo-review-share-field {
  margin-top: 20px;
}

.seo-review-share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}

.seo-review-share-input {
  flex: 1 1 220px;
  min-width: 0;
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
}

.seo-review-share-hint {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
}

/* Public review landing (review.php) */
.review-landing-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.review-landing-main {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px 18px;
}

.review-landing-card {
  width: min(440px, 100%);
  padding: 32px 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
}

.review-landing-kicker {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.review-landing-title {
  margin: 0 0 12px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.review-landing-lead {
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-muted);
}

.review-landing-note {
  margin: 0 0 22px;
  font-size: 14px;
  color: var(--text-faint);
}

.review-landing-actions {
  margin: 0 0 20px;
}

.review-landing-cta {
  display: inline-flex;
  width: 100%;
  justify-content: center;
  padding: 14px 20px;
  font-size: 15px;
}

.review-landing-foot {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  word-break: break-all;
}

.review-landing-fallback {
  color: var(--accent);
}
