/**
 * RewardMate Theme Main Stylesheet
 * Brand: Neo-Pastel Commerce Gamification
 */

:root {
  /* Surface Colors (Crisp Slate-Teal Canvas matching Logo) */
  --rm-surface: #F8FBFC;
  --rm-surface-dim: #D5DFE5;
  --rm-surface-bright: #F8FBFC;
  --rm-surface-container-lowest: #FFFFFF;
  --rm-surface-container-low: #EFF4F7;
  --rm-surface-container: #E5EDF1;
  --rm-surface-container-high: #DCE5EA;
  --rm-surface-container-highest: #D3DDE3;
  --rm-surface-card: #FFFFFF;
  --rm-surface-subtle: #F1F5F8;

  /* Text & On-Surface (Matching Logo 'Reward' & Subtitle) */
  --rm-on-surface: #071828;
  --rm-on-surface-variant: #5F6B75;
  --rm-inverse-surface: #0F2438;
  --rm-inverse-on-surface: #EDF4F8;

  /* Brand Teal Palette (Matching Logo 'R' Ribbon & 'Mate') */
  --rm-primary: #016968;
  --rm-primary-container: #004F50;
  --rm-on-primary: #FFFFFF;
  --rm-emerald-active: #098783;
  --rm-emerald-deep: #004A49;
  --rm-emerald-light: #E6F5F5;

  /* Gold & Coin Accents (Matching Logo Star Coin & Ribbon Tail) */
  --rm-secondary: #C67800;
  --rm-gold-coin: #F0A204;
  --rm-amber-bright: #FBBF24;
  --rm-gold-tint: #FEF3C7;

  /* Gamification Accents */
  --rm-tertiary: #3E2488;
  --rm-gamify-lavender: #9F86FA;
  --rm-lavender-tint: #F3F0FF;
  --rm-pastel-neon: #F2FF66;
  --rm-brand-ink: #071828;

  /* Strokes & Borders */
  --rm-stroke-stark: #071828;
  --rm-stroke-subtle: #E2E8F0;
  --rm-outline: #6E7A84;
  --rm-outline-variant: #CAD5DE;

  /* Typography */
  --rm-font-headline: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --rm-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Base resets & typography */
html {
  scroll-behavior: smooth;
  font-family: var(--rm-font-body);
  background-color: var(--rm-surface);
  color: var(--rm-on-surface);
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--rm-surface);
  color: var(--rm-on-surface);
  font-family: var(--rm-font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
.font-headline,
.font-display-hero,
.font-headline-lg,
.font-headline-md,
.font-headline-sm,
.font-headline-xs,
.font-label-eyebrow,
.font-label-lg,
.font-label-md,
.font-label-sm {
  font-family: var(--rm-font-headline);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--rm-surface-container-low);
}
::-webkit-scrollbar-thumb {
  background: var(--rm-outline-variant);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--rm-primary-container);
}

/* Selection */
::selection {
  background-color: var(--rm-pastel-neon);
  color: var(--rm-brand-ink);
}

/* Custom Range Input */
input[type=range] {
  -webkit-appearance: none;
  background: transparent;
}
input[type=range]:focus {
  outline: none;
}
input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  height: 10px;
  cursor: pointer;
  background: #ecefe9;
  border-radius: 9999px;
  border: 1px solid rgba(17, 17, 17, 0.08);
}
input[type=range]::-webkit-slider-thumb {
  height: 24px;
  width: 24px;
  border-radius: 50%;
  background: var(--rm-primary);
  cursor: pointer;
  -webkit-appearance: none;
  margin-top: -7px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2), 0 0 0 3px #ffffff, 0 0 0 5px var(--rm-emerald-active);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
input[type=range]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25), 0 0 0 3px #ffffff, 0 0 0 6px var(--rm-emerald-active);
}
input[type=range]::-moz-range-track {
  width: 100%;
  height: 10px;
  cursor: pointer;
  background: #ecefe9;
  border-radius: 9999px;
}
input[type=range]::-moz-range-thumb {
  height: 24px;
  width: 24px;
  border-radius: 50%;
  background: var(--rm-primary);
  cursor: pointer;
  border: 3px solid #ffffff;
  box-shadow: 0 0 0 2px var(--rm-emerald-active);
}

