/* ─── Page: Documentation ─── */

/* ─── INTRO ─── */
.docs-intro { padding-bottom: 40px; border-bottom: 1px solid var(--border); margin-bottom: 48px; }

/* ─── CALLOUT ─── */
.docs-callout {
  border-left: 3px solid var(--blue);
  background: #f7f8ff;
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin-bottom: 48px;
}
/* ─── DIVIDER ─── */
.docs-divider { border: none; border-top: 1px solid var(--border); margin: 32px 0 32px; }

/* ─── MAPPING PIPELINE ─── */
.docs-pipeline { margin-top: 40px; }
.docs-pipeline-label {
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--blue); margin-bottom: 16px;
}
.docs-pipeline-steps { display: flex; flex-direction: column; gap: 0; }
.docs-pipeline-step {
  border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden; margin-bottom: 8px;
}
.docs-pipeline-step-head {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
.docs-pipeline-num {
  font-size: 11px; font-weight: 800; color: var(--muted);
  font-family: 'Fira Code', Consolas, monospace; flex-shrink: 0;
}
.docs-pipeline-name {
  font-size: 13px; font-weight: 700; color: var(--black); flex-shrink: 0;
}
.docs-pipeline-desc {
  font-size: 12px; color: var(--muted); margin-left: auto; text-align: right;
}
.docs-terminal {
  background: #0f1117; color: #e2e8f0;
  font-family: 'Fira Code', 'SFMono-Regular', Consolas, monospace;
  font-size: 12.5px; line-height: 1.7;
  padding: 16px 20px; margin: 0; overflow-x: auto;
  border-radius: 0; white-space: pre;
}

/* ─── INSTALLATION ─── */
.docs-install-group { margin-bottom: 32px; }
.docs-install-os {
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--blue); margin-bottom: 10px;
}
.docs-install-note { font-size: 14px; color: var(--muted); line-height: 1.7; margin: 0 0 10px; }
.docs-install-steps { font-size: 14px; color: var(--muted); line-height: 1.8; margin: 0 0 0 16px; padding: 0; }
.docs-install-steps li { margin-bottom: 4px; }
.docs-codeblock {
  background: #f4f5f7; border: 1px solid var(--border); border-radius: 6px;
  padding: 12px 16px; font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 13px; color: var(--black); margin: 0 0 10px; overflow-x: auto;
}
code { font-family: 'SFMono-Regular', Consolas, monospace; font-size: 12.5px; background: #f0f1f3; padding: 1px 5px; border-radius: 4px; }

.docs-callout-label {
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--blue); display: block; margin-bottom: 6px;
}
.docs-callout p {
  font-size: 14px; color: var(--muted); line-height: 1.75; margin: 0;
}
.docs-callout p strong { color: var(--black); }
.docs-intro-title { font-size: clamp(22px, 2.8vw, 34px); font-weight: 800; color: var(--black); letter-spacing: -0.03em; line-height: 1.1; margin: 10px 0 14px; }
.docs-intro-sub { font-size: 15px; color: var(--muted); line-height: 1.75; max-width: 520px; margin-bottom: 24px; }
.docs-intro-table { margin-bottom: 28px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.docs-intro-row { display: grid; grid-template-columns: 130px 1fr 1fr; gap: 0; }
.docs-intro-row > div { padding: 10px 16px; font-size: 13px; border-bottom: 1px solid var(--border); }
.docs-intro-row:last-child > div { border-bottom: none; }
.docs-intro-row--head > div { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); background: var(--bg-alt); }
.docs-intro-row > div:not(:last-child) { border-right: 1px solid var(--border); }
.docs-intro-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-blue { background: var(--blue); color: #fff; border: 1.5px solid var(--blue); }
.btn-blue:hover { background: #1428e0; border-color: #1428e0; }

/* ─── LAYOUT ─── */
.docs-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  max-width: calc(var(--w) + var(--px) * 2);
  margin: 0 auto;
  padding: 58px var(--px) 0;
  gap: 0;
  align-items: start;
}

/* ─── SIDEBAR ─── */
.docs-sidebar {
  position: fixed;
  top: 72px;
  left: var(--docs-sidebar-left, 0px);
  width: 240px;
  padding: 48px 32px 48px 0;
  border-right: 1px solid var(--border);
  height: calc(100vh - 72px);
  overflow-y: auto;
}
.docs-content-col {
  grid-column: 2;
  min-width: 0;
}
.docs-nav { display: flex; flex-direction: column; gap: 28px; }
.docs-nav-group { display: flex; flex-direction: column; gap: 2px; }
.docs-nav-label {
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--muted);
  margin-bottom: 6px; padding-left: 10px;
}
.docs-nav-label--sub {
  color: #bbb; font-weight: 700; padding-left: 18px;
}
.docs-nav-group:has(.docs-nav-label--sub) .docs-nav-link { padding-left: 18px; }
.docs-nav-link {
  font-size: 13px; font-weight: 500; color: var(--muted);
  padding: 6px 10px; border-radius: 6px;
  transition: background .15s, color .15s;
  display: block;
}
.docs-nav-link:hover { background: var(--bg-alt); color: var(--black); }
.docs-nav-link.is-active { background: #eff1ff; color: var(--blue); font-weight: 600; }

/* ─── CONTENT ─── */
.docs-content {
  padding: 48px 0 80px 56px;
  min-width: 0;
}
.docs-section {
  padding-bottom: 64px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 64px;
}
.docs-section:last-child { border-bottom: none; margin-bottom: 0; }
.docs-section-tag {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--blue); margin-bottom: 10px;
}
.docs-section h2 {
  font-size: 21px; font-weight: 800; color: var(--black);
  letter-spacing: -0.03em; margin-bottom: 16px; line-height: 1.2;
}
.docs-section p {
  font-size: 15px; color: var(--muted); line-height: 1.8; margin-bottom: 16px;
}
.docs-section p:last-child { margin-bottom: 0; }

