* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--page-text, #ffffff);
    background: var(--page-bg, #111827);
}

button,
input,
textarea,
select {
    font: inherit;
}

.landing {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background: #111827;
}

.hero-media,
.hero-media img,
.hero-media video,
.hero-shade {
    position: absolute;
    inset: 0;
}

.hero-media img,
.hero-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-shade {
    pointer-events: none;
    background: #08131f;
    opacity: .55;
}

.landing-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(1120px, calc(100% - 40px));
    min-height: 100vh;
    min-height: 100svh;
    margin: 0 auto;
    padding: clamp(26px, 4.5vh, 54px) 0 clamp(28px, 4vh, 48px);
}

.brand {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 64px;
}

.brand--left {
    justify-content: flex-start;
}

.brand--center {
    justify-content: center;
}

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

.brand--center-screen {
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo,
.brand img {
    display: block;
    width: auto;
    height: auto;
    max-width: min(var(--logo-desktop-max-width, var(--logo-max-width, 240px)), 58vw);
    max-height: var(--logo-desktop-max-height, var(--logo-max-height, 76px));
}

.brand--center-screen img {
    max-width: min(var(--logo-desktop-max-width, var(--logo-max-width, 240px)), 80vw);
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border: 1px solid rgba(255, 255, 255, .32);
    border-radius: 8px;
    color: #ffffff;
    background: rgba(255, 255, 255, .08);
    font-size: 1.55rem;
    font-weight: 800;
    text-transform: uppercase;
}

.copy {
    max-width: 760px;
    padding: clamp(68px, 14vh, 150px) 0 0;
}

.eyebrow {
    margin: 0 0 18px;
    color: var(--accent, #ff6b4a);
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1 {
    max-width: 920px;
    margin: 0;
    font-size: clamp(2.65rem, 7vw, 6.1rem);
    line-height: .96;
    letter-spacing: 0;
}

.intro {
    max-width: 700px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, .86);
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    line-height: 1.55;
}

.signup-panel {
    width: min(760px, 100%);
    margin-top: clamp(30px, 5vh, 60px);
    margin-bottom: 0;
}

.hidden-field {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.signup-form label {
    display: block;
    margin: 0 0 10px;
    color: rgba(255, 255, 255, .74);
    font-size: .92rem;
    font-weight: 700;
}

.form-heading {
    max-width: 680px;
    margin: 0 0 10px;
    color: #ffffff;
    font-size: clamp(1.35rem, 2.4vw, 2rem);
    line-height: 1.08;
    letter-spacing: 0;
}

.form-intro {
    max-width: 680px;
    margin: 0 0 14px;
    color: rgba(255, 255, 255, .78);
    font-size: 1rem;
    line-height: 1.5;
}

.form-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 8px;
    background: rgba(255, 255, 255, .12);
    backdrop-filter: blur(16px);
}

.form-row input {
    width: 100%;
    min-height: 54px;
    border: 0;
    border-radius: 6px;
    padding: 0 18px;
    color: #111827;
    background: #ffffff;
    outline: none;
}

.form-row input:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .38);
}

.form-row button,
.admin-form button,
.admin-actions button,
.secondary-button {
    min-height: 54px;
    border: 0;
    border-radius: 6px;
    padding: 0 22px;
    color: #111827;
    background: var(--accent, #ff6b4a);
    font-weight: 800;
    cursor: pointer;
}

.form-row button {
    color: var(--button-text-color, #111827);
}

.form-row button {
    white-space: nowrap;
}

.privacy,
footer {
    color: rgba(255, 255, 255, .66);
    font-size: .92rem;
    line-height: 1.5;
}

.public-notice {
    margin: 0 0 14px;
    border-radius: 6px;
    padding: 12px 14px;
    color: #ffffff;
    font-weight: 800;
    line-height: 1.4;
}

.public-notice.success {
    background: rgba(13, 148, 136, .92);
}

.public-notice.error {
    background: rgba(190, 18, 60, .92);
}

footer {
    margin-top: auto;
    padding-top: 28px;
}

.admin-body {
    color: #172033;
    background: #eef2f6;
}

.admin-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 48px;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.admin-header h1,
.admin-card h2 {
    margin: 0;
    color: #172033;
    line-height: 1.1;
}

.admin-header h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
}

.admin-kicker {
    margin: 0 0 6px;
    color: #607089;
    font-size: .82rem;
    font-weight: 800;
    text-transform: uppercase;
}

.admin-link,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #172033;
    text-decoration: none;
}

