:root {
    color-scheme: light;
    --font-display: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --page: #f8f8f8;
    --surface: #ffffff;
    --soft: #f2f3f5;
    --ink: #0f172a;
    --copy: #475569;
    --muted: #5b6b7e;
    --accent: #df547f;
    --accent-dark: #b93862;
    --accent-soft: #fce8ef;
    --action: #b93862;
    --action-hover: #9e2f51;
    --action-ink: #ffffff;
    --warm: #f3a23c;
    --warm-soft: #fff3e5;
    --focus: #237a5e;
    --ease: cubic-bezier(.22, 1, .36, 1);
}

html[data-theme="dark"] {
    color-scheme: dark;
    --page: #17171a;
    --surface: #242427;
    --soft: #323238;
    --ink: #f6f7fb;
    --copy: #c4c8d2;
    --muted: #969baa;
    --accent: #f06f99;
    --accent-dark: #ff90b2;
    --accent-soft: #512c3a;
    --action: #f06f99;
    --action-hover: #ff90b2;
    --action-ink: #17171a;
    --warm: #ffb65d;
    --warm-soft: #4b3827;
    --focus: #88d8bd;
}

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

html {
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    min-height: 100dvh;
    background: var(--page);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    text-rendering: optimizeLegibility;
    -webkit-tap-highlight-color: transparent;
}

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

button {
    border: 0;
    font: inherit;
    cursor: pointer;
}

img,
svg {
    display: block;
}

:focus-visible {
    outline: 4px solid color-mix(in srgb, var(--focus) 38%, transparent);
    outline-offset: 4px;
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 20000;
    padding: 10px 16px;
    border-radius: 18px;
    background: var(--ink);
    color: var(--page);
    transform: translateY(-180%);
    transition: transform 180ms var(--ease);
}

.skip-link:focus {
    transform: translateY(0);
}

.content-header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10240;
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 320px;
    height: 128px;
    padding: 0 32px;
    background: var(--page);
}

.content-wing {
    display: flex;
    align-items: center;
    height: 64px;
    min-width: 0;
    flex: 1;
    border-radius: 32px;
    background: var(--surface);
}

.content-wing--brand {
    justify-content: flex-end;
}

.content-wing--tools {
    justify-content: flex-start;
}

.content-wing__inner {
    display: flex;
    align-items: center;
    width: 516px;
    height: 48px;
}

.content-wing__inner--brand {
    justify-content: flex-start;
    margin-right: 20px;
}

.content-wing__inner--tools {
    justify-content: flex-end;
    gap: 6px;
    margin-left: 20px;
}

.content-wordmark,
.content-play,
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    border-radius: 18px;
    color: var(--ink);
    white-space: nowrap;
    transition: background-color 180ms ease, opacity 180ms ease;
}

.content-wordmark {
    padding: 0 18px;
    background: var(--warm-soft);
    font-size: 15px;
    font-weight: 650;
}

.content-wordmark strong {
    margin-right: .28em;
    color: var(--accent);
}

.content-play,
.theme-toggle {
    padding: 0 14px;
    background: transparent;
    font-size: 14px;
    font-weight: 560;
}

.content-play:hover,
.theme-toggle:hover {
    background: var(--page);
}

.content-play:active,
.theme-toggle:active {
    opacity: .62;
}

.content-logo {
    display: block;
    width: 88px;
    height: 88px;
    margin: 0 20px;
    flex: 0 0 88px;
    border-radius: 50%;
    background: var(--surface);
    transition: opacity 180ms ease, transform 220ms var(--ease);
}

.content-logo:hover {
    transform: scale(1.035);
}

.content-logo:active {
    opacity: .72;
    transform: scale(.98);
}

.content-logo img {
    width: 88px;
    height: 88px;
    object-fit: contain;
    user-select: none;
}

