@import url("https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;600&display=swap");

:root {
  --bg: #0d0f14;
  --panel: rgba(15, 20, 30, 0.86);
  --panel-2: rgba(12, 16, 24, 0.9);
  --line: #2b3343;
  --line-2: #3a1f24;
  --text: #f3ecec;
  --muted: #bea9a9;
  --accent: #d14b4b;
  --accent-soft: rgba(209, 75, 75, 0.2);
  --accent-soft-2: rgba(209, 75, 75, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(1000px 540px at 16% -10%, rgba(184, 45, 45, 0.2) 0%, transparent 58%),
    radial-gradient(860px 520px at 88% 0, rgba(132, 32, 32, 0.16) 0%, transparent 64%),
    linear-gradient(180deg, #0b0e14 0%, #0a0d13 100%);
  color: var(--text);
  font-family: "Sora", "Segoe UI", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px) 0 0 / 30px 30px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px) 0 0 / 30px 30px;
}

.docs-wrap {
  position: relative;
  z-index: 1;
}

.docs-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px clamp(12px, 3vw, 24px);
  border-bottom: 1px solid var(--line);
  background: rgba(9, 13, 20, 0.9);
  backdrop-filter: blur(8px);
}

.docs-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.docs-brand .rok-logo-img {
  height: 40px;
  width: auto;
}

.docs-brand-text {
  display: inline-grid;
  gap: 2px;
}

.docs-brand-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.docs-brand-subtitle {
  font-size: 10px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--muted);
}

.docs-top-links {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.docs-top-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: #e3c8c8;
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
}

.docs-top-link:hover {
  border-color: #624249;
  background: rgba(23, 30, 42, 0.86);
}

.docs-shell {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: clamp(14px, 2.8vw, 28px);
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 18px;
}

.docs-toc {
  position: sticky;
  top: 72px;
  align-self: start;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 12px;
  background: var(--panel);
}

.docs-toc-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: #ecc8c8;
  margin: 0 0 10px;
}

.docs-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.docs-toc a {
  color: #dcbcbc;
  text-decoration: none;
  font-size: 12px;
  line-height: 1.4;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid transparent;
  display: block;
}

.docs-toc a:hover {
  border-color: #4a2b32;
  background: rgba(20, 26, 36, 0.86);
}

.docs-main {
  display: grid;
  gap: 14px;
}

.docs-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  padding: clamp(14px, 2vw, 20px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
}

.docs-kicker {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid #5a2f36;
  background: var(--accent-soft);
  color: #f4cdcd;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.78px;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
}

.docs-main h1 {
  margin-top: 10px;
  font-size: clamp(30px, 4.8vw, 48px);
  line-height: 1.06;
}

.docs-main h2 {
  font-size: clamp(18px, 2.2vw, 24px);
  margin-bottom: 10px;
}

.docs-main h3 {
  font-size: 15px;
  margin-bottom: 8px;
  color: #f0d6d6;
}

.docs-main p {
  margin: 8px 0 0;
  color: #decccc;
  line-height: 1.64;
  font-size: 14px;
}

.docs-main ul,
.docs-main ol {
  margin: 8px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: #e4d0d0;
  font-size: 14px;
  line-height: 1.56;
}

.docs-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.docs-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.docs-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid #4b2d33;
  border-radius: 999px;
  background: var(--accent-soft-2);
  padding: 6px 10px;
  font-size: 12px;
  color: #f1cdcd;
}

.docs-note {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #5f3434;
  border-radius: 10px;
  background: rgba(209, 75, 75, 0.12);
  color: #f3d0d0;
  font-size: 13px;
  line-height: 1.55;
}

.docs-api-example-controls {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.docs-example-label {
  color: #e4c8c8;
  font-size: 12px;
  font-weight: 600;
}

.docs-example-select {
  min-width: 230px;
  border: 1px solid #4a2f36;
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(10, 15, 23, 0.9);
  color: #f0d6d6;
  font-size: 12px;
  font-family: "Sora", "Segoe UI", sans-serif;
}

.docs-example-select:focus {
  outline: none;
  border-color: #b64f4f;
  box-shadow: 0 0 0 1px rgba(209, 75, 75, 0.32);
}

.docs-block {
  margin-top: 12px;
  border: 1px solid #364153;
  border-radius: 12px;
  background: rgba(9, 14, 22, 0.88);
  overflow: hidden;
}

.docs-block-title {
  margin: 0;
  padding: 8px 10px;
  border-bottom: 1px solid #364153;
  font-size: 11px;
  letter-spacing: 0.68px;
  text-transform: uppercase;
  color: #cfb2b2;
  background: rgba(14, 20, 30, 0.86);
}

pre {
  margin: 0;
  padding: 12px;
  overflow-x: auto;
  white-space: pre-wrap;
  color: #e9dada;
  font-size: 12px;
  line-height: 1.58;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

code {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 13px;
}

.docs-table th,
.docs-table td {
  border: 1px solid #334054;
  padding: 8px 9px;
  text-align: left;
  vertical-align: top;
}

.docs-table th {
  background: rgba(15, 22, 33, 0.9);
  color: #efd0d0;
  font-weight: 700;
}

.docs-flow {
  margin-top: 10px;
  padding: 11px;
  border: 1px solid #364153;
  border-radius: 12px;
  background: rgba(9, 14, 22, 0.88);
  color: #efd6d6;
  font-size: 13px;
  line-height: 1.6;
}

.docs-footer {
  margin-top: 6px;
  padding: 12px 2px 0;
  border-top: 1px solid var(--line);
  color: #a98d8d;
  font-size: 12px;
}

.docs-primary-btn {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  border-radius: 11px;
  border: 1px solid #562a2a;
  background: linear-gradient(135deg, #cb2d2d 0%, #931717 100%);
  color: #2a0707;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.docs-primary-btn:hover {
  filter: brightness(1.05);
}

.docs-modal-open {
  overflow: hidden;
}

.docs-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(5, 9, 14, 0.74);
  backdrop-filter: blur(4px);
}

.docs-modal[hidden] {
  display: none;
}

.docs-modal-card {
  width: min(620px, 100%);
  max-height: min(84vh, 760px);
  overflow: auto;
  position: relative;
  border-radius: 16px;
  border: 1px solid #4F2A2A;
  background: linear-gradient(180deg, rgba(14, 21, 30, 0.98) 0%, rgba(10, 16, 24, 0.96) 100%);
  box-shadow:
    0 18px 52px rgba(0, 0, 0, 0.44),
    inset 0 1px 0 rgba(226, 173, 173, 0.07);
  padding: 18px 18px 16px;
}

.docs-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid #4D2A2A;
  background: #271212;
  color: #E6C4C4;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.docs-modal-close:hover {
  background: #351717;
  border-color: #5E3333;
}

.docs-modal-card h3 {
  margin-top: 0;
  padding-right: 40px;
}

.docs-modal-card p {
  margin-top: 10px;
}

.docs-modal-card ul {
  margin-top: 8px;
}

@media (max-width: 980px) {
  .docs-shell {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .docs-toc {
    position: static;
  }
}

@media (max-width: 600px) {
  .docs-topbar {
    padding: 10px;
  }

  .docs-brand .rok-logo-img {
    height: 34px;
  }

  .docs-top-link {
    padding: 6px 9px;
    font-size: 10px;
  }

  .docs-shell {
    padding: 10px;
  }

  .docs-main h1 {
    font-size: 27px;
  }

  .docs-grid-2 {
    grid-template-columns: 1fr;
  }

  .docs-example-select {
    width: 100%;
    min-width: 0;
  }
}
