/* ─────────────────────────────────────────
   RLPeak — Design system
   ───────────────────────────────────────── */

:root {
  --bg:        #141414;
  --surface:   #1A1A1A;
  --surface-2: #181818;
  --surface-3: #1E1E1E;
  --hover:     #242424;
  --selected:  #1A2A3D;
  --border:    #2E2E2E;
  --border-hi: #3A3A3A;
  --text:      #FFFFFF;
  --text-alt:  #7AA0C4;
  --muted:     #4A6A90;
  --primary:   #3069B0;
  --primary-hi:#4280C8;
  --warn:      #C29947;

  --r-sm: 3px;
  --r-md: 5px;
  --r-lg: 8px;

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--primary);
  color: #fff;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hi); }

a { color: var(--primary); text-decoration: none; transition: color .15s; }
a:hover { color: var(--primary-hi); }

img { max-width: 100%; display: block; }

/* ─── Container ─── */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}
@media (min-width: 768px) {
  .container { padding: 0 48px; }
}

/* ─── Header ─── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 56px;
  background: rgba(26, 26, 26, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
}
.logo:hover { color: var(--text); }
.logo-icon {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  overflow: visible;
  flex-shrink: 0;
  background: transparent;
}
.logo-icon svg { width: 13px; height: 13px; fill: #fff; }
.logo-name { font-size: 14px; font-weight: 600; letter-spacing: 0.02em; }
.logo-version {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  margin-left: 4px;
}

.nav {
  flex: 1;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
@media (min-width: 768px) { .nav { display: flex; } }

.nav-link {
  font-size: 12px;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: var(--r-sm);
  transition: color .15s, background .15s;
  font-weight: 500;
}
.nav-link:hover { color: var(--text-alt); background: var(--hover); }
.nav-link.active { color: var(--primary); }
.nav-link .ext-arrow { font-size: 9px; opacity: 0.7; margin-left: 2px; }

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.header-mobile-menu {
  display: flex;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 6px 8px;
  color: var(--text-alt);
  cursor: pointer;
  font-family: inherit;
  font-size: 11px;
}
@media (min-width: 768px) { .header-mobile-menu { display: none; } }

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  padding: 7px 16px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s, opacity .15s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-hi); color: #fff; }
.btn-primary:active { opacity: 0.9; }

.btn-ghost {
  background: transparent;
  color: var(--text-alt);
  border-color: var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: var(--border-hi); background: var(--surface); }

.btn-lg {
  font-size: 13px;
  padding: 11px 22px;
}

.btn svg {
  width: 12px; height: 12px;
  fill: currentColor;
  flex-shrink: 0;
}
.btn-lg svg { width: 14px; height: 14px; }

/* ─── Hero ─── */
.hero {
  padding: 64px 0 48px;
}
@media (min-width: 768px) {
  .hero { padding: 96px 0 72px; }
}

.hero-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-alt);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 4px 10px;
  margin-bottom: 28px;
}
.hero-tag .dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #3FA47A;
  margin-right: 6px;
  vertical-align: middle;
  box-shadow: 0 0 6px rgba(63,164,122,0.5);
}

.hero-title {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  max-width: 720px;
  margin-bottom: 18px;
}
@media (min-width: 768px) {
  .hero-title { font-size: 44px; }
}
.hero-title em {
  color: var(--primary);
  font-style: normal;
}

.hero-sub {
  font-size: 15px;
  color: var(--text-alt);
  max-width: 560px;
  margin-bottom: 32px;
}
@media (min-width: 768px) { .hero-sub { font-size: 16px; } }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}

.hero-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.hero-meta-item { display: inline-flex; align-items: center; gap: 5px; }
.hero-meta-item::before {
  content: '';
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--muted);
}
.hero-meta-item:first-child::before { display: none; }