/* Details and Summary Accordions */
details > summary {
  list-style: none;
}
details > summary::-webkit-details-marker {
  display: none;
}

/* Floating animation */
@keyframes rm-float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}
.animate-rm-float {
  animation: rm-float 4s ease-in-out infinite;
}

/* Pulse glow animation */
@keyframes rm-glow {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(1.05); }
}
.animate-rm-glow {
  animation: rm-glow 6s ease-in-out infinite;
}

/* Spin Wheel Styling */
#wheel-graphic {
  transition: transform 4s cubic-bezier(0.15, 0.9, 0.25, 1);
  will-change: transform;
}

/* Glass Header */
.header-glass {
  background: rgba(247, 250, 244, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
}

/* Header navigation safeguards */
header nav a {
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-block;
  line-height: 1.25rem;
}

header .h-20 a.rounded-full {
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.25rem;
}

/* Stark Pill Buttons */
.rm-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 9999px;
  background-color: var(--rm-primary-container);
  color: var(--rm-on-primary);
  padding: 0.75rem 1.75rem;
  font-family: var(--rm-font-headline);
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.25rem;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  text-decoration: none;
}
.rm-btn-primary:hover {
  background-color: var(--rm-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(1, 105, 104, 0.25);
}

.rm-btn-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 9999px;
  background-color: var(--rm-brand-ink);
  color: var(--rm-surface-card);
  padding: 0.875rem 2rem;
  font-family: var(--rm-font-headline);
  font-weight: 600;
  font-size: 0.9375rem;
  transition: all 0.2s ease;
  text-decoration: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.rm-btn-dark:hover {
  background-color: #2a2a2a;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.rm-btn-neon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 9999px;
  background-color: var(--rm-pastel-neon);
  color: var(--rm-brand-ink);
  padding: 0.875rem 2rem;
  font-family: var(--rm-font-headline);
  font-weight: 700;
  font-size: 0.9375rem;
  border: 1px solid var(--rm-brand-ink);
  transition: all 0.2s ease;
  text-decoration: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}
.rm-btn-neon:hover {
  background-color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.rm-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 9999px;
  background-color: var(--rm-surface-card);
  color: var(--rm-brand-ink);
  padding: 0.875rem 2rem;
  font-family: var(--rm-font-headline);
  font-weight: 600;
  font-size: 0.9375rem;
  border: 1px solid rgba(17, 17, 17, 0.16);
  transition: all 0.2s ease;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.rm-btn-outline:hover {
  background-color: var(--rm-surface-subtle);
  border-color: var(--rm-brand-ink);
  transform: translateY(-1px);
}

/* Card curvature and elevation */
.rm-card {
  background-color: var(--rm-surface-card);
  border-radius: 1.5rem;
  padding: 1.75rem;
  border: 1px solid rgba(17, 17, 17, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.rm-card:hover {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.06);
}

/* Badges */
.rm-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border-radius: 9999px;
  padding: 0.35rem 0.85rem;
  font-family: var(--rm-font-headline);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Material symbols vertical alignment */
.material-symbols-outlined {
  vertical-align: middle;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
.material-symbols-outlined.fill-1 {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Mobile Nav Drawer */
#rm-mobile-menu {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}
#rm-mobile-menu.menu-closed {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}
#rm-mobile-menu.menu-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* WordPress Content formatting */
.entry-content p {
  margin-bottom: 1.25rem;
  line-height: 1.75;
}
.entry-content h2 {
  font-size: 1.875rem;
  line-height: 2.25rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}
.entry-content h3 {
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}
.entry-content ul, .entry-content ol {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}
.entry-content li {
  margin-bottom: 0.5rem;
}
.entry-content code {
  background: var(--rm-surface-container);
  padding: 0.2rem 0.4rem;
  border-radius: 0.375rem;
  font-size: 0.875em;
}

/* ==========================================================================
   REWARDMATE DOCUMENTATION & KNOWLEDGE BASE STYLES
   ========================================================================== */
.rm-docs-wrap {
  position: relative;
  width: 100%;
}
.rm-docs-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: start;
}
@media (min-width: 1024px) {
  .rm-docs-layout {
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 3rem;
  }
}

/* Sidebar */
.rm-docs-sidebar {
  background: var(--rm-surface-card);
  border: 1px solid var(--rm-stroke-subtle);
  border-radius: 1.5rem;
  padding: 1.5rem;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  position: sticky;
  top: 6rem;
  box-shadow: 0 4px 20px -2px rgba(10, 92, 54, 0.05);
}
.rm-docs-sidebar::-webkit-scrollbar {
  width: 5px;
}
.rm-docs-sidebar::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 10px;
}
.rm-docs-sidebar__label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--rm-on-surface-variant);
  margin: 1.25rem 0 0.5rem;
  padding-left: 0.5rem;
}
.rm-docs-sidebar__label:first-child {
  margin-top: 0;
}
.rm-docs-nav a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  color: var(--rm-on-surface-variant);
  transition: all 0.15s ease;
  line-height: 1.35;
  text-decoration: none;
}
.rm-docs-nav a:hover {
  background: var(--rm-surface-subtle);
  color: var(--rm-primary);
}
.rm-docs-nav a.active {
  background: var(--rm-emerald-light);
  color: var(--rm-primary);
  font-weight: 600;
}
.rm-docs-nav a .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #94A3B8;
  flex-shrink: 0;
  transition: background 0.15s ease;
}
.rm-docs-nav a:hover .dot {
  background: var(--rm-emerald-active);
}
.rm-docs-nav a.active .dot {
  background: var(--rm-primary);
  box-shadow: 0 0 0 3px rgba(9, 135, 131, 0.25);
}

