/* ── Centroid Sentinel — User Guide Styles ─────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --bg-0: #080b12;
    --bg-1: #0f1218;
    --bg-2: #161b26;
    --bg-3: #1e2535;
    --bg-4: #252d3d;
    --border: #2a3147;
    --border-light: #333d54;
    --accent: #4f8ef7;
    --accent-dim: #2a4a8a;
    --green: #2ecdae;
    --red: #e74c3c;
    --yellow: #f5a623;
    --purple: #9b59b6;
    --text-1: #eaf0fb;
    --text-2: #a8b4cc;
    --text-3: #6b7a96;
    --sidebar-w: 280px;
    --header-h: 60px;
    --radius: 10px;
    --glow: 0 0 0 1px rgba(79, 142, 247, .18), 0 4px 24px rgba(79, 142, 247, .08);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-0);
    color: var(--text-1);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 15px;
    line-height: 1.6;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ── Header ─────────────────────────────────────────────────────────────────── */
.guide-header {
    height: var(--header-h);
    background: var(--bg-1);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    gap: 1rem;
}

.guide-header-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-1);
}

.guide-header-brand svg {
    color: var(--accent);
}

.guide-header-tag {
    background: var(--accent-dim);
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    letter-spacing: 0.05em;
}

.guide-header-spacer {
    flex: 1;
}

.guide-header-back {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-2);
    font-size: 0.85rem;
    font-weight: 500;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.35rem 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.guide-header-back:hover {
    background: var(--bg-4);
    color: var(--text-1);
    text-decoration: none;
}

/* ── Layout ─────────────────────────────────────────────────────────────────── */
.guide-layout {
    display: flex;
    margin-top: var(--header-h);
    min-height: calc(100vh - var(--header-h));
}

/* ── Sidebar ────────────────────────────────────────────────────────────────── */
.guide-sidebar {
    width: var(--sidebar-w);
    background: var(--bg-1);
    border-right: 1px solid var(--border);
    position: fixed;
    top: var(--header-h);
    left: 0;
    bottom: 0;
    overflow-y: auto;
    padding: 1.25rem 0 2rem;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.guide-sidebar::-webkit-scrollbar {
    width: 4px;
}

.guide-sidebar::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 4px;
}

.sidebar-search {
    padding: 0 1rem 1rem;
    position: sticky;
    top: 0;
    background: var(--bg-1);
    z-index: 1;
}

.sidebar-search-input {
    width: 100%;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.45rem 0.8rem 0.45rem 2.2rem;
    color: var(--text-1);
    font-size: 0.82rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7a96' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 0.6rem center;
}

.sidebar-search-input:focus {
    border-color: var(--accent);
}

.sidebar-search-input::placeholder {
    color: var(--text-3);
}

.search-clear-btn {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(calc(-50% - 0.5rem));
    /* Offset due to padding in container */
    background: transparent;
    border: none;
    color: var(--text-3);
    cursor: pointer;
    padding: 0.2rem;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    line-height: 1;
    transition: color 0.15s, transform 0.15s;
    z-index: 3;
}

.search-clear-btn:hover {
    color: var(--text-1);
    transform: translateY(calc(-50% - 0.5rem)) scale(1.1);
}

.search-clear-btn.visible {
    display: flex;
}

.sidebar-group-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-3);
    padding: 0.9rem 1.2rem 0.4rem;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 1.2rem;
    font-size: 0.85rem;
    color: var(--text-2);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    border-left: 2px solid transparent;
    text-decoration: none;
}

.sidebar-nav-item svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.sidebar-nav-item:hover {
    background: var(--bg-3);
    color: var(--text-1);
    text-decoration: none;
}

.sidebar-nav-item.active {
    background: rgba(79, 142, 247, 0.1);
    color: var(--accent);
    border-left-color: var(--accent);
    font-weight: 500;
}

.sidebar-nav-item.active svg {
    opacity: 1;
}

