:root {
    --ink: #1d2934;
    --muted: #5f6f7e;
    --line: #d9e2e8;
    --field: #f7fafb;
    --paper: rgba(255, 255, 255, 0.94);
    --brand: #255c4c;
    --brand-dark: #143c33;
    --accent: #c28a35;
    --error: #a73535;
    --success: #1e7454;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    background:
        linear-gradient(90deg, rgba(18, 38, 34, 0.82), rgba(18, 38, 34, 0.38) 42%, rgba(244, 248, 246, 0.84)),
        url("landlogic-background.png") center / cover fixed;
}

body.de-theme {
    background:
        linear-gradient(90deg, rgba(43, 45, 48, 0.84), rgba(43, 45, 48, 0.42) 42%, rgba(247, 249, 250, 0.88)),
        url("landlogic-background.png") center / cover fixed;
}

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

.page-shell {
    display: grid;
    grid-template-columns: minmax(280px, 0.82fr) minmax(320px, 1.18fr);
    gap: clamp(24px, 4vw, 52px);
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 40px 0;
}

.landing-shell {
    display: grid;
    grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
    gap: clamp(24px, 4vw, 52px);
    width: min(1120px, calc(100% - 32px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 40px 0;
    align-items: center;
}

.landing-intro {
    color: #fff;
}

.choice-panel {
    display: grid;
    gap: 18px;
}

.company-choice {
    display: grid;
    grid-template-columns: 64px 1fr 24px;
    gap: 18px;
    align-items: center;
    min-height: 120px;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 8px;
    background: var(--paper);
    color: var(--ink);
    text-decoration: none;
    box-shadow: 0 24px 70px rgba(26, 39, 36, 0.18);
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.company-choice:hover {
    border-color: var(--brand);
    transform: translateY(-2px);
    box-shadow: 0 28px 76px rgba(26, 39, 36, 0.24);
}

.choice-mark {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    background: var(--brand);
    color: #fff;
    font-weight: 800;
}

.de-choice .choice-mark {
    background: #3d4852;
}

.choice-copy {
    display: grid;
    gap: 6px;
}

.choice-copy strong {
    color: var(--brand-dark);
    font-size: 1.22rem;
}

.choice-copy span {
    color: var(--muted);
}

.choice-arrow {
    color: var(--accent);
    font-size: 1.5rem;
    font-weight: 800;
}

.intro-panel {
    min-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #fff;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: fit-content;
    color: #fff;
    text-decoration: none;
    font-size: 1.18rem;
    font-weight: 700;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: var(--accent);
    color: #172d28;
}

.intro-copy {
    max-width: 520px;
    padding: 72px 0;
}

.eyebrow {
    margin: 0 0 12px;
    color: #d4e5df;
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 18px;
    font-size: clamp(2.4rem, 5vw, 5rem);
    line-height: 0.98;
    letter-spacing: 0;
}

.intro-copy p:last-child {
    margin-bottom: 0;
    color: #edf5f1;
    font-size: 1.12rem;
    line-height: 1.65;
}

.support-box {
    display: grid;
    gap: 6px;
    max-width: 420px;
    padding: 18px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.35);
    color: #edf5f1;
    line-height: 1.45;
}

.form-panel {
    align-self: start;
    padding: clamp(20px, 3vw, 34px);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: 0 24px 70px rgba(26, 39, 36, 0.2);
    backdrop-filter: blur(12px);
}

.notice {
    margin-bottom: 20px;
    padding: 14px 16px;
    border-radius: 8px;
    font-weight: 700;
}

.notice.success {
    background: #e6f4ee;
    color: var(--success);
}

.notice.error {
    background: #f8e9e9;
    color: var(--error);
}

.application-form {
    display: grid;
    gap: 26px;
}

.form-section {
    display: grid;
    gap: 16px;
}

.form-section h2 {
    margin: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
    color: var(--brand-dark);
    font-size: 1.05rem;
}

.field-grid {
    display: grid;
    gap: 16px;
}

.field-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

label {
    display: grid;
    gap: 7px;
    color: #304251;
    font-size: 0.9rem;
    font-weight: 700;
}

.span-two {
    grid-column: 1 / -1;
}

input,
select,
textarea {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--field);
    color: var(--ink);
    padding: 11px 12px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

textarea {
    min-height: 112px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--brand);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37, 92, 76, 0.14);
}