/* Category Grid */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}
.cat-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  background: var(--rm-surface-card);
  border: 1px solid var(--rm-stroke-subtle);
  border-radius: 1.25rem;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  text-decoration: none;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}
.cat-card:hover {
  transform: translateY(-3px);
  border-color: var(--rm-emerald-active);
  box-shadow: 0 12px 24px -6px rgba(10, 92, 54, 0.08);
}
.cat-card__icon {
  font-size: 2rem;
  margin-bottom: 0.85rem;
  line-height: 1;
}
.cat-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--rm-on-surface);
  margin-bottom: 0.4rem;
}
.cat-card p {
  font-size: 0.875rem;
  color: var(--rm-on-surface-variant);
  line-height: 1.5;
  margin-bottom: 1rem;
  flex-grow: 1;
}
.cat-card__count {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--rm-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* Article List */
.article-list {
  background: var(--rm-surface-card);
  border: 1px solid var(--rm-stroke-subtle);
  border-radius: 1.25rem;
  overflow: hidden;
  margin-bottom: 2.5rem;
}
.article-list h2 {
  font-size: 1.125rem;
  font-weight: 700;
  padding: 1.25rem 1.5rem;
  background: var(--rm-surface-subtle);
  border-bottom: 1px solid var(--rm-stroke-subtle);
  color: var(--rm-on-surface);
  margin: 0;
}
.article-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--rm-stroke-subtle);
  color: var(--rm-on-surface);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: background 0.15s ease;
}
.article-list a:last-child {
  border-bottom: none;
}
.article-list a:hover {
  background: var(--rm-emerald-light);
  color: var(--rm-primary);
}
.article-list a span:last-child {
  font-size: 0.8125rem;
  color: var(--rm-on-surface-variant);
  white-space: nowrap;
}

/* Breadcrumbs */
.docs-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--rm-on-surface-variant);
  margin-bottom: 1.25rem;
}
.docs-breadcrumb a {
  color: var(--rm-primary);
  text-decoration: none;
  font-weight: 600;
}
.docs-breadcrumb a:hover {
  text-decoration: underline;
}
.docs-breadcrumb__sep {
  color: #CBD5E1;
}

