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

:root {
    --bg: #f7fbff;
    --surface: #ffffff;
    --text: #10263a;
    --muted: #60748a;
    --line: #d7e2ee;
    --blue: #1475ff;
    --blue-dark: #075dd4;
    --green: #5fd61c;
    --shadow: 0 18px 50px rgba(25, 65, 110, .12);
    --radius: 26px;
}

html {
    color-scheme: light;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 7%, rgba(20, 117, 255, .08), transparent 30rem),
        var(--bg);
}

button,
input {
    font: inherit;
}

button {
    -webkit-tap-highlight-color: transparent;
}

.page-shell {
    width: min(1220px, calc(100% - 32px));
    margin-inline: auto;
    padding: 44px 0 28px;
}

.hero-copy {
    text-align: center;
    max-width: 1060px;
    margin: 0 auto 34px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--blue-dark);
    font-size: .85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .13em;
}

h1 {
    margin: 0;
    font-size: clamp(2.3rem, 5vw, 4.1rem);
    line-height: 1.02;
    letter-spacing: -.045em;
}

.intro {
    margin: 18px auto 0;
    max-width: 900px;
    color: var(--muted);
    font-size: clamp(1rem, 1.5vw, 1.12rem);
    line-height: 1.7;
}

.generator-layout {
    display: grid;
    grid-template-columns: minmax(320px, .8fr) minmax(520px, 1.2fr);
    gap: 32px;
    align-items: center;
}

.illustration-panel {
    min-width: 0;
}

.art-bubble {
    max-width: 490px;
    margin-inline: auto;
}

.art-bubble svg {
    display: block;
    width: 100%;
    height: auto;
}

.privacy-note {
    width: fit-content;
    margin: -12px auto 0;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 11px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255,255,255,.86);
    box-shadow: 0 10px 28px rgba(22, 50, 79, .08);
}

.privacy-icon {
    display: grid;
    place-items: center;
    flex: 0 0 30px;
    height: 30px;
    border-radius: 50%;
    color: #0f6d14;
    background: #dff8d8;
    font-weight: 900;
}

.privacy-note strong,
.privacy-note span {
    display: block;
}

.privacy-note strong {
    font-size: .92rem;
}

.privacy-note div span {
    margin-top: 2px;
    color: var(--muted);
    font-size: .8rem;
}

.generator-card {
    min-width: 0;
    padding: 28px;
    border: 1px solid rgba(168, 190, 211, .55);
    border-radius: var(--radius);
    background: rgba(255,255,255,.94);
    box-shadow: var(--shadow);
}

.password-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 48px auto;
    gap: 10px;
}

.password-output {
    width: 100%;
    min-width: 0;
    height: 58px;
    padding: 0 18px;
    border: 1px solid #bfcddd;
    border-radius: 16px;
    outline: none;
    background: #fbfdff;
    color: #071827;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 1.05rem;
}

.password-output:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(20, 117, 255, .12);
}

.primary-btn,
.icon-btn,
.round-btn {
    border: 0;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.primary-btn:active,
.icon-btn:active,
.round-btn:active {
    transform: translateY(1px);
}

.primary-btn {
    min-width: 96px;
    padding: 0 22px;
    border-radius: 16px;
    color: #fff;
    background: var(--blue);
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(20, 117, 255, .22);
}

.primary-btn:hover {
    background: var(--blue-dark);
}

.icon-btn {
    display: grid;
    place-items: center;
    width: 48px;
    height: 58px;
    border: 1px solid #c7d5e3;
    border-radius: 16px;
    color: var(--text);
    background: #f5f9fc;
    font-size: 1.35rem;
}

.icon-btn:hover,
.round-btn:hover {
    background: #eaf3fb;
}

.strength-line {
    margin: 14px 0 26px;
}

.strength-track {
    overflow: hidden;
    height: 8px;
    border-radius: 999px;
    background: #e8eef5;
}

.strength-track span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: #ef4444;
    transition: width .2s ease, background-color .2s ease;
}

.strength-meta {
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: var(--muted);
    font-size: .84rem;
}

#strengthText {
    font-weight: 800;
}

.control-block {
    padding: 20px 0 24px;
    border-top: 1px solid #e7edf3;
}

.control-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.control-heading label {
    font-weight: 800;
}

#lengthValue {
    min-width: 46px;
    padding: 4px 10px;
    border-radius: 999px;
    color: #075dd4;
    background: #e9f3ff;
    text-align: center;
    font-weight: 900;
}

.length-controls {
    display: grid;
    grid-template-columns: 46px 1fr 46px;
    gap: 12px;
    align-items: center;
}

.round-btn {
    width: 46px;
    height: 46px;
    border: 1px solid #aebfd0;
    border-radius: 50%;
    color: var(--text);
    background: #fff;
    font-size: 1.45rem;
}

input[type="range"] {
    width: 100%;
    accent-color: var(--blue);
    cursor: pointer;
}

.character-options {
    margin: 0;
    padding: 22px 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    border: 0;
    border-top: 1px solid #e7edf3;
}

.character-options legend {
    padding: 20px 0 0;
    margin-bottom: 10px;
    font-weight: 800;
}

.check-option {
    min-height: 52px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid #d6e0ea;
    border-radius: 14px;
    cursor: pointer;
    user-select: none;
    background: #fbfdff;
    font-weight: 800;
}

.check-option:has(input:checked) {
    border-color: #93c3ff;
    background: #edf6ff;
}

.check-option input {
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: var(--blue);
}

.secondary-options {
    border-top: 1px solid #e7edf3;
    padding-top: 20px;
}

.switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    cursor: pointer;
}

.switch-row span {
    display: grid;
    gap: 4px;
}

.switch-row small {
    color: var(--muted);
    line-height: 1.4;
}

.switch-row input {
    width: 46px;
    height: 25px;
    accent-color: var(--blue);
}

.status-message {
    min-height: 20px;
    margin: 14px 0 0;
    color: #087211;
    font-size: .86rem;
    font-weight: 700;
}

.site-footer {
    margin-top: 30px;
    text-align: center;
    color: var(--muted);
    font-size: .9rem;
}

.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;
    border: 0 !important;
}

@media (max-width: 900px) {
    .page-shell {
        padding-top: 28px;
    }

    .generator-layout {
        grid-template-columns: 1fr;
    }

    .illustration-panel {
        order: 2;
    }

    .generator-card {
        order: 1;
    }

    .art-bubble {
        max-width: 360px;
    }
}

@media (max-width: 620px) {
    .page-shell {
        width: min(100% - 20px, 1220px);
    }

    .hero-copy {
        margin-bottom: 22px;
    }

    .generator-card {
        padding: 18px;
        border-radius: 20px;
    }

    .password-row {
        grid-template-columns: minmax(0, 1fr) 48px;
    }

    .primary-btn {
        grid-column: 1 / -1;
        height: 50px;
    }

    .character-options {
        grid-template-columns: repeat(2, 1fr);
    }

    .privacy-note {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
