:root {
  --gf-ink: #172423;
  --gf-muted: #53625f;
  --gf-line: #d9e2de;
  --gf-surface: #fffffb;
  --gf-surface-soft: #f5f7f1;
  --gf-accent: #2c7a78;
  --gf-accent-2: #a7672b;
  --gf-shadow: 0 16px 42px rgba(25, 44, 42, 0.09);
}

[data-md-color-scheme="default"] {
  --md-primary-fg-color: #315f5d;
  --md-primary-fg-color--light: #487a78;
  --md-primary-fg-color--dark: #234846;
  --md-accent-fg-color: #a7672b;
  --md-default-bg-color: #f5f7f1;
  --md-default-fg-color: var(--gf-ink);
  --md-typeset-a-color: #226b68;
}

body {
  background:
    radial-gradient(circle at top left, rgba(44, 122, 120, 0.12), transparent 30rem),
    linear-gradient(180deg, #f8faf5 0%, #f2f5ee 100%);
  color: var(--gf-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.md-header,
.md-tabs {
  box-shadow: none;
}

.md-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.md-main__inner {
  margin-top: 1.35rem;
}

.md-content__inner {
  background: rgba(255, 255, 251, 0.78);
  border: 1px solid rgba(217, 226, 222, 0.78);
  border-radius: 10px;
  box-shadow: var(--gf-shadow);
  padding: 1.65rem 1.8rem 2rem;
}

.md-typeset {
  font-size: 0.82rem;
  line-height: 1.68;
}

.md-typeset h1,
.md-typeset h2,
.md-typeset h3 {
  color: #13201f;
  font-weight: 720;
  letter-spacing: 0;
}

.md-typeset h1 {
  margin-bottom: 1rem;
}

.md-typeset code {
  border-radius: 5px;
}

.md-sidebar__scrollwrap {
  background: rgba(255, 255, 251, 0.48);
  border: 1px solid rgba(217, 226, 222, 0.6);
  border-radius: 8px;
}

.wiki-hero {
  background:
    linear-gradient(135deg, rgba(44, 122, 120, 0.12), rgba(167, 103, 43, 0.12)),
    linear-gradient(180deg, rgba(255, 255, 251, 0.96), rgba(244, 247, 242, 0.96));
  border: 1px solid rgba(49, 95, 93, 0.18);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(25, 44, 42, 0.08);
  margin: 0 0 1.25rem;
  padding: clamp(1.1rem, 2vw, 1.9rem);
}

.wiki-hero h1 {
  font-size: clamp(1.85rem, 4vw, 3rem);
  line-height: 1.05;
  margin: 0.15rem 0 0.75rem;
}

.wiki-hero p {
  color: var(--gf-muted);
  font-size: 0.95rem;
  max-width: 48rem;
}

.wiki-kicker {
  color: var(--gf-accent);
  font-size: 0.7rem !important;
  font-weight: 760;
  letter-spacing: 0.08em;
  margin: 0;
  text-transform: uppercase;
}

.wiki-stat-row {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  margin: 1rem 0 1.4rem;
}

.wiki-stat {
  background: rgba(255, 255, 251, 0.75);
  border: 1px solid var(--gf-line);
  border-radius: 8px;
  padding: 0.8rem 0.9rem;
}

.wiki-stat strong {
  color: #173331;
  display: block;
  font-size: 1.2rem;
  line-height: 1;
}

.wiki-stat span {
  color: var(--gf-muted);
  display: block;
  font-size: 0.72rem;
  margin-top: 0.35rem;
}

.wiki-card-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  margin: 1rem 0 1.6rem;
}

.md-typeset a.wiki-card {
  background: var(--gf-surface);
  border: 1px solid rgba(49, 95, 93, 0.16);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(25, 44, 42, 0.07);
  color: var(--gf-ink);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 8.75rem;
  padding: 0.9rem;
  transition: border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.md-typeset a.wiki-card:hover {
  border-color: rgba(44, 122, 120, 0.48);
  box-shadow: 0 12px 30px rgba(25, 44, 42, 0.12);
  transform: translateY(-1px);
  text-decoration: none;
}

.wiki-card strong {
  color: #13201f;
  font-size: 0.92rem;
  line-height: 1.25;
}

.wiki-card span:last-child {
  color: var(--gf-muted);
  font-size: 0.74rem;
  line-height: 1.45;
}

.wiki-pill {
  align-self: flex-start;
  background: rgba(44, 122, 120, 0.1);
  border: 1px solid rgba(44, 122, 120, 0.2);
  border-radius: 999px;
  color: #226b68;
  font-size: 0.62rem;
  font-weight: 760;
  letter-spacing: 0.04em;
  padding: 0.16rem 0.45rem;
  text-transform: uppercase;
}

.wiki-card--protected .wiki-pill,
.wiki-pill--locked {
  background: rgba(167, 103, 43, 0.12);
  border-color: rgba(167, 103, 43, 0.24);
  color: #8d541f;
}

@media screen and (max-width: 76.1875em) {
  .md-content__inner {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    box-shadow: none;
    padding: 1.1rem;
  }
}