.sidebar-nav-sub {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 1.2rem 0.35rem 2.8rem;
    font-size: 0.8rem;
    color: var(--text-3);
    cursor: pointer;
    transition: color 0.15s;
    text-decoration: none;
}

.sidebar-nav-sub:hover {
    color: var(--text-1);
    text-decoration: none;
}

.sidebar-nav-sub.active {
    color: var(--accent);
    font-weight: 500;
}

/* ── Main Content ───────────────────────────────────────────────────────────── */
.guide-content {
    margin-left: var(--sidebar-w);
    flex: 1;
    padding: 2.5rem 3rem 4rem;
    max-width: 900px;
}

/* ── Hero Section ────────────────────────────────────────────────────────────── */
.guide-hero {
    background: linear-gradient(135deg, var(--bg-2) 0%, rgba(79, 142, 247, 0.08) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.guide-hero::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(79, 142, 247, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.guide-hero-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--text-1), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.guide-hero-sub {
    color: var(--text-2);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    max-width: 560px;
}

.guide-hero-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.guide-hero-pill {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 0.3rem 0.8rem;
    font-size: 0.78rem;
    color: var(--text-2);
}

.guide-hero-pill span {
    color: var(--text-1);
    font-weight: 500;
}

/* ── Section ─────────────────────────────────────────────────────────────────── */
.guide-section {
    margin-bottom: 4rem;
    scroll-margin-top: calc(var(--header-h) + 20px);
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(79, 142, 247, 0.12);
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.25rem 0.7rem;
    border-radius: 20px;
    margin-bottom: 0.75rem;
}

.section-title {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--text-1);
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.section-title svg {
    color: var(--accent);
    flex-shrink: 0;
}

.section-desc {
    color: var(--text-2);
    margin-bottom: 2rem;
    font-size: 0.95rem;
    max-width: 680px;
}

.section-divider {
    height: 1px;
    background: linear-gradient(90deg, var(--border) 0%, transparent 100%);
    margin: 3rem 0;
}

/* ── Info Cards ──────────────────────────────────────────────────────────────── */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.info-card {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.info-card:hover {
    border-color: var(--border-light);
    box-shadow: var(--glow);
}

.info-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    background: rgba(79, 142, 247, 0.12);
    color: var(--accent);
}

.info-card-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-3);
    margin-bottom: 0.3rem;
}

.info-card-value {
    font-size: 0.9rem;
    color: var(--text-1);
    line-height: 1.5;
}

/* ── Callout Boxes ───────────────────────────────────────────────────────────── */
.callout {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin: 1.25rem 0;
    font-size: 0.88rem;
    line-height: 1.55;
}

.callout svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.callout-tip {
    background: rgba(46, 205, 174, 0.08);
    border: 1px solid rgba(46, 205, 174, 0.25);
    color: var(--text-2);
}

.callout-tip svg {
    color: var(--green);
}

.callout-info {
    background: rgba(79, 142, 247, 0.08);
    border: 1px solid rgba(79, 142, 247, 0.25);
    color: var(--text-2);
}

.callout-info svg {
    color: var(--accent);
}

.callout-warn {
    background: rgba(245, 166, 35, 0.08);
    border: 1px solid rgba(245, 166, 35, 0.25);
    color: var(--text-2);
}

.callout-warn svg {
    color: var(--yellow);
}

/* ── Steps ────────────────────────────────────────────────────────────────────── */
.steps-list {
    list-style: none;
    counter-reset: step;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1rem 0 1.5rem;
}

.steps-list li {
    counter-increment: step;
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    color: var(--text-2);
    font-size: 0.9rem;
    line-height: 1.6;
}

.steps-list li::before {
    content: counter(step);
    min-width: 24px;
    height: 24px;
    background: var(--accent-dim);
    color: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
}

.steps-list li strong {
    color: var(--text-1);
}

