@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700&family=Source+Sans+3:wght@400;500;600;700&display=swap");

:root {
  --rf-bg: #f5f1e8;
  --rf-panel: rgba(255, 255, 255, 0.9);
  --rf-ink: #15263b;
  --rf-muted: #5b6778;
  --rf-line: rgba(21, 38, 59, 0.12);
  --rf-copper: #bb6b2c;
  --rf-teal: #136f63;
  --rf-deep: #0f1726;
  --rf-warm: #f1dfc9;
  --rf-shadow: 0 24px 60px rgba(15, 23, 38, 0.08);
}

[data-md-color-scheme="default"] body {
  background:
    radial-gradient(circle at top right, rgba(187, 107, 44, 0.14), transparent 30%),
    radial-gradient(circle at left 20%, rgba(19, 111, 99, 0.12), transparent 26%),
    var(--rf-bg);
  color: var(--rf-ink);
}

[data-md-color-scheme="slate"] {
  --rf-bg: #0d1420;
  --rf-panel: rgba(18, 27, 41, 0.92);
  --rf-ink: #f4efe5;
  --rf-muted: #b9c4d4;
  --rf-line: rgba(232, 238, 246, 0.14);
  --rf-shadow: 0 24px 60px rgba(0, 0, 0, 0.26);
}

[data-md-color-scheme="slate"] body {
  background:
    radial-gradient(circle at top right, rgba(187, 107, 44, 0.16), transparent 30%),
    radial-gradient(circle at left 20%, rgba(19, 111, 99, 0.16), transparent 28%),
    var(--rf-bg);
  color: var(--rf-ink);
}

.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.md-typeset h4 {
  font-family: "Fraunces", Georgia, serif;
  letter-spacing: -0.02em;
  color: var(--rf-ink);
}

.md-typeset,
.md-typeset p,
.md-typeset li,
.md-typeset table:not([class]) {
  font-family: "Source Sans 3", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.md-typeset .landing-hero {
  position: relative;
  overflow: hidden;
  margin: 0 0 2.5rem;
  padding: 3.2rem 2rem 2.3rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.8rem;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 45%),
    linear-gradient(150deg, #11243a 0%, #132e38 55%, #7a4c25 140%);
  color: #f8f6f0;
  box-shadow: 0 28px 80px rgba(15, 23, 38, 0.24);
}

.md-typeset .landing-hero::before {
  content: "";
  position: absolute;
  inset: 1rem;
  border-radius: 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.md-typeset .hero-kicker {
  display: inline-block;
  margin-bottom: 0.8rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.md-typeset .landing-hero h1 {
  margin: 0;
  color: #fffdf9;
  font-size: clamp(2.4rem, 4.2vw, 4rem);
  line-height: 1.02;
}

.md-typeset .hero-subtitle {
  max-width: 52rem;
  margin: 1rem 0 1.5rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.15rem;
  line-height: 1.45;
}

.md-typeset .hero-bullets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.85rem;
  margin: 1.3rem 0 1.7rem;
  padding: 0;
  list-style: none;
}

.md-typeset .hero-bullets li {
  padding: 0.9rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.88);
}

.md-typeset .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1rem;
}

.md-typeset .hero-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 10rem;
  padding: 0.85rem 1.15rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fffdf9;
  background: rgba(255, 255, 255, 0.04);
  font-weight: 700;
  text-decoration: none;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.md-typeset .hero-actions a.primary {
  background: linear-gradient(135deg, var(--rf-copper), #db9d5a);
  border-color: transparent;
  color: #fffdf9;
}

.md-typeset .hero-actions a:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.08);
}

.md-typeset .hero-actions a.primary:hover {
  background: linear-gradient(135deg, #c67432, #e2a966);
}

.md-typeset .metric-strip,
.md-typeset .insight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 1rem;
  margin: 1.4rem 0 2rem;
}

.md-typeset .metric-card,
.md-typeset .insight-card {
  padding: 1.05rem 1.1rem;
  border: 1px solid var(--rf-line);
  border-radius: 1.1rem;
  background: var(--rf-panel);
  box-shadow: var(--rf-shadow);
}

.md-typeset .metric-card strong,
.md-typeset .insight-card strong {
  display: block;
  font-size: 1.4rem;
  color: var(--rf-ink);
}

.md-typeset .metric-card span,
.md-typeset .insight-card span {
  color: var(--rf-muted);
  font-size: 0.95rem;
}

.md-typeset .section-shell {
  margin: 1.5rem 0 2.2rem;
  padding: 1.35rem 1.4rem;
  border: 1px solid var(--rf-line);
  border-radius: 1.2rem;
  background: var(--rf-panel);
  box-shadow: var(--rf-shadow);
}

.md-typeset .section-shell h2,
.md-typeset .section-shell h3 {
  margin-top: 0;
}

.md-typeset .comparison-callout {
  display: grid;
  gap: 0.85rem;
  margin: 1.25rem 0;
  padding: 1.15rem 1.2rem;
  border-left: 4px solid var(--rf-teal);
  border-radius: 0.95rem;
  background: rgba(19, 111, 99, 0.08);
}

