/* AIMS User Guide — Shared Stylesheet */
/* Matches main site: dark theme, glass cards, brand-blue accent */

:root {
    --brand-50: #eff6ff; --brand-100: #dbeafe; --brand-400: #60a5fa;
    --brand-500: #3b82f6; --brand-600: #2563eb; --brand-700: #1d4ed8;
    --brand-900: #1e3a8a; --brand-950: #0c1e4a;
    --bg-page: #000; --bg-surface: rgba(255,255,255,0.04);
    --border-subtle: rgba(255,255,255,0.08);
    --text-primary: #f1f5f9; --text-secondary: #94a3b8; --text-muted: #64748b;
}
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', 'Noto Sans KR', sans-serif;
    background: var(--bg-page); color: var(--text-primary);
    margin: 0; -webkit-font-smoothing: antialiased;
}

/* ── Layout ── */
.guide-wrapper { display: flex; min-height: 100vh; }
.guide-sidebar {
    position: fixed; top: 64px; left: 0; bottom: 0; width: 280px;
    background: #0a0f1e; border-right: 1px solid var(--border-subtle);
    overflow-y: auto; padding: 24px 0; z-index: 30;
}
.guide-content {
    margin-left: 280px; padding: 96px 48px 80px;
    max-width: 860px; width: 100%;
}

