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

:root {
    /* ── Layout & Chrome ── */
    --color-bg: #ffffff;
    --color-text: #1a1a2e;
    --color-muted: #6b7280;
    --color-accent: #4f46e5;
    --color-accent-hv: #4338ca;
    --color-header-bg: #1a1a2e;
    --color-header-tx: #f8fafc;
    --color-footer-bg: #111827;
    --color-footer-tx: #9ca3af;
    --color-border: #e5e7eb;
    --color-drop-bg: #ffffff;
    --font-sans: system-ui, -apple-system, 'Segoe UI', sans-serif;
    --radius: 6px;
    --shadow-drop: 0 4px 16px rgba(0, 0, 0, .12);
    --header-h: 64px;
    --max-w: 1200px;

    /* ── Block design tokens (rc-* blocks) ── */
    --rc-accent: #4f46e5; /* primary brand color          */
    --rc-accent-dark: #1a1a2e; /* dark hero / CTA background   */
    --rc-accent-fg: #ffffff; /* text on accent backgrounds   */
    --rc-bg: #ffffff; /* light section background     */
    --rc-bg-alt: #f8fafc; /* alternate section background */
    --rc-text: #1a1a2e; /* headings / primary text      */
    --rc-text-body: #374151; /* body text                    */
    --rc-text-muted: #6b7280; /* secondary / muted text       */
    --rc-text-faint: #9ca3af; /* placeholder / faint text     */
    --rc-border: #e5e7eb; /* border color                 */
    --rc-radius: 16px; /* card border radius           */
    --rc-radius-sm: 8px; /* button / small radius        */
    --rc-section-pad: 80px 20px; /* section padding              */
    --rc-max-w: 1100px; /* content max-width            */
    --rc-success: #16a34a; /* checkmark / success color    */
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}


/* ── Header ─────────────────────────────────── */
header {
    background: var(--color-header-bg);
    color: var(--color-header-tx);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .06);
}

header nav {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1.5rem;
    height: var(--header-h);
    display: flex;
    align-items: center;
    gap: 2rem;
}

.site-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-header-tx);
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: -.01em;
    flex-shrink: 0;
}

.site-name:hover {
    color: #c7d2fe;
}

/* ── Top-nav list ────────────────────────────── */
header nav > ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: .25rem;
    flex-wrap: wrap;
}

header nav > ul > li {
    position: relative;
}

header nav > ul > li > a {
    display: block;
    padding: .5rem .875rem;
    border-radius: var(--radius);
    color: #cbd5e1;
    text-decoration: none;
    font-size: .9375rem;
    font-weight: 500;
    transition: background .15s, color .15s;
    white-space: nowrap;
}

header nav > ul > li > a:hover,
header nav > ul > li:focus-within > a {
    background: rgba(255, 255, 255, .09);
    color: #fff;
}

header nav > ul > li > a.active,
header nav > ul > li > a[aria-current="page"] {
    background: var(--color-accent);
    color: #fff;
}

/* dropdown indicator */
header nav li.has-children > a::after {
    content: '▾';
    margin-left: .35rem;
    font-size: .75em;
    opacity: .7;
}

/* ── Dropdown ────────────────────────────────── */
header nav li.has-children > ul {
    list-style: none;
    position: absolute;
    top: calc(100% + .5rem);
    left: 0;
    min-width: 200px;
    background: var(--color-drop-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-drop);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .18s, transform .18s, visibility .18s;
}

header nav li.has-children:hover > ul,
header nav li.has-children:focus-within > ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

header nav li.has-children > ul li a {
    display: block;
    padding: .6rem 1rem;
    color: var(--color-text);
    text-decoration: none;
    font-size: .9rem;
    transition: background .12s;
}

header nav li.has-children > ul li a:hover {
    background: #f3f4f6;
}

header nav li.has-children > ul li a.active {
    color: var(--color-accent);
    font-weight: 600;
}

header nav li.has-children > ul li + li {
    border-top: 1px solid var(--color-border);
}

/* ── Main ────────────────────────────────────── */
main {
    width: 100%;
    min-width: 100%;
    flex:1;
}

/* ── Section ────────────────────────────────────── */

section {
    width: 100%;
    min-width: 100%;
    margin: 0 auto;
}


/* ── Footer ──────────────────────────────────── */
footer {
    background: var(--color-footer-bg);
    color: var(--color-footer-tx);
    padding: 2rem 1.5rem;
}

footer > .footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem;
}

footer ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
}

footer ul li a {
    display: block;
    padding: .3rem .7rem;
    border-radius: var(--radius);
    color: #9ca3af;
    text-decoration: none;
    font-size: .875rem;
    transition: color .15s;
}

footer ul li a:hover {
    color: #f9fafb;
}

footer ul li a.active {
    color: #c7d2fe;
}

footer .copyright {
    margin-left: auto;
    font-size: .8125rem;
    color: #4b5563;
}

@media (max-width: 640px) {
    footer > .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    footer .copyright {
        margin-left: 0;
    }
}
