:root {
    --background: #ffffff;
    --surface: #f5f5f7;
    --surface-raised: #ffffff;
    --text: #1d1d1f;
    --muted: #6e6e73;
    --border: #d2d2d7;
    --divider: #e8e8ed;
    --accent: hsl(var(--accent-hue) 65% 34%);
    --on-accent: #ffffff;
    --header-background: rgba(255, 255, 255, 0.8);
    color-scheme: light;
}

[data-theme="dark"] {
    --background: #000000;
    --surface: #1d1d1f;
    --surface-raised: #2c2c2e;
    --text: #f5f5f7;
    --muted: #a1a1a6;
    --border: #424245;
    --divider: #2c2c2e;
    --accent: hsl(var(--accent-hue) 80% 68%);
    --on-accent: #101013;
    --header-background: rgba(0, 0, 0, 0.8);
    color-scheme: dark;
}

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

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--text);
    background-color: var(--background);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3 {
    line-height: 1.15;
    letter-spacing: -0.015em;
    font-weight: 700;
    text-wrap: balance;
}

h1 {
    font-size: clamp(2.1rem, 5.5vw, 3.3rem);
}

h2 {
    font-size: clamp(1.5rem, 3.5vw, 2rem);
}

h3 {
    font-size: 1.2rem;
}

p, ul, ol {
    margin: 0;
}

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

a:hover {
    text-decoration: underline;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 2px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    background-color: var(--accent);
    color: var(--on-accent);
    padding: 0.6rem 1.2rem;
    border-radius: 0 0 12px 0;
    font-weight: 600;
}

.skip-link:focus {
    left: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: var(--header-background);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--divider);
}

.site-navigation {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 22px;
    min-height: 52px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--text);
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
}

.brand:hover {
    text-decoration: none;
}

.brand-mark {
    display: block;
    border-radius: 6px;
}

.brand-mark-background {
    fill: hsl(var(--accent-hue) 65% 34%);
}

.brand-mark-letter {
    fill: #ffffff;
}

.navigation-links {
    display: flex;
    align-items: center;
    gap: 1.3rem;
    margin-left: auto;
    font-size: 0.85rem;
}

.navigation-links a {
    color: var(--text);
    opacity: 0.85;
    padding: 0.35rem 0;
}

.navigation-links a:hover {
    opacity: 1;
    text-decoration: none;
    color: var(--accent);
}

.navigation-links a[aria-current="page"] {
    color: var(--accent);
    opacity: 1;
    font-weight: 600;
}

.theme-toggle[hidden] {
    display: none;
}