.admin-link {
    min-height: 44px;
    border: 1px solid #c5cfdb;
    border-radius: 6px;
    padding: 0 16px;
    background: #ffffff;
    font-weight: 700;
}

.notice {
    margin: 0 0 14px;
    border-radius: 6px;
    padding: 13px 15px;
    font-weight: 700;
}

.notice.success {
    color: #0b5138;
    background: #d9f6e8;
}

.notice.error {
    color: #7a1d1d;
    background: #ffe0e0;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.admin-card {
    border: 1px solid #d7dee8;
    border-radius: 8px;
    padding: 22px;
    background: #ffffff;
    box-shadow: 0 18px 45px rgba(22, 32, 51, .08);
}

.admin-card.compact {
    max-width: 520px;
}

.admin-card.wide,
.admin-actions,
.password-card {
    grid-column: 1 / -1;
}

.admin-card h2 {
    margin-bottom: 18px;
    font-size: 1.2rem;
}

.admin-form,
.admin-card {
    display: grid;
    gap: 15px;
}

.admin-card label {
    display: grid;
    gap: 7px;
    color: #334155;
    font-size: .93rem;
    font-weight: 700;
}

.field-hint {
    color: #64748b;
    font-size: .82rem;
    font-weight: 600;
    line-height: 1.35;
}

.field-status {
    margin: -4px 0 2px;
    border-radius: 6px;
    padding: 9px 11px;
    color: #475569;
    background: #f1f5f9;
    font-size: .82rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.admin-card input,
.admin-card textarea,
.admin-card select {
    width: 100%;
    min-height: 44px;
    border: 1px solid #c7d0dc;
    border-radius: 6px;
    padding: 10px 12px;
    color: #172033;
    background: #fbfcfe;
}

.admin-card input[type="file"] {
    padding: 8px;
}

.admin-card input[type="color"] {
    height: 48px;
    padding: 4px;
}

.admin-card input[type="range"] {
    padding: 0;
}

.admin-card textarea {
    resize: vertical;
}

.color-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.size-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.toggle-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.admin-card .toggle-line {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    border: 1px solid #d7dee8;
    border-radius: 6px;
    padding: 10px 12px;
    background: #f8fafc;
}

.admin-card .toggle-line input {
    width: 18px;
    min-height: 18px;
    accent-color: #ff6b4a;
}

.admin-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin: 8px 0 18px;
}

.secondary-button {
    border: 1px solid #c5cfdb;
    background: #ffffff;
}

@media (max-width: 780px) {
    .landing-content {
        width: min(100% - 28px, 1120px);
        padding: 24px 0;
    }

    .copy {
        padding: clamp(44px, 9vh, 72px) 0 0;
    }

    h1 {
        font-size: clamp(2.25rem, 12vw, 3.8rem);
        line-height: 1;
    }

    .intro {
        margin-top: 18px;
        font-size: 1rem;
    }

    .signup-panel {
        margin-top: 26px;
    }

    .brand-logo,
    .brand img {
        max-width: min(var(--logo-mobile-max-width, 140px), 180px, 52vw) !important;
        max-height: min(var(--logo-mobile-max-height, 64px), 80px, 12vh) !important;
    }

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

    .form-row button {
        width: 100%;
        white-space: normal;
    }

    .admin-grid,
    .color-row,
    .size-row,
    .toggle-grid {
        grid-template-columns: 1fr;
    }

    .admin-header,
    .admin-actions {
        align-items: stretch;
        flex-direction: column;
    }
}
