:root {
    --accent-old: #ffb057;
    --accent: #ffd43b;
    --accent-python-blue: #ffd43b;
    --accent-python-orange: #ffd43b;
}

body {
    background: transparent;
}

.pysitegen-site {
    height: 100vh;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) 24px;
    overflow: hidden;
}

.pysitegen-site .container {
    width: 100%;
    max-width: none;
    margin-inline: 0;
    padding-inline: clamp(18px, 4vw, 72px);
}

.site-nav-shell {
    position: sticky;
    top: 0;
    z-index: 20;
    width: 100%;
    background: color-mix(
        in srgb,
        var(--accent-python-orange) 5%,
        var(--accent-python-orange) 5%
    );
    backdrop-filter: blur(32px);
}

.site-nav-inner {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
}

.site-nav-inner a {
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-links {
    justify-content: flex-end;
}

.site-link {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    padding: 0.38rem 0.6rem;
    border: 1px dashed transparent;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 800;
}

.site-link:hover,
.site-link.active {
    border-color: var(--line);
    color: var(--accent-python-blue);
    background: color-mix(in srgb, var(--bg-raised) 60%, transparent);
}

.github-link {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
}

.github-link:hover {
    background: transparent;
}

.github-badge {
    display: block;
    width: 110px;
    max-width: 36vw;
    height: auto;
}

.eyebrow {
    color: var(--accent-python-blue);
}

.button.primary {
    background: var(--accent-python-blue);
    border: 1px solid transparent;
}

.button.primary:hover,
.button.primary:focus,
.button.primary:active {
    background: var(--accent-python-orange);
    border-color: var(--accent-python-blue);
}

.site-main {
    min-height: 0;
    padding-block: 0;
    overflow: auto;
}

.site-footer {
    min-height: 24px;
    background: color-mix(
        in srgb,
        var(--accent-python-blue) 5%,
        var(--accent-python-orange) 5%
    );
    backdrop-filter: blur(32px);
}

.site-route {
    display: none;
    min-height: 0;
    scroll-margin-top: 82px;
}

.site-route.active {
    display: grid;
    height: 100%;
}

.stack {
    gap: 1.5rem;
}

.site-hero {
    position: relative;
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
    isolation: isolate;
}

.site-wallpaper {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: -1;
    width: auto;
    height: 100%;
    pointer-events: none;
    opacity: 0.78;
}

.site-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

.workbench {
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 2px dashed var(--accent-python-orange);
    background: color-mix(
        in srgb,
        var(--bg) 20%,
        var(--accent-python-orange) 5%
    );
    backdrop-filter: blur(32px);
    max-width: 1300px;
    margin: 48px auto;
}

.code-pane,
.preview-pane {
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
}

.preview-pane {
    border-left: 1px dashed var(--accent-python-orange);
}

.hero-bottom {
    display: grid;
    place-items: center;
    padding: clamp(12px, 2vh, 22px) clamp(18px, 4vw, 72px);
    margin-top: 2rem;
}

.hero-copy {
    width: min(100%, 1300px);
    display: grid;
    justify-items: center;
    text-align: center;
    gap: clamp(0.55rem, 1.2vh, 1rem);
    cursor: default;
}

.hero-copy h1 {
    max-width: none;
    font-size: clamp(2.6rem, 6vw, 6.2rem);
    line-height: 0.9;
    letter-spacing: -0.03rem;
    color: var(--accent-python-blue);
    text-shadow: 0 0 10px var(--accent-python-blue);
}

.site-hero-copy {
    max-width: 820px;
    color: var(--soft);
    font-size: clamp(0.92rem, 1vw, 1.05rem);
}

.hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-3);
}

.hero-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: 0;
}

.install-shell {
    min-height: 44px;
    display: inline-grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    align-items: stretch;
    border: 1px dashed var(--accent-python-blue);
    background: color-mix(in srgb, var(--bg-raised) 72%, transparent);
}

.install-command {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 0.85rem;
    color: var(--accent-python-orange);
    backdrop-filter: blur(32px);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 800;
}

.copy-button {
    width: 44px;
    min-height: 42px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-left: 1px dashed var(--accent-python-blue);
    background: color-mix(in srgb, var(--bg) 62%, var(--bg-raised));
    color: var(--soft);
    cursor: pointer;
}

.copy-button:hover,
.copy-button:focus-visible,
.copy-button:active,
.copy-button.copied {
    color: var(--accent-python-blue);
    outline: none;
}

.panel-label {
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin: 0;
    padding-inline: var(--space-2);
    border-bottom: 1px dashed var(--accent-python-orange);
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.split-label {
    justify-content: space-between;
}

.panel-title {
    font: inherit;
    margin: 0;
    color: var(--muted);
}

.split-label a {
    color: var(--dim);
    font-size: 0.68rem;
    text-transform: none;
}

.split-label a:hover {
    color: var(--accent-python-orange);
}

.hero-code {
    height: 100%;
    min-height: 0;
    margin: 0;
    border: 0;
    background: color-mix(in srgb, var(--bg) 25%, transparent);
    box-shadow: none;
    overflow: auto;
}

.hero-code code {
    display: block;
    width: 100%;
    min-height: 100%;
    padding: clamp(16px, 2vw, 30px);
    padding-top: 0;
    padding-bottom: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: clamp(0.72rem, 0.78vw, 0.9rem);
    line-height: 1.45;
    color: var(--soft);
    letter-spacing: -0.5px;
}

.copy-svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: square;
    stroke-linejoin: miter;
}

.copy-front,
.copy-back {
    transition:
        transform 180ms ease,
        stroke 180ms ease;
}

.copy-button:hover .copy-front,
.copy-button:focus-visible .copy-front {
    transform: translate(-1px, -1px);
}

