* {
    box-sizing: border-box;
}

[hidden] { display: none !important; }
.settings-panel, .admin-tabs { grid-column: 1 / -1; }
.admin-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-tabs button { padding: 14px 20px; border: 1px solid #c5cfdb; border-radius: 6px; background: #fff; color: #172033; cursor: pointer; font-weight: 700; }
.admin-tabs button[aria-selected="true"] { color: #fff; background: #172033; border-color: #172033; }
.admin-tabs button:focus-visible { outline: 3px solid #2563eb; outline-offset: 3px; }
.seo-preview { max-width: 680px; border: 1px solid #d7dee8; padding: 20px; border-radius: 8px; overflow-wrap: anywhere; }
.seo-preview p { margin: 0; line-height: 1.5; color: #475569; }
.seo-preview h3 { margin: 6px 0; font-size: 1.3rem; color: #1a0dab; font-weight: 500; }

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: var(--page-bg, #111827);
}

.hero-slide {
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}

.hero-slide.is-active {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .hero-slide {
        transition: none;
    }
}

.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;
}

/* Fill the page proportionally with portrait photos, anchored at the top. */
.hero-media img {
    object-fit: cover;
    object-position: center top;
}

.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;
    }
}

/* Compact CHOK3 launch layout. */
.hero-shade {
    opacity: 1;
    background: linear-gradient(90deg,
        rgba(var(--shade-rgb, 0, 0, 0), calc(var(--shade-strength, .55) * 1.5)) 0%,
        rgba(var(--shade-rgb, 0, 0, 0), var(--shade-strength, .55)) 44%,
        rgba(var(--shade-rgb, 0, 0, 0), calc(var(--shade-strength, .55) * .25)) 100%);
}
.landing-content { padding: 28px 0 22px; }
.brand { min-height: 48px; }
.copy { max-width: 630px; padding-top: clamp(28px, 5vh, 54px); }
.eyebrow { margin-bottom: 18px; font-size: .72rem; letter-spacing: .12em; }
.headline-kicker { margin: 0 0 10px; font-size: .9rem; font-weight: 700; letter-spacing: .08em; color: rgba(255,255,255,.82); }
.copy h1 { font-size: clamp(2.65rem, 4.5vw, 4.35rem); line-height: 1.02; font-weight: 850; letter-spacing: -.035em; overflow-wrap: anywhere; }
.intro { margin-top: 18px; max-width: 460px; font-size: 1.05rem; line-height: 1.5; }
.signup-panel { width: min(550px,100%); margin-top: 28px; }
.form-heading { font-size: 1.15rem; margin-bottom: 8px; letter-spacing: .02em; }
.form-intro { font-size: .95rem; margin-bottom: 16px; }
.signup-form label { font-size: .8rem; margin-bottom: 8px; }
.form-row { padding: 0; background: none; backdrop-filter: none; border: 0; border-radius: 0; gap: 10px; }
.form-row input { color: #fff; background: rgba(5,5,5,.65); border: 1px solid rgba(255,255,255,.5); border-radius: 3px; }
.form-row input::placeholder { color: rgba(255,255,255,.65); }
.form-row input:focus-visible { outline: 2px solid #fff; outline-offset: 3px; box-shadow: none; }
.form-row button { border-radius: 3px; transition: filter .15s ease; }
.form-row button:hover { filter: brightness(.86); }
.form-row button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.privacy { margin: 12px 0 0; font-size: .75rem; color: rgba(255,255,255,.8); }
.privacy a { color: inherit; text-underline-offset: 3px; }
.landing-content footer { font-size: .7rem; letter-spacing: .08em; padding-top: 24px; }
@media (max-width: 780px) {
    .landing-content { width: calc(100% - 40px); padding: 22px 0 18px; }
    .copy { padding-top: 32px; }
    .eyebrow { margin-bottom: 14px; font-size: .65rem; }
    .headline-kicker { font-size: .73rem; margin-bottom: 10px; }
    .copy h1 { font-size: clamp(2rem, 8.5vw, 3.2rem); line-height: 1.04; }
    .intro { margin-top: 14px; font-size: .95rem; max-width: 290px; }
    .signup-panel { margin-top: 24px; }
    .form-heading { font-size: 1rem; }
    .form-intro { font-size: .875rem; margin-bottom: 12px; }
    .form-row { grid-template-columns: 1fr; gap: 8px; }
    .form-row input, .form-row button { min-height: 50px; }
    .hero-shade { background: linear-gradient(180deg,
        rgba(var(--shade-rgb,0,0,0),calc(var(--shade-strength,.55) * .7)) 0%,
        rgba(var(--shade-rgb,0,0,0),calc(var(--shade-strength,.55) * 1.2)) 28%,
        rgba(var(--shade-rgb,0,0,0),calc(var(--shade-strength,.55) * 1.3)) 62%,
        rgba(var(--shade-rgb,0,0,0),calc(var(--shade-strength,.55) * .4)) 100%); }
}

/* One launch block: center-left on desktop, lower-center on mobile. */
.landing-content { display: grid; grid-template-rows: 1fr auto; padding: 30px 0 20px; }
.launch-block { width: min(560px, 100%); align-self: center; padding: 24px 0; }
.launch-block .brand { justify-content: flex-start; min-height: 0; margin-bottom: 32px; }
.launch-block .brand-logo { max-width: min(var(--logo-max-width,240px), 210px) !important; }
.launch-block .copy { padding-top: 0; }
.launch-block .headline-kicker { color: rgba(255,255,255,.7); font-size: .75rem; letter-spacing: .14em; margin-bottom: 12px; }
.launch-block h1 { font-size: clamp(2.75rem,4.5vw,4rem); line-height: .98; letter-spacing: -.045em; }
.launch-block .intro { margin-top: 18px; color: rgba(255,255,255,.82); font-size: 1rem; }
.launch-block .signup-panel { margin-top: 30px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.28); }
.launch-block .form-heading { font-size: .95rem; letter-spacing: .06em; font-weight: 800; }
.launch-block .form-intro { font-size: .85rem; color: rgba(255,255,255,.7); }
.launch-block .form-row { grid-template-columns: minmax(0,1fr) minmax(166px,auto); }
.launch-block .form-row button { background: var(--cta-color,#d7ff3f); color: var(--cta-text-color,#10120a); min-height: 58px; font-size: .92rem; letter-spacing: .035em; border: 1px solid transparent; box-shadow: 0 5px 24px rgba(0,0,0,.24); }
.launch-block .form-row input { min-height: 58px; background: rgba(0,0,0,.72); border-color: rgba(255,255,255,.32); }
.launch-block .privacy { color: rgba(255,255,255,.62); font-size: .7rem; }
.landing-content footer { margin: 0; padding-top: 12px; }
@media (max-width:780px) {
    .landing-content { padding: 20px 0 16px; }
    .launch-block { justify-self: center; align-self: end; width: min(440px,100%); text-align: center; padding: clamp(60px,16svh,150px) 0 20px; }
    .launch-block .brand { justify-content: center; margin-bottom: 24px; }
    .launch-block .brand-logo { max-width: min(var(--logo-mobile-max-width,140px),160px) !important; }
    .launch-block h1 { font-size: clamp(2rem,9.4vw,3.2rem); }
    .launch-block .headline-kicker { font-size: .65rem; }
    .launch-block .intro { max-width: 320px; margin: 14px auto 0; font-size: .9rem; }
    .launch-block .signup-panel { margin-top: 22px; padding-top: 20px; }
    .launch-block .form-intro { margin-bottom: 14px; }
    .launch-block .signup-form label { text-align: left; font-size: .75rem; }
    .launch-block .form-row { grid-template-columns: 1fr; }
    .launch-block .form-row input { min-height: 50px; }
    .launch-block .form-row button { min-height: 56px; }
    .landing-content footer { text-align: center; font-size: .6rem; }
    .hero-shade { background: linear-gradient(180deg,
        rgba(var(--shade-rgb,0,0,0),calc(var(--shade-strength,.55) * .15)) 0%,
        rgba(var(--shade-rgb,0,0,0),calc(var(--shade-strength,.55) * .65)) 25%,
        rgba(var(--shade-rgb,0,0,0),calc(var(--shade-strength,.55) * 1.5)) 60%,
        rgba(var(--shade-rgb,0,0,0),calc(var(--shade-strength,.55) * 1.65)) 100%); }
}

/* Small, top-anchored breathing motion; no panning or empty edges. */
.hero-media { transform-origin: center top; animation: ambient-zoom 20s ease-in-out infinite alternate; }
@keyframes ambient-zoom { from { transform: scale(1); } to { transform: scale(1.035); } }
.hero-media[data-motion-paused="true"] { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
    .hero-media { animation: none; transform: none; }
    .hero-slide, .form-row button { transition: none; }
}
@media (max-width:780px) and (max-height:700px) {
    .launch-block { padding-top: 45px; padding-bottom: 8px; }
    .launch-block .brand { margin-bottom: 18px; }
    .launch-block .signup-panel { margin-top: 16px; padding-top: 16px; }
}

.slide-manager-list { display: grid; gap: 14px; }
.slide-manager-card { display: grid; grid-template-columns: 100px minmax(0,1fr); gap: 14px; border: 1px solid #cbd5e1; border-radius: 8px; padding: 14px; background: #f8fafc; }
.slide-manager-card img { width: 100%; height: 160px; object-fit: contain; background: #172033; border-radius: 4px; }
.slide-manager-fields { display: grid; gap: 10px; min-width: 0; }
.slide-manager-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.slide-manager-actions button { padding: 10px 12px; border: 1px solid #94a3b8; background: #fff; color: #172033; border-radius: 4px; cursor: pointer; }
.slide-manager-actions button:disabled { opacity: .4; cursor: default; }
.slide-removed { opacity: .6; border-style: dashed; }
.slide-removed label { display: none; }
.slide-manager-actions button:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
@media(max-width:480px) { .slide-manager-card { grid-template-columns: 1fr; } .slide-manager-card img { height: 160px; } }

.analytics-consent { position: fixed; z-index: 20; bottom: 54px; right: 18px; width: min(420px,calc(100% - 36px)); padding: 20px; border: 1px solid #64748b; border-radius: 8px; background: #111827; color: #fff; box-shadow: 0 8px 32px #0008; font-size: .9rem; }
.analytics-consent p { margin: 0 0 12px; line-height: 1.5; }
.analytics-consent a { color: #fff; }
.analytics-consent div { display:flex; gap:10px; margin-top:14px; }
.analytics-consent button { flex:1; min-height:44px; border:1px solid #94a3b8; border-radius:4px; background:#fff; color:#111827; cursor:pointer; }
.analytics-settings { position:fixed; right:18px; bottom:12px; z-index:19; padding:10px; color:#fff; background:#111827; border:1px solid #64748b; border-radius:4px; cursor:pointer; font-size:.75rem; }
