:root {
    --demo-bg: #f4efe7;
    --demo-surface: rgba(255, 252, 247, 0.92);
    --demo-surface-strong: #fffdf9;
    --demo-border: rgba(63, 52, 38, 0.12);
    --demo-text: #2f2419;
    --demo-muted: #6d5b49;
    --demo-accent: #b85c38;
    --demo-accent-soft: rgba(184, 92, 56, 0.12);
    --demo-shadow: 0 18px 50px rgba(60, 41, 25, 0.12);
    --demo-radius-xl: 28px;
    --demo-radius-lg: 20px;
    --demo-radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    color: var(--demo-text);
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.78), transparent 34%),
        radial-gradient(circle at top right, rgba(184, 92, 56, 0.1), transparent 28%),
        linear-gradient(180deg, #f8f2e8 0%, #f2ece3 52%, #ebe4db 100%);
}

.demo-page {
    position: relative;
    width: min(100%, 1080px);
    margin: 0 auto;
    padding: 32px 16px 72px;
}

.demo-page::before,
.demo-page::after {
    content: "";
    position: absolute;
    z-index: -1;
    border-radius: 999px;
    opacity: 0.9;
}

.demo-page::before {
    top: 12px;
    right: -10px;
    width: 180px;
    height: 180px;
    background: rgba(184, 92, 56, 0.12);
}

.demo-page::after {
    bottom: 110px;
    left: -24px;
    width: 220px;
    height: 220px;
    background: rgba(42, 78, 101, 0.1);
}

.demo-hero {
    padding: 32px;
    border: 1px solid var(--demo-border);
    border-radius: var(--demo-radius-xl);
    background: linear-gradient(135deg, rgba(255, 253, 249, 0.96), rgba(247, 238, 226, 0.88));
    box-shadow: var(--demo-shadow);
}

.demo-eyebrow,
.demo-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--demo-accent);
}

.demo-eyebrow::before,
.demo-kicker::before {
    content: "";
    width: 30px;
    height: 1px;
    background: currentColor;
}

.demo-hero h1,
.demo-showcase h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 700;
    line-height: 1.05;
}

.demo-hero h1 {
    max-width: 10ch;
    font-size: clamp(2.4rem, 6vw, 4.8rem);
}

.demo-lead {
    max-width: 62ch;
    margin: 18px 0 0;
    font-size: 1.02rem;
    line-height: 1.7;
    color: var(--demo-muted);
}

.demo-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 28px;
    isolation: isolate;
}

.demo-showcase {
    position: relative;
    z-index: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: 24px;
    align-items: center;
    padding: 28px;
    border: 1px solid var(--demo-border);
    border-radius: var(--demo-radius-xl);
    background: var(--demo-surface);
    box-shadow: 0 12px 28px rgba(60, 41, 25, 0.1);
}

.demo-showcase.is-picker-open {
    z-index: 30;
}

.demo-copy {
    min-width: 0;
}

.demo-showcase h2 {
    font-size: clamp(1.8rem, 3vw, 2.65rem);
}

.demo-description {
    margin: 14px 0 0;
    max-width: 56ch;
    line-height: 1.7;
    color: var(--demo-muted);
}

.demo-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.demo-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--demo-accent-soft);
    color: var(--demo-accent);
    font-size: 0.87rem;
    font-weight: 600;
}

.demo-surface {
    position: relative;
    padding: 22px;
    border: 1px solid rgba(63, 52, 38, 0.1);
    border-radius: var(--demo-radius-lg);
    background: var(--demo-surface-strong);
}

.demo-surface::after {
    content: "";
    position: absolute;
    inset: 10px;
    z-index: 0;
    border-radius: calc(var(--demo-radius-lg) - 6px);
    background: linear-gradient(180deg, rgba(184, 92, 56, 0.04), rgba(42, 78, 101, 0.04));
}

.demo-control {
    position: relative;
    z-index: 1;
}

.demo-label {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--demo-muted);
}

.demo-input {
    width: 100%;
    min-height: 48px;
    border: 1px solid #ccb9a2;
    border-radius: var(--demo-radius-md);
    background: #fff;
    padding: 12px 14px;
    font: inherit;
    color: var(--demo-text);
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.demo-input::placeholder {
    color: #998574;
}

.demo-input:focus {
    border-color: var(--demo-accent);
    box-shadow: 0 0 0 4px rgba(184, 92, 56, 0.16);
    transform: translateY(-1px);
}

.demo-helper,
.event-output {
    position: relative;
    z-index: 1;
    margin: 12px 0 0;
    line-height: 1.55;
    color: var(--demo-muted);
    font-size: 0.92rem;
}

.event-output {
    min-height: 1.5rem;
    color: var(--demo-accent);
    font-weight: 600;
}

@media (max-width: 860px) {
    .demo-showcase {
        grid-template-columns: 1fr;
    }

    .demo-hero,
    .demo-showcase {
        padding: 24px;
    }

    .demo-hero h1 {
        max-width: 100%;
    }
}

@media (max-width: 540px) {
    .demo-page {
        padding: 18px 12px 52px;
    }

    .demo-hero,
    .demo-showcase,
    .demo-surface {
        border-radius: 20px;
    }

    .demo-hero,
    .demo-showcase {
        padding: 18px;
    }

    .demo-surface {
        padding: 16px;
    }

    .demo-showcase h2 {
        font-size: 1.65rem;
    }

    .demo-lead,
    .demo-description,
    .demo-helper,
    .event-output {
        font-size: 0.95rem;
    }

    .demo-page::before,
    .demo-page::after {
        display: none;
    }
}