.theme-toggle {
    border: 1px solid var(--border);
    background-color: transparent;
    color: var(--text);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.theme-toggle-icon-sun {
    display: none;
}

[data-theme="dark"] .theme-toggle-icon-sun {
    display: block;
}

[data-theme="dark"] .theme-toggle-icon-moon {
    display: none;
}

main {
    flex: 1;
    width: 100%;
}

.page-shell {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 22px;
}

.hero {
    padding: 5.5rem 0 4rem;
    text-align: center;
}

.hero h1 {
    max-width: 21ch;
    margin: 0 auto;
}

.hero .lead {
    max-width: 56ch;
    margin: 1.4rem auto 0;
    font-size: 1.3rem;
    line-height: 1.5;
    color: var(--muted);
    text-wrap: balance;
}

.page-heading {
    padding: 4.5rem 0 1rem;
    max-width: 720px;
    margin: 0 auto;
}

.page-heading .lead {
    margin-top: 1.2rem;
    font-size: 1.25rem;
    line-height: 1.5;
    color: var(--muted);
}

.section {
    padding: 3.5rem 0;
}

.section + .section {
    border-top: 1px solid var(--divider);
}

.section-title {
    margin-bottom: 1.8rem;
}

.button {
    display: inline-block;
    background-color: var(--accent);
    color: var(--on-accent);
    font-size: 1rem;
    font-weight: 500;
    padding: 0.7rem 1.6rem;
    border-radius: 980px;
}

.button:hover {
    text-decoration: none;
    opacity: 0.88;
}

.card {
    background-color: var(--surface);
    border-radius: 18px;
    padding: 2.2rem;
}

.card + .card {
    margin-top: 1.5rem;
}

.card h3 {
    margin-bottom: 0.6rem;
}

.card p + p {
    margin-top: 0.8rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.card-grid .card + .card {
    margin-top: 0;
}

.article-card {
    display: block;
    color: var(--text);
    transition: transform 0.2s ease;
}

.article-card:hover {
    text-decoration: none;
    transform: translateY(-2px);
}

.article-card .card-kicker {
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.7rem;
}

.article-card h3 {
    font-size: 1.45rem;
}

.article-card .card-summary {
    margin-top: 0.7rem;
    color: var(--muted);
}

.article-card .card-meta {
    margin-top: 1.2rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.section-prose {
    max-width: 720px;
}

.section-prose p + p {
    margin-top: 1rem;
}

.action-row {
    margin-top: 1.8rem;
}

.prose {
    max-width: 720px;
    margin: 0 auto;
}

.prose p {
    margin: 1.1rem 0;
}

.prose h2 {
    margin: 2.8rem 0 0.9rem;
}

.prose h3 {
    margin: 2rem 0 0.6rem;
}

.prose ul, .prose ol {
    margin: 1.1rem 0;
    padding-left: 1.4rem;
}

.prose li {
    margin: 0.45rem 0;
}

.prose li::marker {
    color: var(--accent);
}

.article-header {
    max-width: 720px;
    margin: 0 auto;
    padding: 4rem 0 0.5rem;
}

.article-header h1 {
    font-size: clamp(1.9rem, 4.5vw, 2.7rem);
}

.article-byline {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.9rem;
    font-size: 0.92rem;
    color: var(--muted);
}

.article-byline .byline-avatar {
    border-radius: 50%;
    display: block;
}

.article-byline .byline-avatar-background {
    fill: var(--accent);
}

.article-byline .byline-avatar-letters {
    fill: var(--on-accent);
}

.article-byline .byline-details span {
    display: block;
}

.article-byline .byline-author {
    color: var(--text);
    font-weight: 600;
}

.notice {
    background-color: var(--surface);
    border-radius: 14px;
    padding: 1.2rem 1.5rem;
    font-size: 0.95rem;
    color: var(--muted);
    margin: 2rem 0;
}

.notice strong {
    color: var(--text);
}

.checklist-summary {
    background-color: var(--surface);
    border-radius: 18px;
    padding: 1.8rem 2rem;
    margin: 2rem 0;
}

.checklist-summary ul {
    margin-bottom: 0;
}

.author-profile {
    display: flex;
    gap: 1.6rem;
    align-items: flex-start;
    background-color: var(--surface);
    border-radius: 18px;
    padding: 2.2rem;
}

.author-profile .author-avatar {
    border-radius: 50%;
    flex-shrink: 0;
    display: block;
}

.author-profile .author-avatar-background {
    fill: var(--accent);
}

.author-profile .author-avatar-letters {
    fill: var(--on-accent);
}

.author-profile .author-username {
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 0.15rem;
}

.author-profile .author-biography {
    margin-top: 0.9rem;
}

.author-profile .author-biography p + p {
    margin-top: 0.8rem;
}

.definition-list {
    display: grid;
    grid-template-columns: minmax(160px, 220px) 1fr;
    gap: 0.8rem 1.6rem;
    margin: 1.5rem 0;
}

.definition-list dt {
    font-weight: 600;
}

.definition-list dd {
    color: var(--muted);
    overflow-wrap: anywhere;
}

.policy-updated {
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 0.8rem;
}

.error-panel {
    text-align: center;
    padding: 7rem 0 6rem;
}

.error-panel .error-code {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
}

.error-panel .lead {
    max-width: 46ch;
    margin: 1.2rem auto 2.2rem;
    color: var(--muted);
    font-size: 1.15rem;
}

.site-footer {
    border-top: 1px solid var(--divider);
    background-color: var(--surface);
    margin-top: 4rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.footer-content {
    max-width: 980px;
    margin: 0 auto;
    padding: 3rem 22px 2rem;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2.5rem;
}

.footer-heading {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.9rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin: 0.45rem 0;
}

.footer-links a {
    color: var(--muted);
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-independence {
    margin-bottom: 1.4rem;
}

.footer-identity address {
    font-style: normal;
    line-height: 1.8;
}

.footer-identity a {
    color: var(--muted);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.footer-identity a:hover {
    color: var(--accent);
}

.footer-legal {
    border-top: 1px solid var(--divider);
}

.footer-legal-content {
    max-width: 980px;
    margin: 0 auto;
    padding: 1.3rem 22px;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 2rem;
    justify-content: space-between;
}

@media (max-width: 720px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .author-profile {
        flex-direction: column;
    }

    .definition-list {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }

    .definition-list dd {
        margin-bottom: 0.7rem;
    }
}

@media (max-width: 600px) {
    .brand-name {
        display: none;
    }

    .site-navigation {
        gap: 1rem;
    }

    .navigation-links {
        gap: 0.9rem;
        font-size: 0.82rem;
    }

    .hero {
        padding: 3.5rem 0 3rem;
    }

    .card, .author-profile {
        padding: 1.6rem;
    }
}