/* ── Top Nav ── */
.guide-nav {
    position: fixed; top: 0; left: 0; right: 0; height: 64px; z-index: 50;
    background: rgba(0,0,0,0.8); backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
    display: flex; align-items: center; padding: 0 24px;
}
.guide-nav .logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.guide-nav .logo img { height: 28px; }
.guide-nav .logo span { font-weight: 700; font-size: 16px; color: #fff; }
.guide-nav .logo .badge {
    font-size: 10px; color: var(--brand-400); font-family: 'JetBrains Mono', monospace;
    background: rgba(59,130,246,0.1); border: 1px solid rgba(59,130,246,0.2);
    padding: 2px 8px; border-radius: 999px;
}
.guide-nav-links { margin-left: auto; display: flex; gap: 24px; align-items: center; }
.guide-nav-links a {
    font-size: 14px; color: var(--text-secondary); text-decoration: none;
    font-weight: 500; transition: color 0.2s;
}
.guide-nav-links a:hover { color: #fff; }
.guide-nav-links .cta {
    background: var(--brand-600); color: #fff; padding: 6px 16px;
    border-radius: 6px; font-weight: 600;
}
.guide-nav-links .cta:hover { background: var(--brand-700); color: #fff; }

/* ── Sidebar ── */
.sidebar-section { margin-bottom: 8px; }
.sidebar-section-title {
    font-size: 10px; font-weight: 700; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--text-muted);
    padding: 8px 24px 4px; font-family: 'JetBrains Mono', monospace;
}
.sidebar-link {
    display: block; padding: 8px 24px; font-size: 14px;
    color: var(--text-secondary); text-decoration: none; transition: all 0.15s;
    border-left: 3px solid transparent;
}
.sidebar-link:hover { color: #fff; background: rgba(255,255,255,0.03); }
.sidebar-link.active {
    color: var(--brand-400); background: rgba(59,130,246,0.06);
    border-left-color: var(--brand-500); font-weight: 600;
}

/* ── Typography ── */
h1 { font-size: 2.5rem; font-weight: 800; line-height: 1.2; margin-bottom: 16px; }
h2 { font-size: 1.625rem; font-weight: 700; margin: 48px 0 16px; color: #fff; }
h3 { font-size: 1.2rem; font-weight: 600; margin: 32px 0 12px; color: #e2e8f0; }
p, li { font-size: 1rem; line-height: 1.85; color: var(--text-secondary); font-weight: 350; }
a { color: var(--brand-400); }
strong { color: #fff; font-weight: 600; }

/* ── Cards ── */
.glass {
    background: var(--bg-surface); backdrop-filter: blur(12px);
    border: 1px solid var(--border-subtle); border-radius: 12px; padding: 24px;
}
.info-card {
    background: rgba(59,130,246,0.06); border: 1px solid rgba(59,130,246,0.15);
    border-radius: 10px; padding: 20px; margin: 24px 0;
}
.info-card .label {
    font-size: 11px; font-weight: 700; color: var(--brand-400);
    font-family: 'JetBrains Mono', monospace; letter-spacing: 0.05em; margin-bottom: 8px;
}
.warn-card {
    background: rgba(251,191,36,0.06); border: 1px solid rgba(251,191,36,0.15);
    border-radius: 10px; padding: 20px; margin: 24px 0;
}
.warn-card .label {
    font-size: 11px; font-weight: 700; color: #fbbf24;
    font-family: 'JetBrains Mono', monospace; letter-spacing: 0.05em; margin-bottom: 8px;
}

/* ── Step indicator ── */
.step-badge {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 11px; font-weight: 700; font-family: 'JetBrains Mono', monospace;
    color: var(--brand-400); letter-spacing: 0.08em; margin-bottom: 8px;
}
.step-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-500); }

/* ── Screenshot placeholder ── */
.screenshot {
    background: rgba(255,255,255,0.02); border: 1px dashed var(--border-subtle);
    border-radius: 10px; padding: 40px; text-align: center;
    color: var(--text-muted); font-size: 13px; margin: 20px 0;
}

/* ── Stage flow diagram ── */
.stage-flow {
    display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
    margin: 24px 0; padding: 16px; background: rgba(255,255,255,0.02);
    border-radius: 10px;
}
.stage-chip {
    padding: 6px 14px; border-radius: 8px; font-size: 12px; font-weight: 600;
    font-family: 'JetBrains Mono', monospace; white-space: nowrap;
}
.stage-chip.active { background: var(--brand-600); color: #fff; }
.stage-chip.muted { background: rgba(255,255,255,0.04); color: var(--text-muted); }
.stage-arrow { color: var(--text-muted); font-size: 12px; }

/* ── Table ── */
table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 15px; }
th {
    text-align: left; padding: 10px 14px; font-size: 12px; font-weight: 700;
    color: var(--text-muted); border-bottom: 1px solid rgba(255,255,255,0.1);
    font-family: 'JetBrains Mono', monospace; letter-spacing: 0.05em;
}
td { padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,0.04); color: var(--text-secondary); }
tr:hover td { background: rgba(255,255,255,0.02); }

/* ── Pagination ── */
.page-nav {
    display: flex; justify-content: space-between; margin-top: 64px;
    padding-top: 32px; border-top: 1px solid var(--border-subtle);
}
.page-nav a {
    display: flex; flex-direction: column; gap: 4px; text-decoration: none;
    padding: 12px 20px; border-radius: 10px; transition: background 0.2s;
}
.page-nav a:hover { background: rgba(255,255,255,0.03); }
.page-nav .label { font-size: 11px; color: var(--text-muted); font-weight: 600; }
.page-nav .title { font-size: 15px; color: var(--brand-400); font-weight: 600; }
.page-nav .next { text-align: right; margin-left: auto; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .guide-sidebar { display: none; }
    .guide-content { margin-left: 0; padding: 80px 20px 60px; }
    .guide-nav-links { display: none; }
}

/* ── Embed / Popup Light Theme ── */
body.embed-light {
    --bg-page: #f8fafc; --bg-surface: #ffffff;
    --border-subtle: #e2e8f0;
    --text-primary: #1e293b; --text-secondary: #475569; --text-muted: #94a3b8;
    background: var(--bg-page); color: var(--text-primary);
}
body.embed-light .guide-nav { display: none; }
body.embed-light .guide-sidebar { display: none; }
body.embed-light .guide-content {
    margin-left: 0; padding: 24px 32px 40px; max-width: 100%;
}
body.embed-light h1 { font-size: 1.75rem; }
body.embed-light h2 { color: var(--text-primary); }
body.embed-light h3 { color: #334155; }
body.embed-light strong { color: var(--text-primary); }
body.embed-light .glass {
    background: var(--bg-surface); border-color: var(--border-subtle);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
body.embed-light .info-card {
    background: rgba(59,130,246,0.05); border-color: rgba(59,130,246,0.2);
}
body.embed-light .warn-card {
    background: rgba(251,191,36,0.06); border-color: rgba(251,191,36,0.25);
}
body.embed-light table th {
    border-bottom-color: #e2e8f0; color: #64748b;
}
body.embed-light table td {
    border-bottom-color: #f1f5f9; color: var(--text-secondary);
}
body.embed-light tr:hover td { background: #f8fafc; }
body.embed-light .page-nav { display: none; }
body.embed-light a { color: var(--brand-600); }
