/* GW Ultimate API docs — layout, theme, and motion */

:root {
  --page-top: #f0f4ff;
  --page-btm: #f8fafc;
  --mesh-1: rgba(99, 102, 241, 0.12);
  --mesh-2: rgba(14, 165, 233, 0.08);
  --surface: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --sidebar-bg: #0b1220;
  --sidebar-border: rgba(255, 255, 255, 0.06);
  --sidebar-text: #cbd5e1;
  --sidebar-muted: #94a3b8;
  --sidebar-hover: rgba(99, 102, 241, 0.15);
  --sidebar-active: rgba(99, 102, 241, 0.22);
  --accent: #4f46e5;
  --accent-bright: #6366f1;
  --accent-hover: #4338ca;
  --sidebar-w: 272px;
  --code-bg: #0c101b;
  --code-fg: #e2e8f0;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 50px -20px rgba(15, 23, 42, 0.18);
  --font: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", Consolas, "Liberation Mono", monospace;
  --enter-duration: 0.55s;
  --enter-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background: linear-gradient(165deg, var(--page-top) 0%, var(--page-btm) 55%, #eef2ff 100%);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(80% 60% at 90% 8%, var(--mesh-1), transparent 55%),
    radial-gradient(70% 50% at 0% 100%, var(--mesh-2), transparent 50%);
  z-index: 0;
  animation: meshDrift 28s var(--enter-ease) infinite alternate;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}
a:hover {
  text-decoration: underline;
  text-decoration-color: rgba(79, 70, 229, 0.4);
  color: var(--accent-hover);
}

.layout {
  display: flex;
  min-height: 100vh;
  max-width: 1440px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  padding: 1.6rem 1.15rem 2.25rem;
  background: linear-gradient(180deg, #0b1220 0%, #0f172a 48%, #0c1322 100%);
  color: var(--sidebar-text);
  border-right: 1px solid var(--sidebar-border);
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  overflow-y: auto;
  box-shadow: 4px 0 32px rgba(2, 6, 23, 0.28);
}

.sidebar::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.35), transparent 60%);
  pointer-events: none;
  opacity: 0.9;
}

.sidebar-brand {
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: -0.03em;
  margin-bottom: 0.2rem;
  background: linear-gradient(100deg, #e0e7ff 0%, #a5b4fc 50%, #c4b5fd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sidebar-sub {
  font-size: 0.8rem;
  color: var(--sidebar-muted);
  margin-bottom: 1.4rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.nav-section {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sidebar-muted);
  margin: 1.35rem 0 0.5rem;
}

.nav-section:first-of-type {
  margin-top: 0;
}

.sidebar nav a {
  display: block;
  padding: 0.42rem 0.6rem 0.42rem 0.7rem;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  font-size: 0.9rem;
  text-decoration: none;
  border: 1px solid transparent;
  margin-bottom: 0.1rem;
  position: relative;
  transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
}

.sidebar nav a::before {
  content: "";
  position: absolute;
  left: 0.35rem;
  top: 50%;
  width: 3px;
  height: 0;
  border-radius: 2px;
  background: var(--accent-bright);
  transform: translateY(-50%);
  transition: height 0.2s var(--enter-ease);
  opacity: 0.9;
}

.sidebar nav a:hover {
  background: var(--sidebar-hover);
  text-decoration: none;
  color: #f1f5f9;
  border-color: rgba(99, 102, 241, 0.2);
  transform: translateX(1px);
}

.sidebar nav a:hover::before {
  height: 60%;
}

.sidebar nav a.active {
  background: var(--sidebar-active);
  color: #fff;
  font-weight: 600;
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.1);
}

.sidebar nav a.active::before {
  height: 70%;
}

.main {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 12.25rem;
  column-gap: 1.75rem;
  row-gap: 0;
  align-items: start;
  padding: 2rem 2.5rem 3.5rem 2.5rem;
  max-width: 1200px;
  background: var(--surface);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--shadow-lg);
  animation: mainEnter var(--enter-duration) var(--enter-ease) both;
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* Article column: keeps pre/tables from overlapping the right rail */
.doc-prose {
  min-width: 0;
  grid-column: 1;
}

/* Right rail: in-flow column (no float overlap) */
.main > .toc {
  grid-column: 2;
  grid-row: 1;
}