/* ─── Hero screenshot ─── */
.hero-shot {
  margin-top: 56px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 8px;
  position: relative;
}
.hero-shot-frame {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.hero-shot-frame img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: calc(var(--r-sm) - 2px);
  object-fit: contain;
}
.small-note {
  max-width: 900px;
  font-size: 14px;
  color: var(--text-alt);
}

/* ─── Sections ─── */
.section {
  padding: 64px 0;
  border-top: 1px solid var(--border);
}

.section-label {
  display: inline-block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 14px;
}

.section-title {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
  max-width: 640px;
}
@media (min-width: 768px) {
  .section-title { font-size: 28px; }
}

.section-sub {
  color: var(--text-alt);
  font-size: 15px;
  max-width: 640px;
  margin-bottom: 36px;
}

/* ─── Feature grid ─── */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 640px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
}

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 20px 22px;
  transition: border-color .15s, transform .15s;
}
.feature:hover { border-color: var(--border-hi); }
.feature-tag {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 10px;
  font-family: var(--font-mono);
}
.feature-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}
.feature-text {
  color: var(--text-alt);
  font-size: 13px;
  line-height: 1.7;
}

/* ─── Heritage block ─── */
.heritage {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 2px solid var(--primary);
  border-radius: var(--r-md);
  padding: 24px 28px;
  font-size: 14px;
  color: var(--text-alt);
  line-height: 1.8;
  max-width: 760px;
}
.heritage strong {
  color: var(--text);
  font-weight: 500;
}

/* ─── Tech specs ─── */
.specs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  font-family: var(--font-mono);
  max-width: 640px;
}
.spec-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  padding: 11px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.spec-row:last-child { border-bottom: none; }
.spec-key { color: var(--muted); }
.spec-val { color: var(--text-alt); overflow-wrap: anywhere; }

/* ─── Docs layout ─── */
.docs-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding: 40px 0 80px;
}
@media (min-width: 900px) {
  .docs-layout { grid-template-columns: 220px 1fr; gap: 48px; }
}

.docs-sidebar {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px 0;
  position: sticky;
  top: 72px;
  align-self: start;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
}
.docs-sidebar-group {
  margin-bottom: 8px;
}
.docs-sidebar-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  padding: 8px 18px;
  font-weight: 600;
}
.docs-sidebar-link {
  display: block;
  padding: 6px 18px;
  font-size: 13px;
  color: var(--text-alt);
  border-left: 2px solid transparent;
  transition: color .15s, border-color .15s, background .15s;
}
.docs-sidebar-link:hover {
  background: var(--hover);
  color: var(--text);
}
.docs-sidebar-link.active {
  color: var(--primary);
  border-left-color: var(--primary);
  background: rgba(48,105,176,0.06);
}

.docs-content {
  min-width: 0;
}
.docs-content h1 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.docs-content h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 36px 0 12px;
  letter-spacing: -0.01em;
  scroll-margin-top: 80px;
}
.docs-content h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 24px 0 10px;
}
.docs-content p {
  color: var(--text-alt);
  margin-bottom: 14px;
  font-size: 14px;
}
.docs-content ul, .docs-content ol {
  margin-left: 20px;
  margin-bottom: 14px;
  color: var(--text-alt);
}
.docs-content li {
  margin-bottom: 4px;
  font-size: 14px;
}
.docs-content .lead {
  font-size: 15px;
  color: var(--text-alt);
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.docs-content code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-alt);
  background: var(--surface-3);
  padding: 1px 6px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
}
.docs-content pre {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin: 12px 0 18px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-alt);
}
.docs-content pre code {
  background: transparent;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}
.docs-content kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 1px 6px;
  color: var(--text-alt);
}

.notice {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 2px solid var(--primary);
  border-radius: var(--r-md);
  padding: 14px 18px;
  margin: 16px 0;
  font-size: 13px;
  color: var(--text-alt);
}
.notice.warn { border-left-color: var(--warn); }
.notice strong { color: var(--text); font-weight: 500; }

