/* ============================================================
   PYTHON COACH — GCSE Resource Pages Stylesheet
   Extracted from the identical inline <style> block previously
   duplicated in every resources/*.html page. Loaded alongside
   /v2css/v2-base.css (design tokens + reset), which this file
   does not duplicate.
   ============================================================ */

html, body {
    height: auto;
    overscroll-behavior: auto;
}

a { text-decoration: none; color: inherit; }

/* ── NAV ────────────────────────────────────────────────────── */
#pp-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--topbar-h);
    padding: 0 24px;
    padding-top: env(safe-area-inset-top, 0px);
    display: flex;
    align-items: center;
    background: var(--bg);
    border-bottom: 2px solid var(--border);
    z-index: 200;
}

#pp-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
    font-weight: 900;
    color: var(--text);
    letter-spacing: -0.01em;
    text-decoration: none;
}

.pp-logo-snake { font-size: 24px; }

/* ── PAGE ───────────────────────────────────────────────────── */
.rs-page {
    padding-top: var(--topbar-h);
}

/* ── CONTENT ────────────────────────────────────────────────── */
.rs-content {
    max-width: 70ch;
    margin: 0 auto;
    padding: 48px 24px 80px;
}

/* ── HERO ───────────────────────────────────────────────────── */
.rs-eyebrow {
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary);
    margin: 0 0 12px;
}

.rs-h1 {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.025em;
    color: var(--text);
    margin: 0 0 40px;
}

/* ── SECTION HEADINGS ───────────────────────────────────────── */
.rs-h2 {
    font-size: 1.125rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--text);
    margin: 40px 0 12px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.rs-h2:first-of-type {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

/* ── BODY COPY ──────────────────────────────────────────────── */
.rs-p {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0 0 12px;
}

.rs-p:last-child { margin-bottom: 0; }

.rs-ul {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0 0 12px;
    padding-left: 1.5em;
}

.rs-ul li { margin-bottom: 6px; }

/* ── CODE BLOCKS ────────────────────────────────────────────── */
.rs-pre {
    background: #1a1a2e;
    color: #e2e8f0;
    border-radius: var(--radius-sm);
    padding: 20px;
    overflow-x: auto;
    margin: 16px 0;
}

.rs-pre code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    white-space: pre;
}

/* ── COMMON MISTAKE CALLOUT ────────────────────────────────────
   Amber (#EEC252) used deliberately for the border + label only —
   matches the existing --slide-accent-warm amber used elsewhere in
   the app. See commit report: label-on-surface contrast is AA-safe
   in dark mode but NOT in light mode at these exact values — flagged
   for Senior AI/Adam decision before sign-off, not silently changed. */
.rs-mistake {
    background: var(--surface);
    border-left: 4px solid #EEC252;
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    margin: 16px 0;
}

.rs-mistake-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text);
    margin: 0 0 6px;
}

.rs-mistake p {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0;
}

/* ── TRACE TABLES ───────────────────────────────────────────── */
.rs-table-wrap {
    overflow-x: auto;
    margin: 16px 0;
}

.rs-table {
    border-collapse: collapse;
    font-size: 0.875rem;
    font-family: 'Courier New', Courier, monospace;
    min-width: 100%;
}

.rs-table th {
    background: var(--surface);
    color: var(--text);
    font-weight: 700;
    font-family: var(--font);
    text-align: left;
    padding: 10px 16px;
    border: 1px solid var(--border);
    white-space: nowrap;
}

.rs-table td {
    color: var(--text-secondary);
    padding: 8px 16px;
    border: 1px solid var(--border);
    white-space: nowrap;
}

.rs-table tr:nth-child(even) td {
    background: var(--surface);
}

/* ── PLAYGROUND CTA ─────────────────────────────────────────── */
.rs-cta-wrap {
    margin: 28px 0;
}

.rs-cta-primary {
    display: inline-flex;
    align-items: center;
    padding: 14px 24px;
    font-family: var(--font);
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text-inverse);
    background: var(--primary);
    border: none;
    border-bottom: 3px solid var(--primary-dark);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: filter 0.15s;
}

.rs-cta-primary:hover { filter: brightness(1.05); }

/* ── PYTHON COACH CTA BOX ───────────────────────────────────── */
.rs-pc-cta {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    margin-top: 48px;
}

.rs-pc-cta p {
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--text-secondary);
    margin: 0 0 16px;
}

.rs-pc-cta a {
    display: inline-flex;
    align-items: center;
    padding: 12px 22px;
    font-family: var(--font);
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text-inverse);
    background: var(--primary);
    border-bottom: 3px solid var(--primary-dark);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: filter 0.15s;
}

.rs-pc-cta a:hover { filter: brightness(1.05); }

/* ── RELATED GUIDES ────────────────────────────────────────────── */
.rs-related {
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
}

.rs-related-heading {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0 0 10px;
}

.rs-related-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rs-related-list li { margin-bottom: 6px; }

.rs-related-list a {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.rs-related-list a:hover { text-decoration-thickness: 2px; }

/* ── FOOTER ─────────────────────────────────────────────────── */
#ln-footer {
    border-top: 2px solid var(--border);
    padding: 24px;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

#ln-footer a {
    color: var(--text-secondary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

#ln-footer a:hover { color: var(--primary); }

/* ── BREADCRUMB ─────────────────────────────────────────────── */
.rs-breadcrumb {
    padding-top: var(--topbar-h);
    border-bottom: 1px solid var(--border);
}

.rs-breadcrumb a {
    display: block;
    max-width: 70ch;
    margin: 0 auto;
    padding: 10px 24px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    text-decoration: none;
}

.rs-breadcrumb a:hover { color: var(--primary); }

.rs-page { padding-top: 0; }

@media (min-width: 768px) {
    .rs-content { padding: 64px 32px 100px; }
    .rs-breadcrumb a { padding: 10px 32px; }
}

@media (min-width: 1024px) {
    #ln-footer { padding: 28px 48px; }
}