h1 {
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.035em;
  margin: 0 0 0.5rem;
  line-height: 1.2;
  background: linear-gradient(100deg, var(--text) 0%, #334155 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@supports not (-webkit-background-clip: text) {
  h1 {
    color: var(--text);
    background: none;
  }
}

.lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin: 0 0 2rem;
  max-width: 56ch;
}
.lead.doc-lead--tight {
  margin-top: -1.25rem;
  margin-bottom: 2rem;
  max-width: 64ch;
  font-size: 0.95rem;
}

h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 2.4rem 0 0.85rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
  letter-spacing: -0.02em;
  color: #1e293b;
}

h2:first-of-type,
.doc-block:first-child h2 {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
  color: #1e293b;
}

p {
  margin: 0 0 1rem;
}

ul,
ol {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
}
li {
  margin-bottom: 0.35rem;
}

.toc {
  position: sticky;
  top: 1rem;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  margin: 0;
  margin-bottom: 0;
  padding: 0.8rem 0.65rem 0.95rem 0.9rem;
  background: linear-gradient(165deg, #fafbfc 0%, #f4f6fa 100%);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-left: 3px solid #6366f1;
  border-radius: 0 10px 10px 0;
  font-size: 0.8rem;
  box-shadow: 0 1px 0 rgba(99, 102, 241, 0.06) inset, 0 4px 18px -6px rgba(15, 23, 42, 0.12);
  max-height: calc(100vh - 2.25rem);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
  scrollbar-gutter: stable;
}
.toc::-webkit-scrollbar {
  width: 5px;
}
.toc::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.35);
  border-radius: 4px;
}
.toc::-webkit-scrollbar-track {
  background: rgba(241, 245, 249, 0.6);
  border-radius: 4px;
}

.toc:hover {
  border-color: rgba(99, 102, 241, 0.28);
  box-shadow: 0 1px 0 rgba(99, 102, 241, 0.08) inset, 0 8px 28px -8px rgba(79, 70, 229, 0.18);
}

.toc strong {
  display: block;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #64748b;
  margin: 0 0 0.5rem 0.05rem;
  font-weight: 800;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--border);
}
.toc a {
  display: block;
  color: #64748b;
  padding: 0.3rem 0.35rem 0.3rem 0.25rem;
  font-size: 0.8rem;
  line-height: 1.3;
  text-decoration: none;
  border-radius: 5px;
  margin: 0.1rem 0 0 0;
  font-family: var(--font-mono);
  word-break: break-word;
  transition: color 0.18s ease, background 0.18s ease;
  border: 1px solid transparent;
}
.toc a:hover,
.toc a:focus-visible {
  color: #4338ca;
  background: rgba(99, 102, 241, 0.1);
  text-decoration: none;
  border-color: rgba(99, 102, 241, 0.12);
  outline: none;
}

@media (min-width: 1001px) {
  .toc a:focus-visible {
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3);
  }
}