/* ── Component Table ────────────────────────────────────────────────────────── */
.comp-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 1.5rem;
    font-size: 0.875rem;
}

.comp-table th {
    text-align: left;
    padding: 0.6rem 0.9rem;
    background: var(--bg-3);
    color: var(--text-3);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    border-bottom: 1px solid var(--border);
}

.comp-table td {
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-2);
    vertical-align: top;
    line-height: 1.5;
}

.comp-table tr:last-child td {
    border-bottom: none;
}

.comp-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.comp-table td:first-child {
    color: var(--text-1);
    font-weight: 500;
}

/* ── Status Color Key ────────────────────────────────────────────────────────── */
.status-key {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 0.75rem 0 1.25rem;
}

.status-key-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--text-2);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dot-green {
    background: #2ecc71;
}

.dot-yellow {
    background: #f5a623;
    box-shadow: 0 0 6px rgba(245, 166, 35, 0.5);
}

.dot-red {
    background: #e74c3c;
    box-shadow: 0 0 6px rgba(231, 76, 60, 0.5);
}

/* ── View Screenshot Frame ──────────────────────────────────────────────────── */
.view-frame {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin: 1.25rem 0 1.75rem;
}

.view-frame-bar {
    background: var(--bg-3);
    border-bottom: 1px solid var(--border);
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.view-frame-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.view-frame-dot:nth-child(1) {
    background: #e74c3c;
}

.view-frame-dot:nth-child(2) {
    background: #f5a623;
}

.view-frame-dot:nth-child(3) {
    background: #2ecc71;
}

.view-frame-title {
    font-size: 0.75rem;
    color: var(--text-3);
    margin-left: 0.5rem;
}

.view-frame-body {
    padding: 1.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.82rem;
    color: var(--text-2);
    white-space: pre;
    line-height: 1.7;
    overflow-x: auto;
}

/* ── Keyboard shortcut badge ─────────────────────────────────────────────────── */
kbd {
    display: inline-flex;
    align-items: center;
    background: var(--bg-3);
    border: 1px solid var(--border-light);
    border-bottom-width: 2px;
    border-radius: 4px;
    padding: 0.1rem 0.4rem;
    font-family: inherit;
    font-size: 0.78rem;
    color: var(--text-1);
    font-weight: 500;
}

/* ── Feature Badge ──────────────────────────────────────────────────────────── */
.feature-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
}

.badge-new {
    background: rgba(46, 205, 174, 0.12);
    color: var(--green);
}

.badge-live {
    background: rgba(79, 142, 247, 0.12);
    color: var(--accent);
}

/* ── Sub headings ───────────────────────────────────────────────────────────── */
.sub-heading {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-1);
    margin-bottom: 0.6rem;
    margin-top: 1.5rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--border);
}

/* ── Inline tag / chip ──────────────────────────────────────────────────────── */
.tag {
    display: inline-block;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.05rem 0.45rem;
    font-size: 0.78rem;
    color: var(--text-2);
    font-weight: 500;
}

/* ── Freshness indicator table  ─────────────────────────────────────────────── */
.freshness-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    margin: 0.75rem 0 1.5rem;
}

.freshness-table th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    background: var(--bg-3);
    color: var(--text-3);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    border-bottom: 1px solid var(--border);
}

.freshness-table td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-2);
}

.freshness-table td:first-child {
    color: var(--text-1);
    font-weight: 500;
}

.freshness-table tr:last-child td {
    border-bottom: none;
}

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

    .guide-content {
        margin-left: 0;
        padding: 1.5rem;
    }

    .guide-hero-title {
        font-size: 1.5rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Print ────────────────────────────────────────────────────────────────────── */
@media print {

    .guide-header,
    .guide-sidebar {
        display: none;
    }

    .guide-content {
        margin-left: 0;
        padding: 1rem;
    }

    .guide-hero {
        break-after: avoid;
    }
}