.theme-toggle {
    width: 44px;
    min-width: 44px;
    padding: 0;
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.theme-toggle__to-light {
    display: none;
}

.theme-toggle[data-mode="dark"] .theme-toggle__to-light {
    display: block;
}

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

.content-main {
    width: 100%;
    min-height: calc(100dvh - 128px);
    padding-top: 128px;
}

.reading-panel,
.not-found-panel {
    width: min(1200px, calc(100% - 64px));
    margin: 0 auto 32px;
    border-radius: 32px;
    background: var(--surface);
}

.reading-panel {
    padding: clamp(60px, 8vw, 96px) clamp(24px, 7vw, 80px);
}

.reading-inner {
    width: min(100%, 880px);
    margin: 0 auto;
}

.page-hero {
    max-width: 720px;
}

.page-hero h1,
.not-found-copy h1 {
    color: var(--ink);
    font-family: var(--font-display);
    font-size: clamp(38px, 5vw, 58px);
    font-weight: 760;
    line-height: 1.08;
    letter-spacing: -.03em;
}

.page-lead {
    max-width: 64ch;
    margin-top: 18px;
    color: var(--copy);
    font-size: clamp(17px, 2vw, 20px);
    line-height: 1.7;
}

.page-updated {
    margin-top: 14px;
    color: var(--muted);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.page-summary {
    max-width: 720px;
    margin: 44px 0 52px;
    padding: 28px 30px;
    border-radius: 24px;
    background: var(--warm-soft);
}

.page-summary h2 {
    margin-bottom: 10px;
    color: var(--ink);
    font-size: 20px;
    font-weight: 750;
    line-height: 1.3;
}

.page-summary p,
.content-section p,
.content-section li {
    color: var(--copy);
    font-size: 16px;
    line-height: 1.75;
}

.page-summary p + p,
.content-section p + p {
    margin-top: 14px;
}

.content-section {
    max-width: 680px;
}

.content-section + .content-section {
    margin-top: 48px;
}

.content-section h2 {
    margin-bottom: 14px;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: clamp(23px, 2.8vw, 28px);
    font-weight: 740;
    line-height: 1.25;
    letter-spacing: -.025em;
}

.content-section ul {
    margin-top: 14px;
    padding-left: 20px;
}

.content-section li + li {
    margin-top: 8px;
}

.content-section a:not(.page-action) {
    color: var(--accent-dark);
    font-weight: 680;
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, var(--accent-dark) 38%, transparent);
    text-underline-offset: 3px;
}

.about-values {
    display: grid;
    max-width: 800px;
    margin: 48px 0;
    padding: 32px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px 40px;
    border-radius: 28px;
    background: var(--soft);
}

.about-values h2 {
    margin-bottom: 8px;
    color: var(--ink);
    font-size: 17px;
    font-weight: 740;
}

.about-values p {
    color: var(--copy);
    font-size: 14px;
    line-height: 1.65;
}

.page-action,
.not-found-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    margin-top: 32px;
    padding: 0 22px;
    border-radius: 24px;
    background: var(--action);
    color: var(--action-ink);
    font-size: 14px;
    font-weight: 740;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 180ms ease, opacity 180ms ease, transform 200ms var(--ease);
}

.page-action:hover,
.not-found-action:hover {
    background: var(--action-hover);
}

.page-action:active,
.not-found-action:active {
    opacity: .72;
    transform: scale(.98);
}

.content-footer {
    display: flex;
    align-items: center;
    min-width: 320px;
    min-height: 128px;
    padding: 0 32px;
}

.content-footer__capsule {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 64px;
    padding: 10px 16px;
    flex: 1;
    border-radius: 32px;
    background: var(--surface);
}

.content-footer__content {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    min-height: 44px;
    padding: 6px;
    border-radius: 999px;
    background: radial-gradient(circle, var(--warm-soft) 8%, transparent 100%);
}

.content-footer__content p {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    flex-wrap: wrap;
    gap: 8px 10px;
    color: var(--copy);
    font-size: 14px;
    line-height: 1.4;
}