[data-md-color-scheme="slate"] .md-typeset .comparison-callout {
  background: rgba(19, 111, 99, 0.14);
}

.md-typeset .comparison-callout p:last-child {
  margin-bottom: 0;
}

.md-typeset .research-table-wrap {
  margin: 1.25rem 0 1.6rem;
  overflow-x: auto;
}

.md-typeset table.research-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--rf-line);
  border-radius: 1rem;
  overflow: hidden;
}

.md-typeset table.research-table th,
.md-typeset table.research-table td {
  padding: 0.85rem 0.9rem;
  border-bottom: 1px solid var(--rf-line);
  text-align: left;
  vertical-align: top;
}

.md-typeset table.research-table th {
  background: rgba(21, 38, 59, 0.05);
  color: var(--rf-ink);
  font-weight: 700;
}

[data-md-color-scheme="slate"] .md-typeset table.research-table {
  background: rgba(18, 27, 41, 0.9);
}

[data-md-color-scheme="slate"] .md-typeset table.research-table th {
  background: rgba(255, 255, 255, 0.06);
}

.md-typeset table.research-table tr:last-child td {
  border-bottom: 0;
}

.md-typeset .runtime-pill {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: rgba(187, 107, 44, 0.12);
  color: var(--rf-copper);
  font-size: 0.82rem;
  font-weight: 700;
}

.md-typeset .pending-note,
.md-typeset .provenance-note {
  margin: 1rem 0 1.6rem;
  padding: 1rem 1.15rem;
  border-radius: 1rem;
  border: 1px dashed rgba(187, 107, 44, 0.4);
  background: rgba(241, 223, 201, 0.5);
  color: #5b3d1d;
}

.md-typeset .provenance-note {
  border-color: rgba(19, 111, 99, 0.28);
  background: rgba(19, 111, 99, 0.07);
  color: #184d46;
}

[data-md-color-scheme="slate"] .md-typeset .pending-note {
  border-color: rgba(219, 157, 90, 0.4);
  background: rgba(187, 107, 44, 0.16);
  color: #f4dcc1;
}

[data-md-color-scheme="slate"] .md-typeset .provenance-note {
  border-color: rgba(77, 192, 171, 0.34);
  background: rgba(19, 111, 99, 0.18);
  color: #c5f2eb;
}

.md-typeset .curve-frame {
  margin: 1.2rem 0 1.8rem;
  padding: 1rem;
  border: 1px solid var(--rf-line);
  border-radius: 1.15rem;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--rf-shadow);
}

[data-md-color-scheme="slate"] .md-typeset .curve-frame {
  background: rgba(18, 27, 41, 0.92);
}

.md-typeset .curve-frame svg {
  width: 100%;
  height: auto;
  display: block;
}

.md-typeset .mermaid {
  margin: 1.25rem 0 1.6rem;
  padding: 1rem;
  border: 1px solid var(--rf-line);
  border-radius: 1.15rem;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--rf-shadow);
  overflow-x: auto;
  text-align: center;
}

[data-md-color-scheme="slate"] .md-typeset .mermaid {
  background: rgba(18, 27, 41, 0.92);
}

.md-typeset .mermaid svg {
  max-width: 100%;
  height: auto;
}

.md-typeset .diagram-note {
  margin: -0.6rem 0 1.2rem;
  color: var(--rf-muted);
  font-size: 0.95rem;
}

.md-typeset .legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.6rem;
  color: var(--rf-muted);
  font-size: 0.88rem;
}

.md-typeset .legend-row span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.md-typeset .legend-swatch {
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 999px;
}

.md-typeset .doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem;
  margin: 1.2rem 0 2rem;
}

.md-typeset .doc-card {
  padding: 1rem 1.05rem;
  border: 1px solid var(--rf-line);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--rf-shadow);
}

[data-md-color-scheme="slate"] .md-typeset .doc-card,
[data-md-color-scheme="slate"] .md-typeset .section-shell,
[data-md-color-scheme="slate"] .md-typeset .metric-card,
[data-md-color-scheme="slate"] .md-typeset .insight-card {
  background: var(--rf-panel);
}

.md-typeset .doc-card a {
  font-weight: 700;
  color: var(--rf-ink);
  text-decoration: none;
}

.md-typeset .doc-card p {
  margin: 0.45rem 0 0;
  color: var(--rf-muted);
}

.md-typeset .legacy-note {
  padding: 0.95rem 1rem;
  border-radius: 0.95rem;
  border-left: 4px solid var(--rf-copper);
  background: rgba(187, 107, 44, 0.08);
}

[data-md-color-scheme="slate"] .md-typeset .legacy-note {
  background: rgba(187, 107, 44, 0.14);
  color: #f4dcc1;
}

@media screen and (max-width: 76.1875em) {
  .md-typeset .landing-hero {
    padding: 2.5rem 1.4rem 2rem;
  }
}

@media screen and (max-width: 44.9375em) {
  .md-typeset .landing-hero h1 {
    font-size: 2.4rem;
  }

  .md-typeset .hero-actions a {
    width: 100%;
  }
}
