:root {
    --bg: #edf3ff;
    --surface: rgba(255, 255, 255, 0.7);
    --surface-strong: rgba(255, 255, 255, 0.92);
    --ink: #152144;
    --muted: #4c5d8a;
    --line: rgba(76, 99, 243, 0.14);
    --accent: var(--brand-primary, #4c63f3);
    --accent-dark: var(--brand-primary-active, #394bd6);
    --accent-soft: var(--brand-primary-light, #dce3ff);
    --sage: var(--brand-secondary, #00cc01);
    --sage-soft: var(--brand-secondary-light, #ddffdd);
    --shadow: 0 28px 72px rgba(41, 58, 130, 0.14);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --container: min(1120px, calc(100vw - 2rem));
    --display: "Roboto", "Segoe UI", Arial, sans-serif;
    --body: "Roboto", "Segoe UI", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, color-mix(in srgb, var(--accent-soft) 80%, white), transparent 34%),
        radial-gradient(circle at top right, color-mix(in srgb, var(--sage-soft) 76%, white), transparent 30%),
        linear-gradient(180deg, #f7faff 0%, #edf3ff 100%);
    font-family: var(--body);
    line-height: 1.6;
}

a {
    color: inherit;
}

img {
    max-width: 100%;
}

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

.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    z-index: 1000;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: #fff;
}

.skip-link:focus {
    top: 1rem;
}

.site-shell {
    width: var(--container);
    margin: 0 auto;
    padding: 1rem 0 3rem;
}

.site-header,
.site-footer,
.hero-section,
.feature-band,
.note-panel,
.form-shell,
.search-shell,
.error-shell,
.card-grid .info-card,
.hero-panel {
    backdrop-filter: blur(14px);
}

.site-header,
.site-footer,
.feature-band,
.note-panel,
.form-shell,
.search-shell,
.error-shell {
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.site-header,
.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.2rem 1.5rem;
    border-radius: var(--radius-lg);
}

.site-header {
    position: sticky;
    top: 1rem;
    z-index: 40;
    align-items: center;
    margin-bottom: 1.6rem;
    padding: 0.95rem 1rem 0.95rem 1.35rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 24px 60px rgba(35, 49, 108, 0.12);
}

.brand-kicker,
.eyebrow,
.panel-label,
.footer-title {
    margin: 0 0 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.74rem;
    color: var(--sage);
}

.brand-name,
h1,
h2 {
    font-family: var(--display);
    letter-spacing: -0.04em;
}

.brand-name {
    display: inline-block;
    font-size: 1.08rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    text-decoration: none;
}

.brand-tagline,
.muted,
.footer-copy {
    margin: 0;
    color: var(--muted);
}

.primary-nav,
.hero-actions,
.footer-links,
.search-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.primary-nav a,
.footer-links a {
    text-decoration: none;
    color: var(--muted);
}

.primary-nav {
    flex: 1;
    justify-content: center;
}

.primary-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 2.85rem;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    color: var(--ink);
    transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.primary-nav a:hover {
    background: rgba(76, 99, 243, 0.08);
    color: var(--accent);
    transform: translateY(-1px);
}

.header-logo-slot {
    min-width: clamp(92px, 10vw, 128px);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    border: 1px dashed rgba(76, 99, 243, 0.26);
    background: rgba(255, 255, 255, 0.22);
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.search-inline,
.search-panel {
    display: grid;
    gap: 0.6rem;
}

.search-inline {
    grid-template-columns: 1fr auto;
    min-width: min(100%, 320px);
}

input,
textarea,
button {
    font: inherit;
}

input,
textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(31, 42, 37, 0.16);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink);
}

textarea {
    resize: vertical;
}

button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.88rem 1.2rem;
    border-radius: 999px;
    border: 0;
    cursor: pointer;
    text-decoration: none;
    transition: transform 180ms ease, background-color 180ms ease, color 180ms ease;
}

.button:hover,
button:hover {
    transform: translateY(-1px);
}

.button-primary,
button,
.search-inline button {
    background: var(--accent);
    color: var(--brand-primary-on, #fff);
}

.button-primary:hover,
button:hover,
.search-inline button:hover {
    background: var(--accent-dark);
}

.button-secondary {
    background: color-mix(in srgb, var(--sage-soft) 72%, white);
    color: var(--sage);
}

.hero-section {
    --pointer-origin-x: 72%;
    --pointer-origin-y: 28%;
    display: grid;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    align-items: end;
    grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1fr);
    gap: 2rem;
    margin-bottom: 1.6rem;
    padding: clamp(1.5rem, 3vw, 2rem);
    min-height: clamp(430px, 72vh, 620px);
    background:
        linear-gradient(140deg, color-mix(in srgb, var(--brand-primary, #4c63f3) 90%, #16235b), color-mix(in srgb, var(--brand-primary, #4c63f3) 70%, #8ba0ff 16%));
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 36px 90px rgba(33, 46, 112, 0.28);
}

.hero-section::before,
.hero-section::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.hero-section::before {
    background:
        radial-gradient(circle at 14% 82%, rgba(0, 204, 1, 0.2), transparent 25%),
        radial-gradient(circle at 86% 12%, rgba(255, 255, 255, 0.12), transparent 18%);
}

.hero-section::after {
    background: radial-gradient(circle at var(--pointer-origin-x) var(--pointer-origin-y), rgba(255, 255, 255, 0.18), transparent 26%);
}

.hero-section > * {
    position: relative;
    z-index: 1;
}

.hero-bubble-layer {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.hero-bubble {
    position: absolute;
    top: var(--top);
    left: var(--left);
    width: var(--size);
    aspect-ratio: 1;
    border-radius: 50%;
    background:
        radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.14) 58%, rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(18px);
    transform: translate3d(var(--shift-x, 0px), var(--shift-y, 0px), 0);
    transition: transform 180ms ease-out;
}

.hero-copy,
.hero-panel,
.feature-band,
.note-panel,
.form-shell,
.search-shell,
.error-shell {
    padding: 1.6rem;
    border-radius: var(--radius-lg);
}

.hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.8rem;
    padding: 0.2rem 0;
    background: none;
    border: 0;
    box-shadow: none;
    color: #fff;
}

h1 {
    margin: 0 0 1rem;
    font-size: clamp(2.5rem, 6vw, 4.8rem);
    line-height: 0.92;
}

h2 {
    margin-top: 0;
    font-size: clamp(1.5rem, 3.4vw, 2.3rem);
    line-height: 1.05;
}

.hero-summary {
    max-width: 24ch;
    font-size: 1.08rem;
    color: rgba(255, 255, 255, 0.86);
}

.hero-kicker {
    margin: 0 0 1rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.7);
}

.hero-side-summary {
    max-width: 28ch;
    margin: 0;
    font-size: clamp(1.08rem, 2vw, 1.28rem);
    color: rgba(255, 255, 255, 0.84);
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hero-tags li {
    padding: 0.58rem 0.92rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.92rem;
}

.hero-panel {
    justify-self: end;
    width: min(100%, 470px);
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 26px 64px rgba(17, 29, 82, 0.24);
    color: #fff;
    backdrop-filter: blur(24px);
}

.hero-panel h1 {
    color: #fff;
    font-size: clamp(2.8rem, 5vw, 4.8rem);
}

.hero-panel .button-primary {
    background: rgba(255, 255, 255, 0.96);
    color: var(--brand-primary, #4c63f3);
    box-shadow: 0 16px 42px rgba(15, 23, 66, 0.18);
}

.hero-panel .button-primary:hover {
    background: rgba(255, 255, 255, 0.84);
}

.hero-panel ul,
.side-note ul {
    margin: 0;
    padding-left: 1.1rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.4rem;
}

.info-card {
    padding: 1.35rem;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
}

.feature-band,
.note-panel,
.page-intro,
.alert {
    margin-bottom: 1.4rem;
}

.feature-list {
    margin: 1rem 0 0;
    padding-left: 1.2rem;
}

.page-intro {
    max-width: 62ch;
}

.alert {
    padding: 1rem 1.2rem;
    border-radius: var(--radius-md);
}

.alert-success {
    background: rgba(63, 95, 82, 0.14);
    border: 1px solid rgba(63, 95, 82, 0.24);
}

.alert-error {
    background: rgba(200, 91, 52, 0.12);
    border: 1px solid rgba(200, 91, 52, 0.24);
}

.form-shell,
.search-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.9fr);
    gap: 1.2rem;
}

.starter-form {
    display: grid;
    gap: 1rem;
}

.field-row {
    display: grid;
    gap: 0.45rem;
}

.checkbox-row {
    gap: 0.65rem;
}

.checkbox-label {
    display: flex;
    gap: 0.75rem;
    align-items: start;
}

.checkbox-label input {
    width: auto;
    margin-top: 0.2rem;
}

.field-error {
    margin: 0;
    color: var(--accent-dark);
    font-size: 0.92rem;
}

.side-note,
.search-results {
    padding: 1.2rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.64);
    border: 1px solid var(--line);
}

.results-list {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
    display: grid;
    gap: 1rem;
}

.results-list li {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}

.results-list a {
    font-family: var(--display);
    font-size: 1.3rem;
    text-decoration: none;
}

.empty-state {
    padding: 1rem 0;
}

.site-footer {
    margin-top: 1.6rem;
    align-items: end;
}

.site-main {
    display: grid;
}

.setup-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-bottom: 1.4rem;
}

.summary-card,
.setup-section,
.palette-panel {
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.summary-card {
    padding: 1.4rem;
}

.setup-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.95fr);
    gap: 1.2rem;
}

