/* ============================================================
   CSI Quick Start Guide — Docs page styles
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;600&display=swap');

body.csi-docs {
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  font-size: 11pt;
  line-height: 1.7;
  color: #1a1a2e;
  background: #f5f7fb;
  min-height: 100vh;
}

/* Push content below fixed navbar */
.csi-docs-wrapper {
  padding-top: 76px;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* ---- COVER HEADER ---- */
.csi-docs .cover {
  background: linear-gradient(135deg, #0d1b2a 0%, #1b2d45 60%, #16213e 100%);
  color: #ffffff;
  padding: clamp(32px, 5vw, 52px) clamp(20px, 5vw, 60px) clamp(28px, 4vw, 44px);
  position: relative;
  overflow: hidden;
}

.csi-docs .cover::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: rgba(0, 150, 255, 0.08);
}

.csi-docs .cover::after {
  content: '';
  position: absolute;
  bottom: -60px; left: 30%;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: rgba(0, 200, 150, 0.06);
}

.csi-docs .cover-brand {
  font-size: 11pt;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7ec8e3;
  margin-bottom: 18px;
}

.csi-docs .cover h1 {
  font-size: clamp(22pt, 5vw, 32pt);
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #ffffff;
  line-height: 1.15;
  margin-bottom: 10px;
}

.csi-docs .cover-sub {
  font-size: clamp(11pt, 1.5vw, 13pt);
  font-weight: 300;
  color: #b0c4d8;
  margin-bottom: 0;
}

/* ---- TAB NAV ---- */
.csi-docs .tab-nav {
  background: #0d1b2a;
  padding: 0 clamp(12px, 5vw, 60px);
  display: flex;
  gap: 4px;
  border-bottom: 2px solid #1b2d45;
  flex-wrap: wrap;
  overflow-x: auto;
}

.csi-docs .tab-btn {
  padding: 14px clamp(14px, 2.5vw, 28px);
  font-family: inherit;
  font-size: clamp(9pt, 1.2vw, 10.5pt);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #7ec8e3;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
  text-transform: uppercase;
  margin-bottom: -2px;
  white-space: nowrap;
}

.csi-docs .tab-btn:hover {
  color: #ffffff;
  background: rgba(255,255,255,0.05);
}

.csi-docs .tab-btn.active {
  color: #ffffff;
  border-bottom-color: #3b9ede;
  background: rgba(59, 158, 222, 0.1);
}

/* ---- TAB PANELS ---- */
.csi-docs .tab-panel { display: none; }
.csi-docs .tab-panel.active { display: block; }

/* ---- CONTENT AREA ---- */
.csi-docs .content {
  padding: clamp(28px, 4vw, 48px) clamp(20px, 5vw, 60px) clamp(36px, 5vw, 60px);
  max-width: min(960px, 100%);
  width: 100%;
  box-sizing: border-box;
}

.csi-docs h2 {
  font-size: 15pt;
  font-weight: 700;
  color: #0d1b2a;
  margin-top: 40px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e8f0fe;
  display: flex;
  align-items: center;
  gap: 10px;
}

.csi-docs h2:first-child { margin-top: 0; }

.csi-docs h2 .icon {
  display: inline-block;
  width: 28px; height: 28px;
  border-radius: 6px;
  background: #0d1b2a;
  color: #fff;
  font-size: 13px;
  text-align: center;
  line-height: 28px;
  flex-shrink: 0;
}

.csi-docs h3 {
  font-size: 11.5pt;
  font-weight: 600;
  color: #1b2d45;
  margin-top: 26px;
  margin-bottom: 8px;
}

.csi-docs p {
  margin-bottom: 12px;
  color: #2d3748;
}

/* ---- TABLE ---- */
.csi-docs table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 20px 0;
  font-size: clamp(9pt, 1.2vw, 10.5pt);
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.csi-docs thead tr { background: #0d1b2a; color: #ffffff; }

.csi-docs thead th {
  padding: 10px 16px;
  text-align: left;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.csi-docs tbody tr:nth-child(even) { background: #f4f7ff; }
.csi-docs tbody tr:nth-child(odd)  { background: #ffffff; }

.csi-docs tbody td {
  padding: 9px 16px;
  border-bottom: 1px solid #e2e8f0;
  color: #2d3748;
  vertical-align: top;
}

/* ---- CODE ---- */
.csi-docs code {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 9.5pt;
  background: #f0f4ff;
  border: 1px solid #d6e0ff;
  border-radius: 4px;
  padding: 1px 6px;
  color: #1a365d;
}

.csi-docs pre {
  background: #0d1b2a;
  border-radius: 8px;
  padding: clamp(12px, 2vw, 18px) clamp(14px, 2.2vw, 22px);
  margin: 14px 0 20px 0;
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.csi-docs pre code {
  background: none;
  border: none;
  padding: 0;
  color: #a8d8ea;
  font-size: clamp(8.5pt, 1.1vw, 10pt);
  line-height: 1.65;
  white-space: pre;
}

/* ---- TERMINAL LABEL ---- */
.csi-docs .terminal-block { margin: 14px 0 20px 0; }

.csi-docs .terminal-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #1b2d45;
  border-radius: 6px 6px 0 0;
  padding: 6px 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9pt;
  font-weight: 600;
  color: #7ec8e3;
  letter-spacing: 0.04em;
}

.csi-docs .terminal-label .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.csi-docs .dot-red    { background: #fc5c5c; }
.csi-docs .dot-yellow { background: #fdbc40; }
.csi-docs .dot-green  { background: #33c748; }

.csi-docs .terminal-block pre {
  border-radius: 0 8px 8px 8px;
  margin-top: 0;
}

/* ---- CALLOUT BOXES ---- */
.csi-docs .callout {
  border-radius: 8px;
  padding: 14px 20px;
  margin: 18px 0;
  font-size: 10.5pt;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.csi-docs .callout-info  { background: #e8f4fd; border-left: 4px solid #3182ce; color: #1a365d; }
.csi-docs .callout-tip   { background: #e6fffa; border-left: 4px solid #38a169; color: #1c4532; }
.csi-docs .callout-warn  { background: #fffbea; border-left: 4px solid #d69e2e; color: #744210; }

.csi-docs .callout-icon { font-size: 14pt; flex-shrink: 0; margin-top: 1px; }

/* ---- STEP LIST ---- */
.csi-docs .steps { margin: 16px 0; padding-left: 0; list-style: none; }

.csi-docs .steps li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
  padding: 14px 18px;
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.csi-docs .step-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #0d1b2a;
  color: #fff;
  font-size: 10pt;
  font-weight: 700;
  text-align: center;
  line-height: 26px;
  flex-shrink: 0;
}

.csi-docs .step-body { flex: 1; }
.csi-docs .step-title { font-weight: 600; color: #0d1b2a; margin-bottom: 4px; }
.csi-docs .step-desc  { color: #4a5568; font-size: 10pt; }

/* ---- SESSION GRID (3 terminals) ---- */
.csi-docs .terminal-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 16px 0 24px 0;
}

/* ---- CAI COMMANDS LIST ---- */
.csi-docs .cai-list {
  margin: 12px 0 20px 0;
  padding-left: 0;
  list-style: none;
}

.csi-docs .cai-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border-bottom: 1px solid #e8f0fe;
  font-size: 10pt;
}

.csi-docs .cai-list li:last-child { border-bottom: none; }

.csi-docs .cai-list code { font-size: 9.5pt; }

.csi-docs .cai-desc { color: #718096; font-size: 9.5pt; margin-left: auto; }

/* ---- SUPPORT BOX ---- */
.csi-docs .support-box {
  background: linear-gradient(135deg, #0d1b2a, #1b2d45);
  border-radius: 10px;
  padding: clamp(20px, 3vw, 28px) clamp(20px, 3vw, 32px);
  margin-top: 40px;
  color: #fff;
}

.csi-docs .support-box h2 {
  color: #fff;
  border-bottom-color: rgba(255,255,255,0.15);
  margin-top: 0;
}

.csi-docs .support-box h2 .icon { background: rgba(255,255,255,0.15); }
.csi-docs .support-box p { color: #b0c4d8; margin-bottom: 10px; }

.csi-docs .support-email {
  display: inline-block;
  background: rgba(0,150,255,0.18);
  border: 1px solid rgba(0,150,255,0.4);
  border-radius: 6px;
  padding: 8px 20px;
  color: #7ec8e3;
  font-weight: 600;
  font-size: 11pt;
  text-decoration: none;
  margin-top: 6px;
}

/* ---- EXAMPLE CARDS ---- */
.csi-docs .category-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 40px;
  margin-bottom: 16px;
}

.csi-docs .category-header:first-child { margin-top: 0; }

.csi-docs .category-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 9pt;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.csi-docs .badge-red   { background: #fff0f0; color: #c53030; border: 1px solid #feb2b2; }
.csi-docs .badge-blue  { background: #ebf8ff; color: #2b6cb0; border: 1px solid #90cdf4; }
.csi-docs .badge-dfir  { background: #faf5ff; color: #6b46c1; border: 1px solid #d6bcfa; }

.csi-docs .example-card {
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  margin-bottom: 16px;
  overflow: hidden;
}

.csi-docs .example-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid #f0f4ff;
}

.csi-docs .example-card-header.red-accent  { border-left: 4px solid #fc5c5c; }
.csi-docs .example-card-header.blue-accent { border-left: 4px solid #3b9ede; }
.csi-docs .example-card-header.dfir-accent { border-left: 4px solid #9f7aea; }

.csi-docs .example-title {
  font-weight: 600;
  font-size: 10.5pt;
  color: #0d1b2a;
}

.csi-docs .example-tag {
  font-size: 8pt;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.csi-docs .tag-red  { background: #fff0f0; color: #c53030; }
.csi-docs .tag-blue { background: #ebf8ff; color: #2b6cb0; }
.csi-docs .tag-dfir { background: #faf5ff; color: #6b46c1; }

.csi-docs .example-card-body { padding: 14px 20px 16px 20px; }

.csi-docs .example-card-body p {
  font-size: 10pt;
  color: #4a5568;
  margin-bottom: 10px;
}

.csi-docs .example-card-body pre {
  margin: 0;
  border-radius: 6px;
}

.csi-docs .example-card-body pre code { font-size: 9.5pt; }

/* ---- PROMPT GUIDE ---- */
.csi-docs .prompt-guide {
  background: linear-gradient(135deg, #fafafa, #f0f4ff);
  border: 1px solid #d6e0ff;
  border-radius: 10px;
  padding: clamp(20px, 3vw, 28px) clamp(20px, 3vw, 32px);
  margin-top: 40px;
}

.csi-docs .prompt-guide h2 {
  border-bottom-color: #d6e0ff;
  margin-top: 0;
}

.csi-docs .prompt-rule {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid #e8f0fe;
}

.csi-docs .prompt-rule:last-child { border-bottom: none; padding-bottom: 0; }

.csi-docs .prompt-rule-num {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: #0d1b2a;
  color: #7ec8e3;
  font-size: 11pt;
  font-weight: 700;
  text-align: center;
  line-height: 30px;
  flex-shrink: 0;
}

.csi-docs .prompt-rule-body { flex: 1; }

.csi-docs .prompt-rule-title {
  font-weight: 700;
  font-size: 10.5pt;
  color: #0d1b2a;
  margin-bottom: 4px;
}

.csi-docs .prompt-rule-desc {
  font-size: 10pt;
  color: #4a5568;
  margin-bottom: 8px;
}

.csi-docs .prompt-compare {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.csi-docs .prompt-bad, .csi-docs .prompt-good {
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 9.5pt;
  font-family: 'JetBrains Mono', monospace;
  line-height: 1.5;
}

.csi-docs .prompt-bad  { background: #fff5f5; border: 1px solid #feb2b2; color: #742a2a; }
.csi-docs .prompt-good { background: #f0fff4; border: 1px solid #9ae6b4; color: #1c4532; }

.csi-docs .prompt-label {
  font-size: 7.5pt;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.csi-docs .label-bad  { color: #c53030; }
.csi-docs .label-good { color: #276749; }

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .csi-docs .content { max-width: 100%; }
  .csi-docs .terminal-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .csi-docs-wrapper { padding-top: 64px; }
  .csi-docs h2 { font-size: 13.5pt; flex-wrap: wrap; }
  .csi-docs h3 { font-size: 11pt; }
  .csi-docs .example-card-header {
    flex-wrap: wrap;
    gap: 8px;
  }
  .csi-docs .category-header { flex-wrap: wrap; }
  .csi-docs .steps li { padding: 12px 14px; }
  .csi-docs .callout { padding: 12px 14px; font-size: 10pt; }
}

@media (max-width: 480px) {
  .csi-docs { font-size: 10.5pt; }
  .csi-docs .cover-brand { font-size: 9.5pt; }
  .csi-docs .cover h1 { font-size: 22pt; }
  .csi-docs .cover-sub { font-size: 11pt; }
  .csi-docs .tab-btn { padding: 10px 12px; }
  .csi-docs h2 { font-size: 12.5pt; margin-top: 28px; }
  .csi-docs .support-email {
    display: block;
    text-align: center;
    word-break: break-all;
  }
  .csi-docs .prompt-compare { grid-template-columns: 1fr; }
}
