/* ==========================================================================
   Shadowrocket BP - Technical Wiki Documentation Style
   1:1 Reconstructed based on https://shadowrocketdoc.com/zh-CN/
   ========================================================================== */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --bg-page: #ffffff;
  --bg-subtle: #f8fafc;
  --bg-card: #ffffff;

  --color-primary: #1e293b;
  --color-link: #2563eb;
  --color-border: #e2e8f0;
  --color-border-dark: #cbd5e1;

  --text-main: #0f172a;
  --text-muted: #334155;
  --text-dim: #64748b;

  --max-width: 920px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-main);
  background-color: var(--bg-page);
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-page);
  padding: 0;
}

.doc-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 30px 20px 80px;
}

/* Nav */
.doc-top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 16px;
  margin-bottom: 30px;
}

.doc-top-nav a {
  color: var(--color-link);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.doc-top-nav a:hover {
  text-decoration: underline;
}

/* Header */
.doc-header {
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 24px;
  margin-bottom: 36px;
}

.doc-badge {
  display: inline-block;
  font-size: 0.825rem;
  font-weight: 600;
  color: #475569;
  background: var(--bg-subtle);
  border: 1px solid var(--color-border);
  padding: 2px 10px;
  border-radius: 4px;
  margin-bottom: 12px;
}

h1 {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  line-height: 1.25;
}

h2 {
  font-size: 1.55rem;
  font-weight: 700;
  margin: 44px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
  color: var(--text-main);
}

h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 24px 0 10px;
  color: var(--text-main);
}

h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 18px 0 8px;
  color: var(--text-muted);
}

p {
  margin-bottom: 14px;
  color: var(--text-muted);
}

ul, ol {
  margin: 10px 0 18px 24px;
  color: var(--text-muted);
}

li {
  margin-bottom: 6px;
}

/* Checklist Box */
.checklist-box {
  background: var(--bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 18px 22px;
  margin: 20px 0 30px;
}

.checklist-box ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.checklist-box li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.checklist-box li::before {
  content: "•";
  position: absolute;
  left: 6px;
  color: #0284c7;
  font-weight: 900;
}

/* Three Concept Cards */
.concept-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 20px 0 30px;
}

.concept-card {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 20px;
  background: #ffffff;
}

.concept-card h3 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 1.15rem;
}

.concept-card p {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 0;
}

/* Wiki Table */
.wiki-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0 32px;
  font-size: 0.925rem;
}

.wiki-table th {
  background: var(--bg-subtle);
  border: 1px solid var(--color-border);
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
  color: var(--text-main);
}

.wiki-table td {
  border: 1px solid var(--color-border);
  padding: 12px 16px;
  color: var(--text-muted);
}

.wiki-table tr:hover td {
  background: #fcfdfe;
}

/* Step Flow with Result Box */
.step-section {
  margin: 28px 0 40px;
}

.step-box {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
}

.step-box h3 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1.25rem;
  color: #0f172a;
}

.step-result {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  padding: 12px 16px;
  margin-top: 14px;
  font-size: 0.9rem;
  color: #166534;
}

/* Trouble Items */
.trouble-item {
  border-left: 3px solid #cbd5e1;
  padding-left: 18px;
  margin-bottom: 22px;
}

.trouble-item h3 {
  margin-top: 0;
  margin-bottom: 6px;
  font-size: 1.1rem;
}

/* FAQ list */
.wiki-faq-item {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px dashed var(--color-border);
}

.wiki-faq-item:last-child {
  border-bottom: none;
}

.wiki-faq-q {
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
  font-size: 1.05rem;
}

.wiki-faq-a {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Download Cards Grid */
.dl-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 24px 0 40px;
}

.dl-card {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 24px;
  background: var(--bg-subtle);
}

.dl-card h3 {
  margin-top: 0;
  margin-bottom: 6px;
  font-size: 1.2rem;
}

.dl-card .badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: #e2e8f0;
  color: #334155;
  margin-bottom: 12px;
}

.btn-dl {
  display: inline-block;
  background: #0f172a;
  color: #ffffff;
  padding: 8px 18px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 14px;
}

.btn-dl:hover {
  background: #334155;
}

/* Footer */
.doc-footer {
  border-top: 1px solid var(--color-border);
  padding-top: 24px;
  margin-top: 50px;
  font-size: 0.85rem;
  color: var(--text-dim);
  text-align: center;
}

@media (max-width: 768px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.35rem; }
  .concept-grid, .dl-card-grid { grid-template-columns: 1fr; }
}