/* ─── OVERVIEW BLOCKS ─── */
.docs-overview-block {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.docs-overview-block:first-of-type { margin-top: 24px; }
.docs-overview-block-label {
  font-size: 13px; font-weight: 800; color: var(--black);
  letter-spacing: -0.01em; margin-bottom: 8px;
}

/* ─── OVERVIEW SPLIT ─── */
.docs-overview-split {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0; margin-top: 24px;
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
}
.docs-overview-col {
  padding: 24px 28px;
  border-right: 1px solid var(--border);
}
.docs-overview-col:last-child { border-right: none; }
.docs-overview-label {
  font-size: 13px; font-weight: 800; color: var(--black);
  letter-spacing: -0.01em; margin-bottom: 8px;
}
.docs-overview-desc {
  font-size: 13px; color: var(--muted); line-height: 1.65; margin-bottom: 14px;
}
.docs-overview-pills { display: flex; flex-wrap: wrap; gap: 6px; }

@media (max-width: 600px) {
  .docs-overview-split { grid-template-columns: 1fr; }
  .docs-overview-col { border-right: none; border-bottom: 1px solid var(--border); }
  .docs-overview-col:last-child { border-bottom: none; }
}

/* ─── OVERVIEW CARDS ─── */
.docs-cards {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px; margin-top: 24px;
}
.docs-card {
  border: 1px solid var(--border); border-radius: 10px;
  padding: 22px 20px; background: var(--bg-alt);
}
.docs-card-icon { font-size: 22px; margin-bottom: 10px; }
.docs-card-title { font-size: 14px; font-weight: 700; color: var(--black); margin-bottom: 6px; }
.docs-card-desc { font-size: 13px; color: var(--muted); line-height: 1.6; }

/* ─── TABLE ─── */
.docs-table-wrap { overflow-x: auto; margin-top: 8px; }
.docs-table {
  width: 100%; border-collapse: collapse;
  font-size: 14px; text-align: left;
}
.docs-table th {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--muted);
  padding: 10px 16px; border-bottom: 2px solid var(--border);
  background: var(--bg-alt);
}
.docs-table td {
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  color: var(--black); vertical-align: top;
}
.docs-table tr:last-child td { border-bottom: none; }
.docs-table code {
  font-size: 12px; background: var(--bg-alt); border: 1px solid var(--border);
  border-radius: 4px; padding: 2px 6px; font-family: monospace; color: var(--blue);
}