.copy-button:hover .copy-back,
.copy-button:focus-visible .copy-back {
    transform: translate(1px, 1px);
}

.copy-check {
    opacity: 0;
    stroke-dasharray: 12;
    stroke-dashoffset: 12;
}

.copy-button.copied .copy-front,
.copy-button.copied .copy-back {
    opacity: 0.28;
}

.copy-button.copied .copy-check {
    animation: draw-check 420ms ease forwards;
}

.copy-button.copy-failed {
    color: #ff776f;
}

.section-heading {
    padding: clamp(32px, 5vw, 72px) 0 var(--space-4);
    max-width: 760px;
}

.api-list {
    display: grid;
    border-top: 1px solid var(--line);
}

.api-row {
    min-height: 86px;
    display: grid;
    grid-template-columns: minmax(220px, 0.28fr) minmax(0, 1fr);
    align-items: center;
    gap: var(--space-4);
    padding-block: var(--space-3);
    border-bottom: 1px solid var(--line);
}

.preview-surface {
    height: 100%;
    min-height: 0;
    overflow: auto;
    display: grid;
    place-items: center;
    padding: clamp(14px, 2vw, 30px);
    background: color-mix(in srgb, var(--bg) 25%, transparent);
}

.output-stage {
    min-height: 0;
    height: 100%;
    display: grid;
    position: relative;
    overflow: hidden;
}

.demo-panel {
    grid-column: 1;
    grid-row: 1;
    min-height: 0;
}

.demo-panel[hidden] {
    display: none;
}

.panel-switches {
    display: inline-flex;
    align-items: center;
    gap: 1px;
}

.panel-switch {
    min-height: 26px;
    padding: 0.24rem 0.56rem;
    border: 0;
    border-radius: 0;
    color: var(--muted);
    background: none;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
}

.panel-switch:hover,
.panel-switch:focus-visible,
.panel-switch.active {
    color: var(--accent-python-orange);
    background: none;
    outline: none;
}

.generated-html {
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: clamp(16px, 2vw, 30px);
    border: 0;
    border-radius: 0;
    background: color-mix(in srgb, var(--bg) 25%, transparent);
    box-shadow: none;
    overflow: auto;
}

.generated-html code {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    color: var(--soft);
    font-size: clamp(0.72rem, 0.78vw, 0.9rem);
    line-height: 1.45;
}

.demo-output {
    width: min(100%, 390px);
    padding: clamp(18px, 2vw, 30px);
    background: color-mix(in srgb, var(--bg) 25%, transparent);
}

.demo-output h1 {
    font-size: clamp(1.6rem, 2.5vw, 3rem);
}

.docs-toc {
    border: 2px dashed var(--line);
}

.docs-toc .toc-link.active,
.docs-toc .toc-link[aria-current="location"] {
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 9%, transparent);
}

.docs-toc .toc-link.active::before,
.docs-toc .toc-link[aria-current="location"]::before {
    content: "> ";
    margin-left: 0.4rem;
}

.docs-content {
    border: 2px dashed var(--accent);
}

.docs-content h1,
.docs-content h2,
.docs-content h3 {
    color: var(--accent);
}

.docs-content h1 {
    font-size: clamp(1.5rem, 2.5vw, 2.3rem);
    text-transform: uppercase;
}

.docs-content h2 {
    font-size: clamp(1.2rem, 2.2vw, 1.8rem);
    text-transform: uppercase;
    border-top: 0;
}

.docs-content h3 {
    font-size: clamp(1rem, 1.8vw, 1.5rem);
    text-transform: uppercase;
    border-top: 0;
}

.docs-content pre {
    background: var(--bg-raised);
    padding: 0 1rem;
    overflow-x: auto;
    border: 1px dashed var(--accent);
}

.docs-content code {
    background: var(--bg-raised);
    padding: 0.2rem 0.4rem;
    border: 1px dashed var(--line);
}

.docs-content pre code {
    font-size: clamp(0.9rem, 2vw, 1rem);
    background: none;
    border: 0;
    white-space: pre;
}

.docs-content p,
.docs-content ul,
.docs-content ol,
.docs-content li {
    font-size: clamp(0.9rem, 2vw, 1rem);
}

@keyframes draw-check {
    to {
        opacity: 1;
        stroke-dashoffset: 0;
    }
}

@keyframes build-pulse {
    0%,
    100% {
        box-shadow: inset 0 0 0 0 rgba(239, 176, 87, 0);
    }

    50% {
        box-shadow: inset 0 0 18px rgba(239, 176, 87, 0.16);
    }
}

@keyframes icon-trace {
    0% {
        stroke-dasharray: 40;
        stroke-dashoffset: 40;
    }
    100% {
        stroke-dasharray: 40;
        stroke-dashoffset: 0;
    }
}

@media (max-width: 920px) {
    .pysitegen-site .container {
        padding-inline: 2rem;
    }

    .site-nav-inner {
        min-height: auto;
        align-items: center;
        padding-block: var(--space-2);
    }

    .workbench {
        grid-template-columns: 1fr;
        margin: 2rem 0;
    }

    .build-flow {
        grid-template-columns: 1fr;
        align-items: start;
        padding-block: var(--space-2);
    }

    .build-flow span:first-child::after,
    .build-flow .build-command::after {
        display: none;
    }

    .site-hero {
        min-height: auto;
        overflow: visible;
    }

    .hero-copy h1 {
        max-width: none;
        font-size: clamp(3rem, 17vw, 5.8rem);
    }

    .api-row {
        grid-template-columns: 1fr;
    }

    .code-pane,
    .preview-pane {
        border-right: 0;
        border-bottom: 1px dashed var(--accent);
    }

    .preview-pane {
        border-left: 0;
    }
}
