:root {
    --ink: #252935;
    --muted: #667085;
    --panel: #ffffff;
    --soft: #eef3f8;
    --brand: #393b48;
    --accent: #9aacc2;
    --accent-dark: #7188a3;
    --danger: #a33d3d;
    --success: #2f7658;
    --line: #d8e0ea;
    --shadow: 0 24px 60px rgba(37, 41, 53, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background:
        linear-gradient(135deg, rgba(154, 172, 194, 0.22), rgba(255, 255, 255, 0.72)),
        #f6f8fb;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

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

.intro {
    max-width: 780px;
    margin-bottom: 28px;
}

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

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

h1 {
    margin-bottom: 10px;
    color: var(--brand);
    font-size: clamp(2.2rem, 6vw, 4.8rem);
    line-height: 0.95;
    letter-spacing: 0;
}

h2 {
    margin-bottom: 6px;
    color: var(--brand);
    font-size: 1.05rem;
    letter-spacing: 0;
}

.intro p:last-child,
.section-heading p {
    color: var(--muted);
}

.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 22px;
    align-items: start;
}

.panel,
.result-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
}

.stack {
    display: grid;
}

.section {
    padding: 24px;
    border-bottom: 1px solid var(--line);
}

.section:last-child {
    border-bottom: 0;
}

.section-heading {
    margin-bottom: 18px;
}

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

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

label {
    display: grid;
    gap: 7px;
    color: var(--brand);
    font-size: 0.92rem;
    font-weight: 700;
}

input,
select {
    width: 100%;
    min-height: 46px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--ink);
    background: #fff;
    font: inherit;
}

input:focus,
select:focus {
    border-color: var(--accent-dark);
    box-shadow: 0 0 0 3px rgba(154, 172, 194, 0.32);
    outline: 0;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
}

button {
    min-height: 44px;
    border: 0;
    border-radius: 8px;
    padding: 10px 16px;
    color: #fff;
    background: var(--brand);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

button:hover {
    background: #2e303c;
}

button:disabled {
    cursor: wait;
    opacity: 0.65;
}

button.secondary {
    color: var(--brand);
    background: var(--soft);
}

button.secondary:hover {
    background: #e2e9f1;
}

.check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
}

.check input {
    width: 18px;
    min-height: 18px;
    accent-color: var(--brand);
}

.message {
    min-height: 1.5em;
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.message.error {
    color: var(--danger);
}

.message.success {
    color: var(--success);
}

.result-card {
    position: sticky;
    top: 18px;
    padding: 24px;
}

.result-card dl {
    display: grid;
    gap: 14px;
    margin: 20px 0 0;
}

.result-card dl > div {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f9fbfd;
}

dt {
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 800;
}

dd {
    margin: 5px 0 0;
    color: var(--brand);
    font-size: 1.5rem;
    font-weight: 900;
}

footer {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 34px;
    color: var(--muted);
    font-size: 0.86rem;
}

footer p {
    margin-bottom: 6px;
}

@media (max-width: 860px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .result-card {
        position: static;
    }
}

@media (max-width: 620px) {
    .shell {
        width: min(100% - 22px, 1120px);
        padding-top: 28px;
    }

    h1 {
        font-size: 2.55rem;
    }

    .section,
    .result-card {
        padding: 18px;
    }

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

    .actions {
        display: grid;
    }

    button {
        width: 100%;
    }
}