/* ─── CODE BLOCK ─── */
.docs-code-block {
  background: #0d0e26; border-radius: 10px;
  overflow: hidden; margin: 20px 0; border: 1px solid rgba(255,255,255,0.07);
}
.docs-code-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: rgba(255,255,255,0.3);
  padding: 10px 18px; border-bottom: 1px solid rgba(255,255,255,0.07);
}
.docs-code-block pre {
  margin: 0; padding: 20px 18px; overflow-x: auto;
}
.docs-code-block code {
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 13px; color: rgba(255,255,255,0.85); line-height: 1.7;
}

/* ─── PILLS ─── */
.docs-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.docs-pill {
  font-size: 12px; font-weight: 500; color: var(--black);
  background: var(--bg-alt); border: 1px solid var(--border);
  border-radius: 100px; padding: 4px 12px;
}

/* ─── LIDAR GRID ─── */
.docs-lidar-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden; margin: 20px 0;
}
.docs-lidar-item {
  background: var(--white); padding: 16px 18px;
  font-size: 14px; font-weight: 600; color: var(--black);
  display: flex; align-items: center; gap: 8px;
}
.docs-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--blue); flex-shrink: 0;
}

/* ─── PLATFORM GRID ─── */
.docs-platform-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 12px; margin-top: 20px;
}
.docs-platform-item {
  border: 1px solid var(--border); border-radius: 10px;
  padding: 18px 20px; background: var(--bg-alt);
}
.docs-platform-name { font-size: 14px; font-weight: 700; color: var(--black); margin-bottom: 4px; }
.docs-platform-sub { font-size: 12px; color: var(--muted); }

