/* SQLRules docs — modern layer on Furo */

/* ── Landing hero ───────────────────────────────────────────── */
.sr-hero {
  margin: 0 0 2.5rem;
  padding: 2.75rem 2rem 2.5rem;
  border-radius: 1.25rem;
  border: 1px solid var(--color-background-border);
  background:
    radial-gradient(ellipse 120% 80% at 100% -20%, rgba(15, 118, 110, 0.14), transparent 55%),
    radial-gradient(ellipse 80% 60% at 0% 100%, rgba(14, 116, 144, 0.1), transparent 50%),
    var(--color-background-secondary);
  position: relative;
  isolation: isolate;
}

.sr-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, transparent 40%, rgba(15, 118, 110, 0.04) 100%);
  pointer-events: none;
  z-index: 0;
}

.sr-hero > * {
  position: relative;
  z-index: 1;
}

/* Furo renders the Markdown H1 above the hero; the hero shows the visible headline. */
article[role="main"] > h1:first-of-type {
  display: none;
}

.sr-hero-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.25;
  margin: 0 0 0.75rem;
  padding-block: 0.125em;
  color: var(--color-foreground-primary);
  text-wrap: balance;
}

html[data-theme="dark"] .sr-hero-title {
  color: #f8fafc;
}

.sr-hero .sr-lead {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--color-foreground-secondary);
  max-width: 42rem;
  margin: 0 0 1.5rem;
  text-wrap: pretty;
}

.sr-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.sr-hero-kicker {
  margin: 0 0 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-foreground-secondary);
}

.sr-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 999px;
  border: 1px solid var(--color-background-border);
  background: var(--color-background-primary);
  color: var(--color-foreground-secondary);
}

.sr-badge--accent {
  border-color: rgba(15, 118, 110, 0.35);
  background: rgba(15, 118, 110, 0.08);
  color: var(--color-brand-content);
}

.sr-hero-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 1.15rem;
  border-radius: 0.65rem;
  font-weight: 700;
  text-decoration: none !important;
  background: var(--color-brand-primary);
  color: #fff !important;
  border: 1px solid transparent;
}

.sr-hero-cta:hover {
  filter: brightness(1.05);
}

.sr-hero-cta--secondary {
  background: var(--color-background-primary);
  color: var(--color-brand-content) !important;
  border-color: var(--color-background-border);
}

/* ── Sphinx Design cards ────────────────────────────────────── */
.sd-card {
  border-radius: 1rem !important;
  border: 1px solid var(--color-background-border) !important;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.sd-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px -12px rgba(15, 23, 42, 0.15);
  border-color: rgba(15, 118, 110, 0.35) !important;
}

html[data-theme="dark"] .sd-card:hover {
  box-shadow: 0 12px 40px -12px rgba(0, 0, 0, 0.45);
}

.sd-card-title {
  font-weight: 700 !important;
  letter-spacing: -0.02em;
}

.sd-card-footer {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-brand-primary) !important;
}

.sd-gutter-3 {
  margin-bottom: 2rem !important;
}

/* ── Callouts ───────────────────────────────────────────────── */
.sr-callout {
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  border-radius: 0.75rem;
  border-left: 4px solid var(--color-brand-primary);
  background: rgba(15, 118, 110, 0.06);
}

html[data-theme="dark"] .sr-callout {
  background: rgba(45, 212, 191, 0.08);
}

/* ── Content polish ─────────────────────────────────────────── */
article[role="main"] p {
  line-height: 1.7;
}

article[role="main"] table {
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--color-background-border);
}

article[role="main"] thead {
  background: var(--color-background-secondary);
}

article[role="main"] th,
article[role="main"] td {
  padding: 0.65rem 1rem;
}

div.highlight {
  border-radius: 0.75rem;
  border: 1px solid var(--color-background-border);
}

div.highlight pre {
  font-size: 0.875rem;
  line-height: 1.55;
}

button.copybtn {
  border-radius: 0.375rem;
}

.sidebar-logo-container {
  display: flex;
  align-items: center;
}

.sidebar-logo {
  max-width: min(100%, 11.5rem);
  height: auto;
}

.sidebar-tree .reference {
  border-radius: 0.375rem;
}

.sr-footer-pypi {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  background: #0f766e;
  color: #fff;
}

h2#documentation-map {
  margin-top: 2.5rem;
}