/* Article Header */
.article-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rm-stroke-subtle);
}
.article-header .pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--rm-emerald-light);
  color: var(--rm-primary);
  padding: 0.25rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
  border: 1px solid rgba(9, 135, 131, 0.25);
}
.article-header h1 {
  font-size: 2.25rem;
  line-height: 1.2;
  font-weight: 800;
  color: var(--rm-on-surface);
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}
.article-header .lead {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--rm-on-surface-variant);
  margin-bottom: 1.25rem;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8125rem;
  color: var(--rm-on-surface-variant);
}

/* Badges */
.tag {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.tag--free {
  background: #ECFDF5;
  color: #059669;
  border: 1px solid #A7F3D0;
}
.tag--pro {
  background: #FAF5FF;
  color: #7C3AED;
  border: 1px solid #DDD6FE;
}

/* Table of Contents */
.toc {
  background: var(--rm-surface-subtle);
  border: 1px solid var(--rm-stroke-subtle);
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}
.toc__title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--rm-on-surface-variant);
  margin-bottom: 0.75rem;
}
.toc ol {
  list-style: decimal;
  margin: 0 0 0 1.25rem;
  padding: 0;
  font-size: 0.875rem;
}
.toc li {
  margin-bottom: 0.35rem;
}
.toc a {
  color: var(--rm-primary);
  text-decoration: none;
}
.toc a:hover {
  text-decoration: underline;
}

/* Prose Rich Article Content */
.prose {
  font-size: 1rem;
  line-height: 1.7;
  color: #334155;
}
.prose h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--rm-on-surface);
  letter-spacing: -0.015em;
  margin: 2rem 0 0.75rem;
  padding-top: 0.5rem;
}
.prose h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--rm-on-surface);
  margin: 1.5rem 0 0.5rem;
}
.prose p {
  margin-bottom: 1.15rem;
}
.prose ul, .prose ol {
  margin: 0 0 1.25rem 1.5rem;
}
.prose li {
  margin-bottom: 0.4rem;
}
.prose li::marker {
  color: var(--rm-primary);
}
.prose hr {
  border: none;
  border-top: 1px solid var(--rm-stroke-subtle);
  margin: 2.25rem 0;
}

/* Callouts */
.callout {
  border-radius: 1rem;
  padding: 1.15rem 1.35rem;
  margin: 1.5rem 0;
  border: 1px solid var(--rm-stroke-subtle);
  background: var(--rm-surface-subtle);
}
.callout--tip {
  background: var(--rm-emerald-light);
  border-color: #86EFAC;
}
.callout--warn {
  background: #FFFBEB;
  border-color: #FDE68A;
}
.callout--pro {
  background: #FAF5FF;
  border-color: #DDD6FE;
}
.callout__title {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--rm-on-surface);
  margin-bottom: 0.4rem;
}
.callout p:last-child {
  margin-bottom: 0;
}

/* Numbered Steps */
.steps {
  counter-reset: step;
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
}
.steps li {
  position: relative;
  padding: 0 0 1.5rem 3rem;
  border-left: 2px solid #86EFAC;
  margin-left: 1rem;
}
.steps li:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: -1rem;
  top: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--rm-primary);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(10, 92, 54, 0.25);
}
.steps strong {
  display: block;
  color: var(--rm-on-surface);
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

/* Tables in Docs */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--rm-stroke-subtle);
  border-radius: 1rem;
  margin: 1.5rem 0;
  background: #fff;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.prose th, .prose td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--rm-stroke-subtle);
}
.prose th {
  background: var(--rm-surface-subtle);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--rm-on-surface-variant);
}
.prose tr:last-child td {
  border-bottom: none;
}
.prose td strong {
  color: var(--rm-on-surface);
}