.consent {
    grid-template-columns: 20px 1fr;
    align-items: start;
    color: var(--muted);
    font-weight: 600;
    line-height: 1.45;
}

.consent input {
    min-height: auto;
    margin-top: 2px;
}

.inline-options {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(247, 250, 251, 0.8);
}

.inline-options legend {
    padding: 0 6px;
    color: var(--brand-dark);
    font-size: 0.9rem;
    font-weight: 800;
}

.inline-options label {
    grid-template-columns: 20px 1fr;
    align-items: start;
    color: var(--muted);
    font-weight: 600;
}

.inline-options input {
    min-height: auto;
    margin-top: 2px;
}

.submit-button {
    min-height: 52px;
    border: 0;
    border-radius: 8px;
    background: var(--brand);
    color: #fff;
    cursor: pointer;
    font-weight: 800;
    transition: background 0.2s, transform 0.2s;
}

.submit-button:hover {
    background: var(--brand-dark);
    transform: translateY(-1px);
}

.submit-button:active {
    transform: translateY(0);
}

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

.settings-shell {
    display: grid;
    width: min(760px, calc(100% - 32px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 40px 0;
    align-items: center;
}

.settings-panel h1 {
    margin-bottom: 24px;
    color: var(--brand-dark);
    font-size: 2rem;
}

.settings-back {
    color: var(--brand);
    font-weight: 800;
    text-decoration: none;
}

.settings-note {
    margin-bottom: 0;
    color: var(--muted);
    line-height: 1.5;
}

.settings-link {
    width: fit-content;
    color: #edf5f1;
    font-weight: 800;
    text-decoration: none;
}

.settings-link:hover {
    text-decoration: underline;
}

@media (max-width: 880px) {
    body {
        background-attachment: scroll;
    }

    .page-shell {
        grid-template-columns: 1fr;
        width: min(720px, calc(100% - 28px));
        padding: 22px 0;
    }

    .landing-shell {
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 22px 0;
    }

    .intro-panel {
        min-height: auto;
        gap: 28px;
    }

    .intro-copy {
        padding: 36px 0 4px;
    }

    .support-box {
        max-width: none;
        padding-bottom: 4px;
    }

    h1 {
        font-size: clamp(2.35rem, 11vw, 4.2rem);
    }

    .form-panel {
        backdrop-filter: none;
    }
}

@media (max-width: 620px) {
    body {
        background:
            linear-gradient(180deg, rgba(18, 38, 34, 0.86), rgba(245, 248, 247, 0.92) 42%),
            url("landlogic-background.png") center top / cover scroll;
    }

    body.de-theme {
        background:
            linear-gradient(180deg, rgba(43, 45, 48, 0.86), rgba(247, 249, 250, 0.92) 42%),
            url("landlogic-background.png") center top / cover scroll;
    }

    .field-grid.two {
        grid-template-columns: 1fr;
    }

    .span-two {
        grid-column: auto;
    }

    .form-panel {
        padding: 18px;
    }

    .intro-copy {
        padding: 28px 0 0;
    }

    .intro-copy p:last-child {
        font-size: 1rem;
    }

    .support-box {
        font-size: 0.92rem;
    }

    .brand {
        font-size: 1rem;
    }

    .company-choice {
        grid-template-columns: 52px 1fr 18px;
        gap: 14px;
        min-height: 104px;
        padding: 18px;
    }

    .choice-mark {
        width: 52px;
        height: 52px;
    }

    input,
    select,
    textarea {
        font-size: 16px;
    }
}

@media (max-width: 420px) {
    .page-shell,
    .landing-shell,
    .settings-shell {
        width: min(100% - 20px, 720px);
        padding: 14px 0;
    }

    .form-panel {
        padding: 14px;
    }

    .company-choice {
        grid-template-columns: 46px 1fr 16px;
        padding: 14px;
    }

    .choice-mark,
    .brand-mark {
        width: 42px;
        height: 42px;
    }

    .choice-copy strong {
        font-size: 1rem;
    }
}