.content-footer__brand {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: radial-gradient(circle, var(--surface) 8%, transparent 100%);
    color: var(--ink);
    font-weight: 650;
    white-space: nowrap;
}

.content-footer__links {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    border-radius: 999px;
    background: radial-gradient(circle, var(--surface) 8%, transparent 100%);
}

.content-footer__links a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 10px;
    border-radius: 999px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 650;
    white-space: nowrap;
}

.not-found-page {
    display: flex;
    min-height: 100dvh;
    flex-direction: column;
}

.not-found-page .content-main {
    display: flex;
    align-items: stretch;
    flex: 1;
}

.not-found-panel {
    display: grid;
    min-height: calc(100dvh - 256px);
    padding: 56px 24px;
    place-items: center;
}

.not-found-content {
    width: min(100%, 620px);
    text-align: center;
}

.not-found-code {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 34px;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: clamp(96px, 15vw, 168px);
    font-weight: 800;
    line-height: .8;
    letter-spacing: -.07em;
}

.not-found-code img {
    width: clamp(88px, 11vw, 126px);
    height: clamp(88px, 11vw, 126px);
    margin: 0 clamp(8px, 1.5vw, 18px);
    object-fit: contain;
}

.not-found-copy p {
    max-width: 50ch;
    margin: 18px auto 0;
    color: var(--copy);
    font-size: 17px;
    line-height: 1.7;
}

@media (max-width: 767.98px) {
    .content-header {
        display: grid;
        padding: 0 14px;
        grid-template-columns: 88px minmax(0, 1fr) 64px;
        column-gap: 14px;
    }

    .content-logo {
        order: 1;
        grid-column: 1;
        margin: 0;
    }

    .content-wing--brand {
        width: 100%;
        min-width: 0;
        order: 2;
        grid-column: 2;
        justify-content: center;
        overflow: hidden;
    }

    .content-wing__inner--brand {
        width: auto;
        margin: 0;
        justify-content: center;
    }

    .content-wordmark {
        max-width: 100%;
        padding-inline: 14px;
    }

    .content-wing--tools {
        width: 64px;
        min-width: 64px;
        order: 3;
        grid-column: 3;
        justify-content: center;
    }

    .content-wing__inner--tools {
        width: 64px;
        margin: 0;
        justify-content: center;
    }

    .content-play {
        display: none;
    }

    .reading-panel,
    .not-found-panel {
        width: calc(100% - 28px);
        border-radius: 24px;
    }

    .reading-panel {
        padding: 48px 24px;
    }

    .page-summary {
        margin: 36px 0 42px;
        padding: 24px;
    }

    .content-section + .content-section {
        margin-top: 40px;
    }

    .about-values {
        margin: 40px 0;
        padding: 24px;
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
        border-radius: 24px;
    }

    .content-footer {
        padding: 0 14px;
    }

    .content-footer__capsule {
        margin: 32px 0;
        padding: 10px;
    }

    .content-footer__content {
        width: 100%;
        padding: 8px;
        border-radius: 24px;
        background: transparent;
    }

    .content-footer__content p {
        width: 100%;
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .content-footer__brand {
        order: 1;
    }

    .content-footer__links {
        width: 100%;
        order: 2;
    }

    .not-found-panel {
        min-height: calc(100dvh - 256px);
        padding: 48px 20px;
    }

    .not-found-code {
        margin-bottom: 28px;
    }

    .not-found-copy p {
        font-size: 16px;
    }
}

@media (max-width: 420px) {
    .content-wordmark {
        font-size: 14px;
    }

    .page-action,
    .not-found-action {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}

@media (forced-colors: active) {
    .content-wing,
    .content-logo,
    .reading-panel,
    .page-summary,
    .about-values,
    .not-found-panel,
    .content-footer__capsule {
        border: 1px solid CanvasText;
    }
}