@media (max-width: 1000px) {
  .main {
    grid-template-columns: 1fr;
    max-width: 100%;
    padding: 1.4rem 1.35rem 2.5rem;
  }
  .main > .toc,
  .doc-prose {
    grid-column: 1;
  }
  .main > .toc {
    position: static;
    max-width: 100%;
    max-height: none;
    width: 100%;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    border-left: 3px solid #6366f1;
    margin: 0 0 1.5rem 0;
    order: -1; /* jump links first on small screens */
  }
  .doc-prose {
    order: 1;
  }
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.1rem;
  margin: 1.5rem 0;
}
.feature-grid--5 {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
@media (min-width: 1000px) {
  .feature-grid--5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
  box-shadow: var(--shadow);
  transition: transform 0.35s var(--enter-ease), box-shadow 0.35s ease, border-color 0.3s ease;
  animation: cardRise 0.65s var(--enter-ease) both;
}
.feature-card:nth-child(2) {
  animation-delay: 0.05s;
}
.feature-card:nth-child(3) {
  animation-delay: 0.1s;
}
.feature-card:nth-child(4) {
  animation-delay: 0.15s;
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px -12px rgba(15, 23, 42, 0.18);
  border-color: rgba(99, 102, 241, 0.25);
}
.feature-card h3 {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
}
.feature-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.feature-card kbd,
.feature-card .tag {
  font-size: 0.75rem;
  background: #f1f5f9;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  border: 1px solid var(--border);
}

pre,
.code-block {
  background: var(--code-bg);
  color: var(--code-fg);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.55;
  margin: 0.75rem 0 1.25rem;
  border: 1px solid #151b2e;
  tab-size: 2;
  box-shadow: 0 4px 24px rgba(2, 6, 23, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.35s var(--enter-ease);
}

pre:hover,
.code-block:hover {
  box-shadow: 0 8px 40px -10px rgba(2, 6, 23, 0.45);
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-1px);
}

pre code {
  font-family: inherit;
  background: none;
  padding: 0;
  color: inherit;
}

code:not(pre code) {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: rgba(79, 70, 229, 0.1);
  padding: 0.1rem 0.38rem;
  border-radius: 5px;
  border: 1px solid rgba(79, 70, 229, 0.12);
}

.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  background: #e0e7ff;
  color: #3730a3;
  margin-left: 0.35rem;
  vertical-align: middle;
}
.badge-get {
  background: #dcfce7;
  color: #166534;
}
.badge-post {
  background: #dbeafe;
  color: #1e40af;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 0.75rem 0 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s ease;
}
table:hover {
  box-shadow: 0 8px 30px -18px rgba(15, 23, 42, 0.12);
}
th,
td {
  text-align: left;
  padding: 0.7rem 0.95rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s ease;
}
th {
  background: linear-gradient(180deg, #f8fafc, #f1f5f9);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
tbody tr {
  transition: background 0.2s ease;
}
tbody tr:hover {
  background: rgba(99, 102, 241, 0.04);
}
tr:last-child td {
  border-bottom: 0;
}

.callout {
  border-left: 4px solid var(--accent);
  background: linear-gradient(100deg, rgba(79, 70, 229, 0.08), rgba(99, 102, 241, 0.04));
  padding: 1rem 1.2rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1rem 0;
  font-size: 0.92rem;
  box-shadow: 0 1px 0 rgba(99, 102, 241, 0.08) inset;
}
.callout.warn {
  border-color: #d97706;
  background: #fffbeb;
  box-shadow: none;
}
.callout strong {
  display: block;
  margin-bottom: 0.25rem;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

.next-prev {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
}
.next-prev span {
  color: var(--text-muted);
  font-size: 0.75rem;
  display: block;
}
.next-prev a {
  font-weight: 500;
  transition: transform 0.2s ease, color 0.2s ease;
}
.next-prev a:hover {
  text-decoration: none;
  color: var(--accent-hover);
  transform: translateX(2px);
}

footer.doc-footer {
  margin-top: 2rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Rate limit cards (errors page) */
.rate-limits {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.1rem;
  margin: 1.25rem 0 1.5rem;
}

.rate-card {
  position: relative;
  padding: 1.2rem 1.25rem 1.3rem;
  background: linear-gradient(165deg, #f8fafc, #f1f5f9);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.4s var(--enter-ease), box-shadow 0.35s ease, border-color 0.3s ease;
  animation: cardRise 0.6s var(--enter-ease) both;
}
.rate-limits .rate-card:nth-child(2) {
  animation-delay: 0.08s;
}

.rate-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #818cf8, #c084fc);
  opacity: 0.9;
  transform: scaleX(0.85);
  transform-origin: left;
  transition: transform 0.45s var(--enter-ease);
}

.rate-card:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 20px 40px -20px rgba(79, 70, 229, 0.28);
  border-color: rgba(99, 102, 241, 0.35);
}

.rate-card:hover::before {
  transform: scaleX(1);
}

.rate-card__kicker {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 700;
  margin: 0 0 0.4rem;
}

.rate-card__value {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #0f172a;
  line-height: 1.1;
  margin: 0 0 0.1rem;
}

.rate-card__unit {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  margin-left: 0.15em;
  letter-spacing: 0.02em;
}

.rate-card__sub {
  font-size: 0.85rem;
  color: #475569;
  font-weight: 600;
  margin: 0 0 0.6rem;
}

.rate-card__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* Docs base URL (index) */
.doc-hero {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr;
  gap: 1.5rem;
  margin: 0 0 2.5rem;
  padding: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(130deg, #f8fafc 0%, #fff 40%, #f1f5f9 100%);
  box-shadow: 0 16px 40px -24px rgba(79, 70, 229, 0.25);
  animation: cardRise 0.7s var(--enter-ease) both;
}
.doc-hero__top {
  padding: 1.5rem 1.5rem 1.6rem;
  position: relative;
}
.doc-hero__top::after {
  content: "";
  position: absolute;
  right: 0;
  top: 12%;
  bottom: 12%;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--border), transparent);
  opacity: 0.8;
}
.doc-hero__side {
  padding: 1.4rem 1.35rem 1.5rem 0.5rem;
  background: rgba(255, 255, 255, 0.5);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
@media (max-width: 900px) {
  .doc-hero {
    grid-template-columns: 1fr;
  }
  .doc-hero__top::after {
    display: none;
  }
  .doc-hero__side {
    padding: 0 1.5rem 1.5rem;
  }
}
.doc-hero__badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #4f46e5;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}
.doc-hero__title {
  margin: 0 0 0.4rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  font-weight: 600;
}
.doc-hero__path {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.5;
  margin: 0 0 0.2rem;
  color: #0f172a;
  word-break: break-all;
}
.doc-hero__path--subtle {
  color: #475569;
  font-size: 0.82rem;
  margin-top: 0.25rem;
}
.doc-hero__path-rest {
  color: #0f172a;
  font-weight: 500;
}
.doc-hero__scheme {
  color: #64748b;
}
.doc-hero__host {
  color: #6366f1;
  font-style: normal;
  font-weight: 600;
}
.doc-hero__or {
  margin: 0.75rem 0 0.15rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #94a3b8;
  font-weight: 600;
}
.doc-hero__hint {
  font-size: 0.9rem;
  color: #64748b;
  margin: 0.9rem 0 0.65rem;
  line-height: 1.5;
  max-width: 52ch;
}
.doc-hero__cta {
  display: block;
  margin: 0;
  font-size: 0.8rem;
  color: #475569;
  font-style: italic;
  border-left: 3px solid rgba(99, 102, 241, 0.4);
  padding: 0.3rem 0 0.3rem 0.7rem;
}
.doc-hero__side-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #64748b;
  font-weight: 800;
  margin: 0 0 0.4rem;
}
.doc-hero__list {
  margin: 0 0 0.5rem;
  padding-left: 0;
  list-style: none;
}
.doc-hero__list li {
  margin-bottom: 0.4rem;
}
.path-chip {
  display: inline-block;
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.12rem 0.45rem;
  font-size: 0.8rem;
}
.doc-hero__mini {
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.4;
  margin: 0.4rem 0 0;
}

/* Guide section labels */
.code-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #6366f1;
  margin: 1.25rem 0 0.4rem;
}
.code-label:first-child {
  margin-top: 0.25rem;
}

/* GET vs POST rules (guides) */
table.http-rules {
  font-size: 0.88rem;
  margin: 0.5rem 0 1.75rem;
  box-shadow: 0 4px 24px -8px rgba(2, 6, 23, 0.08);
}
table.http-rules td {
  vertical-align: middle;
}
.m {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  margin-right: 0.35rem;
  font-family: var(--font-mono);
  vertical-align: text-bottom;
}
.m-get {
  color: #166534;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
}
.m-post {
  color: #1d4ed8;
  background: #dbeafe;
  border: 1px solid #93c5fd;
}

@keyframes mainEnter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.995);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes cardRise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes meshDrift {
  0% {
    opacity: 0.8;
    transform: scale(1) translate(0, 0);
  }
  100% {
    opacity: 1;
    transform: scale(1.04) translate(-1%, 1%);
  }
}

@media (max-width: 900px) {
  .layout {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    height: auto;
    max-height: none;
    position: relative;
    border-right: 0;
    border-bottom: 1px solid var(--sidebar-border);
  }
  .main {
    padding: 1.4rem 1.35rem 2.5rem;
    border-radius: 0 0 var(--radius) var(--radius);
  }
  pre:hover,
  .code-block:hover {
    transform: none;
  }
  .rate-card:hover {
    transform: none;
  }
  .feature-card:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  body::before {
    animation: none;
  }
  .main,
  .doc-hero,
  .feature-card,
  .rate-card,
  .toc,
  .rate-limits .rate-card:nth-child(2) {
    animation: none;
  }
  .sidebar nav a,
  .sidebar nav a::before,
  .toc a,
  pre,
  .code-block,
  .next-prev a,
  table tbody tr,
  .feature-card,
  .rate-card,
  .rate-card::before,
  a {
    transition: none !important;
  }
  .sidebar nav a:hover,
  .next-prev a:hover,
  pre:hover,
  .code-block:hover,
  .rate-card:hover,
  .feature-card:hover,
  .toc:hover,
  .toc:hover a {
    transform: none !important;
  }
  .main {
    transform: none;
  }
}
