/* manual.css — shared styles for manual/docs pages */

/* ── LAYOUT ── */
.manual-body {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

.manual-wrap {
  display: flex;
  flex: 1;
  padding-top: 64px; /* nav height */
  align-items: flex-start;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* ── SIDEBAR ── */
.manual-sidebar {
  position: sticky;
  top: 64px;
  flex-shrink: 0;
  width: 260px;
  height: calc(100vh - 64px);
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 32px 0 40px;
}

.sidebar-section {
  margin-bottom: 8px;
}

.sidebar-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 0 24px;
  margin-bottom: 6px;
  margin-top: 20px;
}

.sidebar-section:first-child .sidebar-section-label {
  margin-top: 0;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  border-radius: 0;
  border-left: 2px solid transparent;
  transition: all .15s;
}

.sidebar-link:hover {
  color: var(--text);
  background: var(--bg);
}

.sidebar-link.active {
  color: var(--blue);
  background: var(--blue-soft);
  border-left-color: var(--blue);
  font-weight: 600;
}

.sidebar-link svg {
  flex-shrink: 0;
  opacity: 0.6;
}

.sidebar-link.active svg {
  opacity: 1;
}

/* ── MAIN CONTENT ── */
.manual-content {
  flex: 1;
  min-width: 0;
  padding: 48px 64px 80px;
  max-width: 1000px;
}

/* ── PAGE HEADER ── */
.doc-header {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.doc-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 16px;
  border: 1px solid oklch(0.50 0.22 264 / 18%);
}

.doc-title {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin-bottom: 12px;
}

.doc-subtitle {
  font-size: 16px;
  color: var(--text-2);
  line-height: 1.65;
  max-width: 800px;
}

.doc-meta {
  display: flex;
  gap: 20px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.doc-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-3);
}

.doc-meta-item svg {
  flex-shrink: 0;
}

/* ── PREREQUISITES ── */
.prereq-box {
  background: var(--blue-soft);
  border: 1px solid oklch(0.50 0.22 264 / 18%);
  border-radius: var(--r-sm);
  padding: 20px 24px;
  margin-bottom: 40px;
}

.prereq-box h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.prereq-box ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.prereq-box li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.5;
}

.prereq-box li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
  margin-top: 6px;
  flex-shrink: 0;
}

/* ── STEP ── */
.steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 48px;
}

.step {
  display: flex;
  gap: 20px;
  position: relative;
}

.step:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 44px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.step-indicator {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--blue);
  color: white;
  font-size: 14px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px oklch(0.50 0.22 264 / 30%);
}

.step-body {
  padding-bottom: 40px;
  flex: 1;
  min-width: 0;
}

.step-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  margin-top: 8px;
  color: var(--text);
}

.step-desc {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: 16px;
}

.step-desc a {
  color: var(--blue);
  text-decoration: none;
}

.step-desc a:hover {
  text-decoration: underline;
}

/* ── SCREENSHOT PLACEHOLDER ── */
.screenshot {
  border-radius: var(--r-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  margin-top: 16px;
  background: var(--bg);
  max-width: 800px; /* Limit maximum display size for clarity */
  width: fit-content; /* Ensure border wraps tightly around image */
}

.screenshot img {
  max-width: 100%;
  height: auto;
  display: block;
}

.screenshot-caption {
  font-size: 12px;
  color: var(--text-3);
  padding: 8px 12px;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

/* ── CALLOUT ── */
.callout {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--r-sm);
  margin: 16px 0;
  font-size: 14px;
  line-height: 1.6;
}

.callout-warning {
  background: oklch(0.97 0.04 80);
  border: 1px solid oklch(0.85 0.12 80);
  color: oklch(0.40 0.14 60);
}

.callout-info {
  background: var(--blue-soft);
  border: 1px solid oklch(0.50 0.22 264 / 18%);
  color: oklch(0.35 0.18 272);
}

.callout-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── CREDENTIAL CARDS ── */
.credential-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.credential-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 12px 16px;
}

.credential-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.credential-value {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 13px;
  color: var(--text);
}

/* ── PERMISSIONS TABLE ── */
.perm-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 14px;
}

.perm-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}

.perm-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  vertical-align: top;
}

.perm-table td:first-child {
  font-weight: 600;
  color: var(--text);
}

.badge-required {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  background: oklch(0.96 0.04 145);
  color: oklch(0.36 0.14 145);
  border: 1px solid oklch(0.85 0.10 145);
  border-radius: 4px;
  padding: 1px 6px;
}

/* ── SECTION DIVIDER ── */
.doc-section {
  margin-bottom: 48px;
}

.doc-section-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* ── TROUBLESHOOTING ── */
.trouble-item {
  margin-bottom: 24px;
}

.trouble-q {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.trouble-q::before {
  content: 'Q';
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 1px;
}

.trouble-a {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.7;
  padding-left: 28px;
}

.trouble-a ul {
  margin-top: 6px;
  padding-left: 20px;
}

.trouble-a li {
  margin-bottom: 4px;
}

/* ── NAV FOOTER ── */
.doc-nav-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  margin-top: 16px;
}

.doc-nav-btn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 20px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  text-decoration: none;
  color: var(--text);
  transition: all .15s;
  flex: 1;
}

.doc-nav-btn:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.doc-nav-btn-label {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.doc-nav-btn-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
}

.doc-nav-btn.next {
  text-align: right;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .manual-sidebar {
    display: none;
  }

  .manual-content {
    padding: 32px 24px 60px;
  }
}
