* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Aptos", "Trebuchet MS", "Segoe UI", sans-serif;
    color: #13263d;
    background:
        radial-gradient(circle at 5% 8%, rgba(22, 143, 204, 0.18), transparent 35%),
        radial-gradient(circle at 95% 12%, rgba(16, 114, 94, 0.16), transparent 30%),
        linear-gradient(145deg, #eef6fb, #f8fbf6 45%, #edf3fa);
    min-height: 100vh;
}

.page {
    max-width: 1040px;
    margin: 0 auto;
    padding: 1.5rem 1.2rem 2.2rem;
}

.page-header {
    margin-top: 0.5rem;
}

.header-card.card {
    position: relative;
    padding: 1.4rem 1.6rem;
    background: linear-gradient(130deg, #083c66, #0f6d73 70%, #1f8f7a);
    color: #f8fcff;
    border: 0;
    box-shadow: 0 16px 30px rgba(7, 44, 72, 0.22);
}

.chu-logo {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 210px;
    max-width: 38%;
    height: auto;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.18));
}

.kicker {
    margin: 0;
    font-size: 0.82rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    opacity: 0.88;
}

.page-header h1 {
    margin: 0.35rem 0 0;
    font-size: clamp(1.5rem, 2.2vw, 2.1rem);
    font-family: "Cambria", "Georgia", serif;
}

.subtitle {
    margin: 0.55rem 0 0;
    max-width: 60ch;
    opacity: 0.92;
}

.bg-shape {
    position: fixed;
    z-index: -1;
    border-radius: 50%;
    filter: blur(2px);
}

.bg-shape-1 {
    width: 300px;
    height: 300px;
    top: -110px;
    right: -80px;
    background: rgba(25, 109, 169, 0.15);
}

.bg-shape-2 {
    width: 260px;
    height: 260px;
    bottom: -120px;
    left: -90px;
    background: rgba(30, 133, 109, 0.14);
}

.card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(17, 85, 131, 0.12);
    border-radius: 16px;
    padding: 1.2rem 1.2rem 1.1rem;
    margin-top: 1rem;
    box-shadow: 0 14px 30px rgba(8, 41, 69, 0.08);
    backdrop-filter: blur(2px);
}

.panel h2 {
    margin-top: 0.1rem;
    margin-bottom: 0.9rem;
    font-family: "Cambria", "Georgia", serif;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 0.7rem 1rem;
}

.form-grid label {
    font-weight: 600;
    font-size: 0.95rem;
    color: #204363;
}

.form-grid button {
    grid-column: 1 / -1;
    max-width: 320px;
}

input::placeholder {
    color: #8aa0b3;
}

input,
button {
    width: 100%;
    padding: 0.66rem 0.7rem;
    border: 1px solid #b2c7d8;
    border-radius: 10px;
    font-size: 0.98rem;
}

button,
.btn {
    display: inline-block;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(135deg, #115f99, #0d8f89);
    border: 0;
    cursor: pointer;
    margin-top: 0.6rem;
    border-radius: 11px;
    padding: 0.66rem 1.05rem;
    box-shadow: 0 8px 18px rgba(9, 74, 118, 0.2);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

button:hover,
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(7, 54, 88, 0.24);
}

.btn-alt {
    background: linear-gradient(135deg, #0f6e4a, #289f68);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 0.35rem;
}

.result-grid {
    display: grid;
    gap: 0.8rem;
    grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
}

.progression-box {
    margin-top: 0.9rem;
    background: linear-gradient(160deg, #f6fbf8, #eef7f4);
    border: 1px solid #d3e8dc;
    border-radius: 12px;
    padding: 0.8rem 0.9rem;
}

.progression-box h3 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
}

.progression-grid {
    display: grid;
    gap: 0.8rem;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.progression-grid h4 {
    margin: 0 0 0.4rem;
}

.plain-list {
    margin: 0;
    padding-left: 1rem;
}

.plain-list li {
    margin: 0.2rem 0;
}

.chips {
    list-style: none;
    padding-left: 0;
    display: grid;
    gap: 0.34rem;
}

.chips li {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    width: fit-content;
    padding: 0.26rem 0.5rem;
    border-radius: 999px;
    background: #eef6f2;
    border: 1px solid #d4e8dc;
}

.chips span {
    display: inline-block;
    min-width: 1.8rem;
    text-align: center;
    border-radius: 999px;
    background: #0f6e4a;
    color: #fff;
    font-size: 0.75rem;
    padding: 0.1rem 0.35rem;
}

.metric {
    background: linear-gradient(160deg, #f7fbff, #f1f8f4);
    border: 1px solid #d5e5ef;
    border-radius: 12px;
    padding: 0.75rem 0.8rem;
}

.metric h3 {
    margin: 0;
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #2a4f74;
}

.metric p {
    margin: 0.35rem 0 0.15rem;
    font-size: 1.08rem;
}

.metric small {
    color: #4a647d;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 0.45rem;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}

.alert {
    margin-top: 1rem;
    padding: 0.8rem;
    border-radius: 10px;
    border: 1px solid transparent;
}

.alert.error {
    background: #ffe8e7;
    border-color: #f8b6b0;
    color: #7f1d1d;
}

.help {
    color: #35556f;
    font-size: 0.92rem;
    margin-bottom: 0;
}

.help.ok {
    color: #1c623e;
    font-weight: 600;
}

.help.warn {
    color: #8a4a00;
    font-weight: 600;
}

.fade-in {
    animation: appear 0.42s ease-out;
}

@keyframes appear {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 780px) {
    .chu-logo {
        position: static;
        width: 180px;
        max-width: 100%;
        margin-bottom: 0.6rem;
        display: block;
    }

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

    .actions .btn {
        width: 100%;
        text-align: center;
    }
}