/* Code Blocks */
.prose pre {
  background: #111111;
  color: #E2E8F0;
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 1.25rem 0 1.5rem;
  font-size: 0.875rem;
  line-height: 1.6;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.prose pre .c { color: #94A3B8; }
.prose pre .s { color: #86EFAC; }
.prose pre .k { color: #93C5FD; }
.prose code:not(pre code) {
  background: var(--rm-emerald-light);
  color: #0A5C36;
  padding: 0.15rem 0.45rem;
  border-radius: 0.375rem;
  font-size: 0.875em;
  font-family: monospace;
}

/* Feedback & Navigation */
.docs-feedback {
  margin: 3rem 0 2rem;
  padding: 1.5rem;
  background: var(--rm-surface-subtle);
  border-radius: 1rem;
  border: 1px solid var(--rm-stroke-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.docs-feedback p {
  margin: 0;
  font-weight: 600;
  color: var(--rm-on-surface);
}
.docs-feedback__btns {
  display: flex;
  gap: 0.5rem;
}
.docs-feedback__btns button {
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  background: #fff;
  border: 1px solid var(--rm-stroke-subtle);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--rm-on-surface);
  cursor: pointer;
  transition: all 0.15s ease;
}
.docs-feedback__btns button:hover {
  background: var(--rm-primary);
  color: #fff;
  border-color: var(--rm-primary);
}

.docs-article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
}
.docs-article-nav a {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  background: var(--rm-surface-card);
  border: 1px solid var(--rm-stroke-subtle);
  border-radius: 1rem;
  text-decoration: none;
  transition: all 0.15s ease;
}
.docs-article-nav a:hover {
  border-color: var(--rm-emerald-active);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(10, 92, 54, 0.05);
}
.docs-article-nav a span {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--rm-on-surface-variant);
  margin-bottom: 0.25rem;
}
.docs-article-nav a strong {
  font-size: 0.9375rem;
  color: var(--rm-primary);
}
.docs-article-nav a.next {
  text-align: right;
}

/* Search Dropdown */
.rm-docs-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--rm-stroke-subtle);
  border-radius: 1rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  max-height: 400px;
  overflow-y: auto;
  z-index: 50;
  display: none;
  margin-top: 0.5rem;
}
.rm-docs-search-results.open {
  display: block;
}
.rm-docs-search-item {
  display: flex;
  flex-direction: column;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--rm-stroke-subtle);
  text-decoration: none;
  transition: background 0.1s ease;
}
.rm-docs-search-item:last-child {
  border-bottom: none;
}
.rm-docs-search-item:hover, .rm-docs-search-item.active {
  background: var(--rm-emerald-light);
}
.rm-docs-search-item strong {
  color: var(--rm-on-surface);
  font-size: 0.9375rem;
}
.rm-docs-search-item span {
  color: var(--rm-on-surface-variant);
  font-size: 0.8125rem;
  margin-top: 0.2rem;
}
.rm-docs-search-empty {
  padding: 1.5rem;
  text-align: center;
  color: var(--rm-on-surface-variant);
  font-size: 0.875rem;
}

/* ==========================================================================
   DOCUMENTATION SCREENSHOTS, LIGHTBOX & RICH CONTENT
   ========================================================================== */
.rm-shot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0 3rem;
}
.rm-shot-card {
  background: #FFFFFF;
  border: 1px solid var(--rm-stroke-subtle);
  border-radius: 1.25rem;
  padding: 1.25rem;
  box-shadow: 0 4px 15px -2px rgba(1, 105, 104, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
}
.rm-shot-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px -4px rgba(1, 105, 104, 0.12);
  border-color: var(--rm-emerald-active);
}
.rm-shot-card .shot {
  margin: 0 0 0.85rem 0;
  border-radius: 0.875rem;
  box-shadow: none;
}

.shot {
  margin: 1.75rem 0 2rem;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--rm-stroke-subtle);
  background: #FFFFFF;
  box-shadow: 0 10px 25px -5px rgba(1, 105, 104, 0.06), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.shot:hover {
  box-shadow: 0 16px 32px -6px rgba(1, 105, 104, 0.12), 0 8px 16px -4px rgba(0, 0, 0, 0.06);
}
.shot img {
  width: 100%;
  height: auto;
  display: block;
  cursor: zoom-in;
  transition: transform 0.25s ease;
}
.shot:hover img {
  transform: scale(1.006);
}
.shot .caption {
  padding: 0.75rem 1.25rem;
  font-size: 0.8125rem;
  color: var(--rm-on-surface-variant);
  background: var(--rm-surface-subtle);
  border-top: 1px solid var(--rm-stroke-subtle);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  line-height: 1.45;
}
.shot .caption::before {
  content: "photo_camera";
  font-family: 'Material Symbols Outlined';
  font-size: 16px;
  color: var(--rm-primary);
  flex-shrink: 0;
}

