/* ──────────────────────────────────────────────────────────
   OrderPing Docs — shared shell
   Matches visual language of krilabs-site/index.html
   (emerald green, glassmorphism, Bebas + Poppins)
   ────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #F5FFFB;
  color: #1C1917;
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ── Ambient glows (shared with main site) ── */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}
.orb-gold  { background: radial-gradient(circle, rgba(6,95,70,.12) 0%, transparent 70%); }
.orb-amber { background: radial-gradient(circle, rgba(5,150,105,.10) 0%, transparent 70%); }
.orb-cream { background: radial-gradient(circle, rgba(167,243,208,.14) 0%, transparent 70%); }

/* ── Gradient text ── */
.grad {
  background: linear-gradient(135deg, #065F46 0%, #059669 40%, #064E3B 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Top nav (glass pill) ── */
.docs-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 14px 20px 10px;
  background: linear-gradient(#F5FFFB, rgba(245,255,251,.86));
  backdrop-filter: blur(8px);
}
.docs-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  background: rgba(255,255,255,.75);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(6,95,70,.10);
  border-radius: 100px;
  box-shadow: 0 2px 16px rgba(6,95,70,.06);
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.docs-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #1C1917;
  font-weight: 700;
  font-size: 16px;
}
.docs-brand img { border-radius: 7px; }
.docs-brand .docs-brand-tag {
  margin-left: 8px;
  padding: 3px 10px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  background: rgba(6,95,70,.08);
  color: #065F46;
  border: 1px solid rgba(6,95,70,.18);
  border-radius: 100px;
}
.docs-header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.docs-header-link {
  font-size: 13px;
  font-weight: 500;
  color: #6B7280;
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 100px;
  transition: color .2s, background .2s;
}
.docs-header-link:hover { color: #1C1917; background: rgba(6,95,70,.06); }
.docs-install-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #065F46, #064E3B);
  color: #fff;
  font-weight: 600;
  font-size: 12px;
  padding: 8px 16px;
  border-radius: 100px;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(6,95,70,.22);
  transition: transform .2s, box-shadow .2s;
}
.docs-install-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(6,95,70,.3); }
.docs-menu-toggle {
  display: none;
  background: rgba(6,95,70,.08);
  border: 1px solid rgba(6,95,70,.18);
  border-radius: 10px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  color: #065F46;
  align-items: center;
  justify-content: center;
}

/* ── Layout: sidebar + main ── */
.docs-layout {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 20px 60px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 40px;
  position: relative;
}

/* ── Sidebar ── */
.docs-sidebar {
  position: sticky;
  top: 84px;
  align-self: start;
  max-height: calc(100vh - 104px);
  overflow-y: auto;
  padding: 20px 16px;
  background: rgba(255,255,255,.6);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(6,95,70,.10);
  border-radius: 18px;
  scrollbar-width: thin;
  scrollbar-color: rgba(6,95,70,.25) transparent;
}
.docs-sidebar::-webkit-scrollbar { width: 6px; }
.docs-sidebar::-webkit-scrollbar-thumb { background: rgba(6,95,70,.25); border-radius: 3px; }

.docs-sidebar-section {
  margin-bottom: 18px;
}
.docs-sidebar-section:last-child { margin-bottom: 0; }
.docs-sidebar-heading {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #065F46;
  padding: 6px 10px;
  margin-bottom: 4px;
}
.docs-sidebar-link {
  display: block;
  padding: 7px 10px;
  font-size: 13px;
  color: #6B7280;
  text-decoration: none;
  border-radius: 8px;
  transition: color .18s, background .18s;
  font-weight: 500;
}
.docs-sidebar-link:hover {
  color: #065F46;
  background: rgba(6,95,70,.05);
}
.docs-sidebar-link.is-active {
  color: #064E3B;
  background: rgba(6,95,70,.10);
  font-weight: 600;
}
.docs-sidebar-link.is-stub::after {
  content: 'SOON';
  margin-left: 8px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .1em;
  padding: 2px 6px;
  background: rgba(156,163,175,.2);
  color: #9CA3AF;
  border-radius: 100px;
  vertical-align: middle;
}