.setup-checklist {
    display: grid;
    gap: 1rem;
}

.setup-section {
    padding: 1.3rem;
}

.setup-items {
    display: grid;
    gap: 0.9rem;
}

.setup-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid var(--line);
}

.setup-item h3 {
    margin: 0 0 0.3rem;
    font-family: var(--display);
}

.setup-question,
.setup-value,
.setup-env {
    margin: 0.2rem 0 0;
}

.setup-env code {
    font-size: 0.88rem;
}

.status-pill {
    align-self: start;
    display: inline-flex;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

.status-complete {
    background: color-mix(in srgb, var(--brand-secondary-light, #d9e6e0) 75%, white);
    color: var(--brand-secondary, var(--sage));
}

.status-pending {
    background: color-mix(in srgb, var(--brand-primary-light, #f4d5cb) 74%, white);
    color: var(--accent-dark);
}

.status-optional {
    background: rgba(31, 42, 37, 0.08);
    color: var(--muted);
}

.status-error {
    background: rgba(125, 28, 24, 0.12);
    color: #7d1c18;
}

.palette-panel {
    padding: 1.4rem;
}

.palette-role + .palette-role {
    margin-top: 1.2rem;
}

.swatch-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.swatch-card p {
    margin: 0.45rem 0 0;
    font-size: 0.9rem;
    color: var(--muted);
}

.swatch-chip {
    min-height: 70px;
    padding: 0.8rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: end;
    font-weight: 700;
    border: 1px solid rgba(17, 32, 24, 0.08);
}

.error-shell {
    text-align: center;
}

input:focus,
textarea:focus,
button:focus,
.button:focus,
a:focus {
    outline: 3px solid rgba(76, 99, 243, 0.28);
    outline-offset: 2px;
}

@media (max-width: 920px) {
    .hero-section,
    .form-shell,
    .search-shell {
        grid-template-columns: 1fr;
    }

    .site-header,
    .site-footer {
        flex-direction: column;
    }

    .site-header {
        border-radius: 28px;
        align-items: stretch;
    }

    .primary-nav {
        justify-content: flex-start;
    }

    .header-logo-slot {
        align-self: flex-start;
    }

    .hero-section {
        min-height: auto;
        gap: 1.25rem;
    }

    .hero-panel {
        justify-self: stretch;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .setup-grid,
    .swatch-grid {
        grid-template-columns: 1fr;
    }
}

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

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hero-bubble {
        transform: none !important;
    }
}
