/* ── Guide layout ── */
.guide-hero {
    padding: 2.25rem 0 1.75rem;
    max-width: 720px;
    animation: fadeUp 0.35s ease-out both;
}

.guide-breadcrumb {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-3);
    margin-bottom: 0.75rem;
    letter-spacing: 0.04em;
}

.guide-breadcrumb a {
    color: var(--text-3);
    text-decoration: none;
    transition: color 0.15s;
}
.guide-breadcrumb a:hover { color: var(--accent); }
.guide-breadcrumb span { margin: 0 0.4rem; }

.guide-hero h1 {
    font-family: var(--font-mono);
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--text-1);
    letter-spacing: -0.02em;
    margin-bottom: 0.6rem;
}

.guide-lead {
    font-size: 0.92rem;
    color: var(--text-2);
    line-height: 1.7;
    max-width: 600px;
}

/* ── Table of contents ── */
.guide-toc {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    max-width: 420px;
    margin-bottom: 2.5rem;
    animation: fadeUp 0.35s ease-out 0.05s both;
}

.guide-toc-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-3);
    margin-bottom: 0.6rem;
}

.guide-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    counter-reset: toc;
}

.guide-toc-list li {
    font-size: 0.8rem;
    counter-increment: toc;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.guide-toc-list li::before {
    content: counter(toc);
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-3);
    min-width: 1rem;
}

.guide-toc-list a {
    color: var(--text-2);
    text-decoration: none;
    transition: color 0.15s;
    line-height: 1.5;
}
.guide-toc-list a:hover { color: var(--accent); }

/* ── Guide body ── */
.guide-body {
    max-width: 720px;
    animation: fadeUp 0.35s ease-out 0.1s both;
}

/* ── Sections ── */
.guide-section {
    margin-bottom: 3.5rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--border);
}

.guide-section:last-child {
    border-bottom: none;
}

.guide-section h2 {
    font-family: var(--font-mono);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-1);
    letter-spacing: -0.02em;
    margin-bottom: 1.25rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border);
}

.guide-section h3 {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-1);
    margin: 1.5rem 0 0.6rem;
    letter-spacing: 0.01em;
}

.guide-section p {
    font-size: 0.875rem;
    color: var(--text-2);
    line-height: 1.75;
    margin-bottom: 0.875rem;
}

.guide-section code {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--accent);
    background: var(--accent-dim);
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    border: 1px solid rgba(56,189,248,0.15);
}

.guide-section a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid rgba(56,189,248,0.3);
    transition: border-color 0.15s;
}
.guide-section a:hover { border-color: var(--accent); }

/* ── Tool card link ── */
.guide-tool-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.1rem;
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    text-decoration: none !important;
    border-bottom: none !important;
    margin-bottom: 1.5rem;
    transition: background 0.15s, border-color 0.15s;
}

.guide-tool-card:hover {
    background: var(--bg-2);
    border-color: var(--accent) !important;
    border-left-color: var(--accent) !important;
}

.guide-tool-route {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-1);
    letter-spacing: -0.01em;
}

.guide-tool-cta {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent);
    letter-spacing: 0.04em;
}

/* ── Callout ── */
.guide-callout {
    padding: 0.875rem 1rem;
    border-radius: var(--radius);
    font-size: 0.82rem;
    line-height: 1.6;
    margin: 1rem 0;
}

.guide-callout--info {
    background: var(--accent-dim);
    border: 1px solid rgba(56,189,248,0.2);
    border-left: 3px solid var(--accent);
    color: var(--text-2);
}

/* ── Steps list ── */
.guide-steps {
    padding-left: 0;
    list-style: none;
    counter-reset: steps;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin: 0.6rem 0 1rem;
}

.guide-steps li {
    counter-increment: steps;
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    font-size: 0.84rem;
    color: var(--text-2);
    line-height: 1.55;
}

.guide-steps li::before {
    content: counter(steps);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--accent);
    background: var(--accent-dim);
    border: 1px solid rgba(56,189,248,0.2);
    border-radius: 50%;
    width: 1.3rem;
    height: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ── Bullet list ── */
.guide-list {
    padding-left: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin: 0.6rem 0 1rem;
}

.guide-list li {
    font-size: 0.84rem;
    color: var(--text-2);
    line-height: 1.55;
    padding-left: 1.1rem;
    position: relative;
}