/* Mini In-Article TOC Navigation */
.mini-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0 2rem;
  padding: 1rem 1.25rem;
  background: var(--rm-surface-subtle);
  border: 1px solid var(--rm-stroke-subtle);
  border-radius: 1rem;
}
.mini-toc a {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  background: #FFFFFF;
  border: 1px solid var(--rm-stroke-subtle);
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--rm-on-surface);
  text-decoration: none;
  transition: all 0.15s ease;
}
.mini-toc a:hover {
  background: var(--rm-primary);
  color: #FFFFFF;
  border-color: var(--rm-primary);
  transform: translateY(-1px);
}

/* Section Head & Kicker */
.section-head {
  margin-bottom: 1.25rem;
}
.section-kicker {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rm-primary);
  background: var(--rm-emerald-light);
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  margin-bottom: 0.5rem;
}

/* Grids and Cards inside Documentation */
.prose .grid {
  display: grid;
  gap: 1.25rem;
  margin: 1.5rem 0 2rem;
}
.prose .grid.two {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.prose .grid.three {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.prose .grid.four {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.prose .card {
  background: #FFFFFF;
  border: 1px solid var(--rm-stroke-subtle);
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03);
}
.prose .card strong {
  display: block;
  font-size: 1rem;
  color: var(--rm-on-surface);
  margin-bottom: 0.35rem;
}
.prose .card p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--rm-on-surface-variant);
  line-height: 1.5;
}
.prose .badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--rm-emerald-light);
  color: var(--rm-primary);
  padding: 0.25rem 0.65rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(1, 105, 104, 0.15);
}

/* Free vs Pro Features Matrix */
.matrix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}
.matrix-column {
  background: #FFFFFF;
  border-radius: 1.25rem;
  padding: 1.75rem;
  border: 1px solid var(--rm-stroke-subtle);
  box-shadow: 0 4px 15px -2px rgba(0, 0, 0, 0.04);
}
.matrix-column.premium {
  border-color: var(--rm-gold);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px -4px rgba(240, 162, 4, 0.12);
}
.matrix-column.premium::before {
  content: "RECOMMENDED";
  position: absolute;
  top: 15px;
  right: -30px;
  background: var(--rm-gold);
  color: #071828;
  font-weight: 800;
  font-size: 10px;
  padding: 4px 30px;
  transform: rotate(45deg);
}
.matrix-column h3 {
  margin-top: 0;
  font-size: 1.25rem;
  color: var(--rm-on-surface);
}
.matrix-column ul {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
}
.matrix-column li {
  padding: 0.6rem 0 0.6rem 1.75rem;
  position: relative;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--rm-surface-subtle);
  color: var(--rm-on-surface-variant);
}
.matrix-column li:last-child {
  border-bottom: none;
}
.matrix-column li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--rm-primary);
  font-weight: bold;
}
.matrix-column.premium li::before {
  color: var(--rm-gold);
}

/* Lightbox Modal */
#screenshot-lightbox {
  display: none;
  position: fixed;
  z-index: 99999;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(7, 24, 40, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 2rem;
  box-sizing: border-box;
}
#screenshot-lightbox .lightbox-content {
  max-width: 92vw;
  max-height: 84vh;
  border-radius: 1rem;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.15);
  animation: rmLightboxZoom 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  object-fit: contain;
}
#lightbox-caption {
  color: #F8FBFC;
  font-weight: 600;
  font-size: 0.9375rem;
  margin-top: 1rem;
  text-align: center;
  max-width: 800px;
  background: rgba(0, 0, 0, 0.4);
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  backdrop-filter: blur(4px);
}
.close-lightbox {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.close-lightbox:hover {
  background: var(--rm-gold);
  color: #071828;
  transform: rotate(90deg);
}
@keyframes rmLightboxZoom {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Custom Logo Utility */
.custom-logo-link {
  display: inline-flex;
  align-items: center;
}
.custom-logo {
  max-height: 44px;
  width: auto;
  object-fit: contain;
}