.banner-edit {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 16px;
  margin-bottom: 24px;
  font-size: 12px;
  color: var(--text-alt);
  display: flex;
  align-items: center;
  gap: 10px;
}
.banner-edit svg { width: 12px; height: 12px; fill: var(--muted); flex-shrink: 0; }
.banner-edit a { color: var(--primary); }

/* ─── FAQ ─── */
.faq-list {
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color .15s;
}
.faq-item[open] { border-color: var(--border-hi); }
.faq-q {
  cursor: pointer;
  list-style: none;
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--muted);
  flex-shrink: 0;
  transition: transform .15s, color .15s;
}
.faq-item[open] .faq-q::after {
  content: '−';
  color: var(--primary);
}
.faq-a {
  padding: 0 18px 16px;
  font-size: 13px;
  color: var(--text-alt);
  line-height: 1.7;
}
.faq-a p { margin-bottom: 8px; }
.faq-a p:last-child { margin-bottom: 0; }
.faq-a code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--surface-2);
  padding: 1px 5px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  color: var(--text-alt);
}

/* ─── Footer ─── */
.footer {
  border-top: 1px solid var(--border);
  margin-top: 64px;
  padding: 56px 0 40px;
  background: var(--surface-2);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 40px;
}
@media (min-width: 640px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}
.footer-brand .logo { margin-bottom: 12px; }
.footer-brand-text {
  font-size: 12px;
  color: var(--muted);
  max-width: 280px;
  line-height: 1.7;
}
.footer-col-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 12px;
}
.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.footer-col a {
  font-size: 13px;
  color: var(--text-alt);
}
.footer-col a:hover { color: var(--text); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  font-family: var(--font-mono);
}

/* ─── Mobile menu ─── */
.mobile-nav {
  display: none;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.mobile-nav.open { display: block; }
.mobile-nav ul {
  list-style: none;
  padding: 8px 0;
}
.mobile-nav li a {
  display: block;
  padding: 10px 24px;
  font-size: 13px;
  color: var(--text-alt);
}
.mobile-nav li a:hover { background: var(--hover); color: var(--text); }
@media (min-width: 768px) {
  .mobile-nav { display: none !important; }
}

/* ─── Page header (non-home) ─── */
.page-head {
  padding: 56px 0 32px;
}
.page-head-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--primary);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.page-head-title {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.page-head-sub {
  font-size: 14px;
  color: var(--text-alt);
  max-width: 640px;
}


.logo-icon img {
  width: 32px;
  height: 32px;
  display: block;
  object-fit: contain;
  border-radius: 0;
}


/* Trust & safety / VirusTotal */
.trust-section {
  position: relative;
}

.trust-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid rgba(48, 105, 176, 0.55);
  background: linear-gradient(180deg, rgba(48, 105, 176, 0.08), rgba(24, 24, 24, 0.92));
  border-radius: var(--r-sm);
  padding: 24px;
}

.trust-panel h3 {
  margin: 12px 0 8px;
  color: #ffffff;
}

.trust-panel p {
  margin: 0;
  max-width: 760px;
  color: #7AA0C4;
}

.trust-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(122, 160, 196, 0.35);
  background: rgba(48, 105, 176, 0.18);
  color: #ffffff;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.trust-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: max-content;
  border: 1px solid rgba(48, 105, 176, 0.75);
  background: #3069B0;
  color: #ffffff;
  border-radius: 4px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.trust-link:hover {
  background: #235db0;
  border-color: #7AA0C4;
}

.trust-faq a {
  color: #7AA0C4;
  text-decoration: none;
  border-bottom: 1px solid rgba(122, 160, 196, 0.45);
}

.trust-faq a:hover {
  color: #ffffff;
  border-bottom-color: #ffffff;
}

@media (max-width: 760px) {
  .trust-panel {
    flex-direction: column;
    align-items: flex-start;
  }

  .trust-link {
    width: 100%;
  }
}