/* ── Main column ── */
.docs-main {
  min-width: 0;
}
.docs-breadcrumb {
  font-size: 12px;
  color: #9CA3AF;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.docs-breadcrumb a {
  color: #6B7280;
  text-decoration: none;
  transition: color .2s;
}
.docs-breadcrumb a:hover { color: #065F46; }
.docs-breadcrumb .sep { color: #D1D5DB; }

.docs-h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(38px, 5vw, 56px);
  line-height: 1;
  letter-spacing: .03em;
  margin: 0 0 12px;
  color: #1C1917;
}
.docs-summary {
  font-size: 16px;
  color: #6B7280;
  margin: 0 0 32px;
  max-width: 64ch;
}

/* ── Body typography ── */
.docs-body { max-width: 76ch; }
.docs-body h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  letter-spacing: .04em;
  line-height: 1.15;
  margin: 48px 0 14px;
  color: #1C1917;
}
.docs-body h2::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 2px;
  background: linear-gradient(90deg,#065F46,#059669);
  border-radius: 2px;
  vertical-align: middle;
  margin-right: 12px;
  margin-bottom: 5px;
}
.docs-body h3 {
  font-size: 17px;
  font-weight: 700;
  color: #1C1917;
  margin: 28px 0 8px;
}
.docs-body p { margin: 0 0 14px; color: #374151; }
.docs-body ul, .docs-body ol { margin: 0 0 16px; padding-left: 22px; color: #374151; }
.docs-body li { margin-bottom: 6px; }
.docs-body li::marker { color: #065F46; }
.docs-body a {
  color: #065F46;
  text-decoration: underline;
  text-decoration-color: rgba(6,95,70,.35);
  text-underline-offset: 3px;
  font-weight: 500;
}
.docs-body a:hover { text-decoration-color: #065F46; }
.docs-body strong { color: #1C1917; font-weight: 600; }
.docs-body code {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 13px;
  background: rgba(6,95,70,.08);
  color: #064E3B;
  padding: 1px 6px;
  border-radius: 5px;
  border: 1px solid rgba(6,95,70,.12);
}
.docs-body pre {
  background: #064E3B;
  color: #ECFDF5;
  padding: 16px 18px;
  border-radius: 12px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.55;
  margin: 0 0 20px;
  border: 1px solid rgba(6,95,70,.3);
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}
.docs-body pre code {
  background: transparent;
  color: inherit;
  border: 0;
  padding: 0;
  font-size: inherit;
}
.docs-body blockquote {
  border-left: 3px solid #059669;
  background: rgba(6,95,70,.05);
  margin: 0 0 20px;
  padding: 12px 16px;
  border-radius: 0 10px 10px 0;
  color: #374151;
}
.docs-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 20px;
  font-size: 13px;
  background: rgba(255,255,255,.6);
  border: 1px solid rgba(6,95,70,.12);
  border-radius: 10px;
  overflow: hidden;
}
.docs-body th {
  text-align: left;
  background: rgba(6,95,70,.06);
  color: #064E3B;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(6,95,70,.12);
}
.docs-body td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(6,95,70,.08);
  color: #374151;
  vertical-align: top;
}
.docs-body tr:last-child td { border-bottom: 0; }

/* ── Callouts ── */
.callout {
  border-radius: 12px;
  padding: 14px 16px;
  margin: 0 0 20px;
  font-size: 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid transparent;
}
.callout-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 1px;
}
.callout-body { flex: 1; }
.callout-body strong { display: block; margin-bottom: 2px; }
.callout-info { background: rgba(6,95,70,.05); border-color: rgba(6,95,70,.15); color: #064E3B; }
.callout-warn { background: rgba(217,119,6,.06); border-color: rgba(217,119,6,.2); color: #92400E; }
.callout-tip  { background: rgba(37,211,102,.07); border-color: rgba(37,211,102,.22); color: #15803D; }

/* ── Step list ── */
.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}
.steps > li {
  counter-increment: step;
  padding: 18px 20px 18px 62px;
  position: relative;
  background: rgba(255,255,255,.6);
  border: 1px solid rgba(6,95,70,.1);
  border-radius: 12px;
  margin-bottom: 10px;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 18px;
  top: 16px;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #065F46, #064E3B);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}
.steps > li strong { display: block; margin-bottom: 4px; color: #1C1917; }
.steps > li p { margin: 0; font-size: 14px; color: #4B5563; }

/* ── Related cards ── */
.docs-related {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid rgba(6,95,70,.1);
}
.docs-related-heading {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #065F46;
  margin-bottom: 14px;
}
.docs-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.docs-related-card {
  background: rgba(255,255,255,.7);
  border: 1px solid rgba(6,95,70,.12);
  border-radius: 12px;
  padding: 14px 16px;
  text-decoration: none;
  transition: transform .2s, border-color .2s, box-shadow .2s;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.docs-related-card:hover {
  transform: translateY(-2px);
  border-color: rgba(6,95,70,.3);
  box-shadow: 0 8px 24px rgba(6,95,70,.08);
}
.docs-related-card-title {
  font-size: 13px;
  font-weight: 600;
  color: #1C1917;
}
.docs-related-card-sub {
  font-size: 11px;
  color: #9CA3AF;
  margin-top: 2px;
}
.docs-related-card svg { color: #065F46; flex-shrink: 0; }

/* ── Feedback widget ── */
.docs-feedback {
  margin-top: 24px;
  padding: 16px 20px;
  background: rgba(255,255,255,.5);
  border: 1px solid rgba(6,95,70,.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.docs-feedback-q {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}
.docs-feedback-btns { display: flex; gap: 8px; }
.docs-feedback-btn {
  background: rgba(255,255,255,.8);
  border: 1px solid rgba(6,95,70,.18);
  border-radius: 100px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}
.docs-feedback-btn:hover { border-color: #065F46; color: #065F46; }
.docs-feedback-btn.is-active { background: #065F46; color: #fff; border-color: #065F46; }

.docs-updated {
  margin-top: 16px;
  font-size: 11px;
  color: #9CA3AF;
  letter-spacing: .04em;
}

/* ── Hub (landing) cards ── */
.hub-hero {
  position: relative;
  padding: 56px 36px 48px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(6,95,70,.06), rgba(167,243,208,.12));
  border: 1px solid rgba(6,95,70,.14);
  overflow: hidden;
  margin-bottom: 40px;
}
.hub-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(6,95,70,.08);
  border: 1px solid rgba(6,95,70,.2);
  color: #064E3B;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .12em;
  padding: 5px 14px;
  border-radius: 100px;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.hub-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #25D366;
  box-shadow: 0 0 8px rgba(37,211,102,.5);
}
.hub-hero h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(44px, 6vw, 72px);
  line-height: 1;
  letter-spacing: .03em;
  margin: 0 0 14px;
  color: #1C1917;
}
.hub-hero p {
  font-size: 16px;
  color: #4B5563;
  max-width: 56ch;
  margin: 0;
}
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.hub-card {
  background: rgba(255,255,255,.7);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(6,95,70,.12);
  border-radius: 16px;
  padding: 22px;
  text-decoration: none;
  transition: transform .25s, border-color .25s, box-shadow .25s;
  display: block;
}
.hub-card:hover {
  transform: translateY(-3px);
  border-color: rgba(6,95,70,.28);
  box-shadow: 0 16px 40px rgba(6,95,70,.09);
}
.hub-card-num {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  color: rgba(6,95,70,.55);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.hub-card-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 24px;
  letter-spacing: .04em;
  color: #1C1917;
  margin: 0 0 6px;
}
.hub-card-desc {
  font-size: 13px;
  color: #6B7280;
  line-height: 1.55;
  margin: 0 0 12px;
}
.hub-card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 12px;
  color: #065F46;
  font-weight: 500;
}

/* ── Footer ── */
.docs-footer {
  border-top: 1px solid rgba(6,95,70,.08);
  background: #F5FFFB;
  padding: 28px 20px;
  font-size: 12px;
  color: #9CA3AF;
}
.docs-footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.docs-footer a {
  color: #6B7280;
  text-decoration: none;
  margin-left: 18px;
  transition: color .2s;
}
.docs-footer a:first-of-type { margin-left: 0; }
.docs-footer a:hover { color: #065F46; }

/* ── Reveal animation ── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ── Mobile ── */
@media (max-width: 900px) {
  .docs-layout {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px 16px 60px;
  }
  .docs-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    max-height: 100vh;
    border-radius: 0 16px 16px 0;
    z-index: 100;
    transform: translateX(-105%);
    transition: transform .25s ease;
    box-shadow: 0 20px 60px rgba(6,95,70,.15);
  }
  .docs-sidebar.is-open { transform: translateX(0); }
  .docs-menu-toggle { display: inline-flex; }
  .docs-header-link { display: none; }
  .docs-sidebar-scrim {
    position: fixed;
    inset: 0;
    background: rgba(17,24,39,.35);
    backdrop-filter: blur(2px);
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
  }
  .docs-sidebar-scrim.is-open { opacity: 1; pointer-events: auto; }
  .docs-h1 { font-size: 36px; }
  .hub-hero { padding: 36px 24px 32px; }
}