.guide-list li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--text-3);
    font-family: var(--font-mono);
    font-size: 0.72rem;
}

/* ── Grade rows ── */
.guide-grade-row {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 0.45rem 0;
    font-size: 0.82rem;
    color: var(--text-2);
    line-height: 1.5;
    border-bottom: 1px solid var(--border);
}
.guide-grade-row:last-of-type { border-bottom: none; }

.guide-grade {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 900;
    min-width: 2.5rem;
    text-align: center;
    flex-shrink: 0;
    padding-top: 0.05rem;
}

.guide-grade--a  { color: var(--success); }
.guide-grade--b  { color: #84cc16; }
.guide-grade--c  { color: var(--warning); }
.guide-grade--f  { color: var(--danger); }

.guide-badge {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 0.15rem 0.45rem;
    border-radius: 3px;
    border: 1px solid transparent;
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 0.15rem;
}

.guide-badge--clean    { color: var(--success); background: var(--success-dim); border-color: rgba(34,197,94,0.25); }
.guide-badge--low      { color: #64748b; background: rgba(100,116,139,0.1); border-color: rgba(100,116,139,0.25); }
.guide-badge--medium   { color: #f59e0b; background: rgba(245,158,11,0.1); border-color: rgba(245,158,11,0.25); }
.guide-badge--high     { color: #f97316; background: rgba(249,115,22,0.1); border-color: rgba(249,115,22,0.25); }
.guide-badge--critical { color: #ef4444; background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.25); }

/* ── Findings table ── */
.guide-findings-table {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin: 0.75rem 0 1rem;
}

.guide-findings-row {
    display: grid;
    grid-template-columns: 12rem 1fr;
    gap: 1rem;
    padding: 0.65rem 1rem;
    font-size: 0.8rem;
    border-bottom: 1px solid var(--border);
    align-items: start;
}

.guide-findings-row:last-child { border-bottom: none; }
.guide-findings-row:nth-child(even) { background: var(--bg-2); }

.guide-findings-row code {
    font-size: 0.72rem;
}

.guide-findings-row span:last-child { color: var(--text-2); line-height: 1.5; }
.guide-findings-row--warn  { background: rgba(245,158,11,0.04) !important; }
.guide-findings-row--good  { background: rgba(34,197,94,0.04) !important; }
.guide-findings-row--warn code { color: #f59e0b; }
.guide-findings-row--good code { color: var(--success); }

/* ── FAQ ── */
.guide-faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.guide-faq-item summary {
    padding: 0.875rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-1);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.15s;
    user-select: none;
}

.guide-faq-item summary::-webkit-details-marker { display: none; }

.guide-faq-item summary::after {
    content: '+';
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--text-3);
    flex-shrink: 0;
    margin-left: 1rem;
    transition: transform 0.2s;
}

.guide-faq-item[open] summary::after { content: '−'; }
.guide-faq-item summary:hover { background: var(--bg-2); }
.guide-faq-item[open] summary { border-bottom: 1px solid var(--border); }

.guide-faq-item p {
    padding: 0.875rem 1rem;
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-2);
    line-height: 1.7;
}

/* ── Bottom tools nav ── */
.guide-tools-nav {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.guide-tools-nav-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-3);
    margin-bottom: 0.75rem;
}

.guide-tools-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.guide-nav-card {
    background: var(--bg-1);
    padding: 0.875rem 1rem;
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-1);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    transition: background 0.15s, color 0.15s;
}

.guide-nav-card:hover { background: var(--bg-2); color: var(--accent); }

.guide-nav-desc {
    font-size: 0.65rem;
    font-weight: 400;
    color: var(--text-3);
    letter-spacing: 0.02em;
    font-family: var(--font-sans);
}

/* ── Example button (shared across tool pages) ── */
.example-btn {
    background: none;
    border: none;
    color: var(--text-3);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    cursor: pointer;
    padding: 0.3rem 0;
    margin-top: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: color 0.15s;
    text-decoration: none;
}

.example-btn::before { content: '▶'; font-size: 0.55rem; }
.example-btn:hover { color: var(--accent); }

/* ── Responsive ── */
@media (max-width: 600px) {
    .guide-findings-row { grid-template-columns: 1fr; gap: 0.3rem; }
    .guide-tools-nav-grid { grid-template-columns: 1fr 1fr; }
    .guide-hero h1 { font-size: 1.3rem; }
}