/* ─── OS GRID ─── */
.docs-os-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 12px; margin-top: 20px;
}
.docs-os-card {
  border: 1px solid var(--border); border-radius: 10px;
  padding: 20px; background: var(--white);
  display: flex; flex-direction: column; gap: 4px;
}
.docs-os-name { font-size: 15px; font-weight: 700; color: var(--black); }
.docs-os-sub { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.docs-badge {
  display: inline-block; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: #15803d; background: #dcfce7; border-radius: 100px;
  padding: 3px 10px; align-self: flex-start;
}
.docs-badge.is-contact { color: var(--blue); background: #eff1ff; }

/* ─── SPEC LIST ─── */
.docs-spec-list { margin-top: 20px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.docs-spec-row {
  display: flex; align-items: baseline;
  padding: 13px 20px; border-bottom: 1px solid var(--border);
  gap: 24px;
}
.docs-spec-row:last-child { border-bottom: none; }
.docs-spec-key { font-size: 12px; font-weight: 700; color: var(--muted); min-width: 180px; flex-shrink: 0; }
.docs-spec-val { font-size: 14px; color: var(--black); font-weight: 500; }

/* ─── NODE TABLES ─── */
.docs-node-table { margin-top: 32px; }
.docs-node-title {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: var(--black); border-radius: 8px 8px 0 0;
}
.docs-iotable {
  width: 100%; border-collapse: collapse;
  border: 1px solid var(--border); border-top: none;
  border-radius: 0 0 8px 8px; overflow: hidden;
}
.docs-iotable thead tr { background: var(--bg-alt); }
.docs-iotable th {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--muted);
  padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--border);
}
.docs-iotable td {
  font-size: 13px; color: var(--black);
  padding: 9px 12px; border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.docs-iotable tr:last-child td { border-bottom: none; }
.docs-iotable td:nth-child(2) { font-family: 'Fira Code', Consolas, monospace; font-size: 12px; color: var(--muted); }
.docs-iotable td:last-child { color: var(--muted); }
.docs-dir {
  font-size: 9px; font-weight: 800; letter-spacing: 0.1em;
  border-radius: 4px; padding: 3px 7px; white-space: nowrap;
}
.docs-dir--in  { background: #e8f5e9; color: #2e7d32; }
.docs-dir--out { background: #e3f2fd; color: #1565c0; }
.docs-dir--svc { background: #f3e5f5; color: #7b1fa2; }

/* ─── NODE CARDS ─── */
.docs-node-card {
  margin-top: 24px;
  border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden;
}
.docs-node-header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px;
  background: var(--black); border-bottom: 1px solid rgba(255,255,255,0.08);
}
.docs-node-name {
  font-size: 13px; font-weight: 700; color: #fff;
  font-family: 'Fira Code', 'Courier New', monospace; letter-spacing: 0;
}
.docs-node-role {
  font-size: 11px; font-weight: 600; color: var(--blue);
  background: rgba(26,42,255,0.18); border-radius: 100px;
  padding: 3px 10px; letter-spacing: 0.02em;
}
.docs-node-body {
  display: grid; grid-template-columns: 1fr 2px 1fr;
}
.docs-node-divider { background: var(--border); }
.docs-node-col { padding: 20px; }
.docs-node-services {
  display: flex; gap: 0; align-items: flex-start;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}
.docs-node-dir {
  font-size: 9px; font-weight: 800; letter-spacing: 0.12em;
  border-radius: 4px; padding: 3px 7px;
  margin-bottom: 14px; display: inline-flex; align-items: center; gap: 8px;
  white-space: nowrap; flex-shrink: 0; margin-right: 16px; align-self: flex-start;
}
.docs-node-dir--in  { background: #e8f5e9; color: #2e7d32; }
.docs-node-dir--out { background: #e3f2fd; color: #1565c0; }
.docs-node-dir--svc { background: #f3e5f5; color: #7b1fa2; margin-bottom: 0; }
.docs-node-ns {
  font-size: 9px; font-weight: 500; letter-spacing: 0;
  color: rgba(21,101,192,0.7); font-family: 'Fira Code', monospace; text-transform: none;
}
.docs-node-rows { display: flex; flex-direction: column; gap: 12px; }
.docs-node-row { display: flex; flex-direction: column; gap: 3px; }
.docs-node-type {
  font-size: 11px; font-family: 'Fira Code', 'Courier New', monospace;
  color: var(--blue); background: #eff1ff;
  border-radius: 4px; padding: 2px 7px; display: inline-block; width: fit-content;
}
.docs-node-desc {
  font-size: 12px; color: var(--muted); line-height: 1.5;
}
.docs-node-desc strong { color: var(--black); font-weight: 600; }

@media (max-width: 768px) {
  .docs-node-body { grid-template-columns: 1fr; }
  .docs-node-divider { height: 1px; width: 100%; }
}

/* ─── ROS GROUPS ─── */
.docs-ros-group { margin-top: 28px; }
.docs-ros-label {
  font-size: 13px; font-weight: 800; color: var(--black);
  margin-bottom: 12px; letter-spacing: -0.01em;
}
.docs-ros-sub {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--muted); margin-bottom: 8px;
  display: flex; align-items: center; gap: 10px;
}
.docs-ros-ns {
  font-size: 11px; font-weight: 500; text-transform: none;
  letter-spacing: 0; color: var(--blue); font-family: monospace;
}

/* ─── RTMAPS IMAGE ─── */
.docs-rtmaps-wrap { margin-top: 20px; }
.docs-rtmaps-img {
  display: block;
  border: 1px solid var(--border); border-radius: 8px;
  padding: 20px; text-align: center;
}
.docs-rtmaps-img img { width: 700px; max-width: 100%; display: inline-block; image-rendering: -webkit-optimize-contrast; }

/* ─── NOTES & INLINE LINKS ─── */
.docs-note { font-size: 13px; color: var(--muted); margin-top: 16px; }
.docs-note a, .docs-inline-link {
  color: var(--blue); font-weight: 600; background: none; border: none;
  cursor: pointer; padding: 0; font-size: inherit;
}
.docs-coming {
  display: inline-block; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: #fff; background: var(--blue); border-radius: 100px;
  padding: 3px 10px; vertical-align: middle; margin-left: 10px;
}

/* ─── FAQ ─── */
.docs-faq {
  border-top: 1px solid var(--border);
  padding: 64px 0 80px 56px;
  min-width: 0;
}
.docs-faq-inner {
  max-width: 720px;
}
.docs-faq-title {
  font-size: clamp(22px, 2.8vw, 32px); font-weight: 800;
  color: var(--black); letter-spacing: -0.03em; margin-bottom: 40px;
}
.docs-faq-group { margin-bottom: 36px; }
.docs-faq-group-label {
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--muted); margin-bottom: 12px;
}
.docs-faq-item {
  border-top: 1px solid var(--border);
}
.docs-faq-item:last-child { border-bottom: 1px solid var(--border); }
.docs-faq-q {
  font-size: 15px; font-weight: 600; color: var(--black);
  padding: 16px 0; cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; user-select: none;
}
.docs-faq-q::-webkit-details-marker { display: none; }
.docs-faq-q::after {
  content: '+'; font-size: 18px; font-weight: 400; color: var(--muted);
  flex-shrink: 0; transition: transform .2s;
}
.docs-faq-item[open] .docs-faq-q::after { content: '−'; }
.docs-faq-a {
  font-size: 14px; color: var(--muted); line-height: 1.8;
  padding-bottom: 20px; margin: 0;
}

@media (max-width: 768px) {
  .docs-faq { padding-left: 0; }
}

/* ─── RTMAPS CTA ─── */
.docs-rtmaps-cta {
  background: var(--black); border-radius: 10px;
  padding: 28px 32px; margin-top: 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.docs-rtmaps-cta p { font-size: 14px; color: rgba(255,255,255,0.5); margin: 0; }

/* ─── CTA ─── */
.docs-cta {
  background: var(--black); padding: 80px var(--px);
  text-align: center; border-top: 1px solid #1a1a1a;
}
.docs-cta h2 { font-size: clamp(21px, 2.8vw, 32px); font-weight: 800; color: #fff; letter-spacing: -0.03em; margin-bottom: 12px; }
.docs-cta p { font-size: 16px; color: rgba(255,255,255,0.45); margin-bottom: 32px; }
.docs-cta-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .docs-layout { grid-template-columns: 200px 1fr; }
  .docs-sidebar { width: 200px; }
  .docs-cards { grid-template-columns: 1fr; }
  .docs-os-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .docs-layout { grid-template-columns: 1fr; padding-top: 32px; }
  .docs-sidebar { display: none; }
  .docs-content-col { grid-column: 1; }
  .docs-content { padding: 32px 0 60px; }
  .docs-faq { padding-left: 0; }
  .docs-lidar-grid { grid-template-columns: repeat(2, 1fr); }
  .docs-platform-grid { grid-template-columns: 1fr; }
  .docs-os-grid { grid-template-columns: 1fr 1fr; }
  .docs-spec-key { min-width: 100px; }
  .docs-rtmaps-cta { flex-direction: column; align-items: flex-start; }
  .docs-cards { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .docs-os-grid { grid-template-columns: 1fr; }
  .docs-lidar-grid { grid-template-columns: repeat(2, 1fr); }
  .docs-spec-row { flex-direction: column; gap: 4px; }
  .docs-intro-row { grid-template-columns: 100px 1fr; }
  .docs-intro-row > div:last-child { display: none; }
}
