:root {
  --mf-primary: #ff6f52;
  --mf-primary-dark: #d95339;
  --mf-primary-soft: rgba(255, 111, 82, 0.04);
  --mf-secondary: #060834;
  --mf-bg: #f2f3f5;
  --mf-surface: #ffffff;
  --mf-border: #d3d6dc;
  --mf-border-soft: #dde0e6;
  --mf-text: #252a33;
  --mf-muted: #555c68;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", sans-serif;
  background: var(--mf-bg);
  color: var(--mf-text);
  font-size: 15px;
  line-height: 1.45;
}

.docs-shell {
  max-width: 1320px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  grid-template-areas:
    "header header"
    "sidebar content";
  column-gap: 16px;
  row-gap: 12px;
}

.docs-content {
  grid-area: content;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.docs-content > * {
  margin-bottom: 0 !important;
}

.docs-header {
  grid-area: header;
  border: 1px solid var(--mf-border);
  border-radius: 2px;
  background: var(--mf-surface);
  padding: 12px 14px;
}

.docs-header h1 {
  margin: 0;
  font-size: clamp(1.75rem, 2.1vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #1f2330;
}

.docs-header p {
  margin: 6px 0 0;
  color: var(--mf-muted) !important;
  font-size: 0.9rem;
}

.docs-nav {
  grid-area: sidebar;
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-self: start;
  position: sticky;
  top: 12px;
  border: 1px solid var(--mf-border);
  border-radius: 2px;
  background: var(--mf-surface);
  padding: 8px;
}

.docs-nav-title {
  font-size: 0.68rem;
  font-weight: 700;
  color: #6f7480;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 4px 8px 6px;
  border-bottom: 1px solid var(--mf-border-soft);
  margin-bottom: 4px;
}

.docs-nav .nav-link {
  display: block;
  width: 100%;
  border-radius: 2px;
  border: 1px solid transparent;
  padding: 8px 8px;
  color: #2f3441;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.3;
  transition: color 120ms ease, border-color 120ms ease, background 120ms ease;
}

.docs-nav .nav-link:hover {
  color: #202532;
  border-color: var(--mf-border-soft);
  background: #f8f9fb;
}

.docs-nav .nav-link--active {
  color: var(--mf-primary-dark);
  font-weight: 600;
  border-color: #f1b1a4;
  background: #fdf7f5;
}

.docs-content > section,
.docs-content > pre {
  border: 1px solid var(--mf-border);
  border-radius: 2px;
  box-shadow: none;
  background: var(--mf-surface);
}

.card {
  border: 1px solid var(--mf-border);
  border-radius: 2px;
  box-shadow: none;
  background: var(--mf-surface);
}

.card h2,
.card .h5 {
  color: #222633;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 8px;
}

code,
pre {
  background: #f7f8fa;
  border: 1px solid #dfe2ea;
  border-radius: 2px;
}

code {
  color: #2d3442;
  padding: 1px 5px;
  font-size: 0.88em;
}

pre {
  padding: 10px;
  white-space: pre-wrap;
  font-size: 0.87rem;
  line-height: 1.4;
}

.table {
  --bs-table-bg: #ffffff;
  margin-bottom: 0;
}

.table thead th {
  background: #f6f7fb;
  color: #2f2f37;
  font-weight: 700;
  border-bottom: 1px solid var(--mf-border-soft);
  font-size: 0.82rem;
  padding: 0.45rem 0.5rem;
}

.table td,
.table th {
  border-color: #eceef4;
  vertical-align: top;
  font-size: 0.86rem;
  padding: 0.45rem 0.5rem;
}

.card,
.docs-content > pre {
  padding: 12px !important;
}

ul,
ol {
  margin-bottom: 0;
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.2rem;
}

@media (max-width: 991px) {
  .docs-shell.container {
    padding-left: 0.55rem;
    padding-right: 0.55rem;
    padding-top: 0.65rem !important;
    padding-bottom: 0.8rem !important;
  }

  .docs-shell {
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "sidebar"
      "content";
    row-gap: 10px;
  }

  .docs-nav {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }

  .docs-nav-title {
    width: 100%;
    margin-bottom: 2px;
  }

  .docs-nav .nav-link {
    width: auto;
    padding: 6px 9px;
    font-size: 0.82rem;
  }

  .docs-content {
    gap: 8px;
  }

  .docs-header h1 {
    font-size: 1.35rem;
  }

  .docs-header p {
    font-size: 0.84rem;
  }
}
