
:root {
    --navy: #102b46;
    --navy-light: #183d5b;
    --blue: #8ed8f0;
    --background: #f3f6fa;
    --white: #ffffff;
    --text: #243447;
    --muted: #66758a;
    --border: #dce4ed;
    --red: #b42318;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
}

/* Wellington College header */
.site-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 125px;
    padding: 24px 180px;
    background: var(--navy);
    color: var(--white);
    border-bottom: 5px solid var(--blue);
}

/* Logo positioned at the top left */
.logo-link {
    position: absolute;
    left: 28px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
}

.wellington-logo {
    display: block;
    width: 100px;
    max-height: 90px;
    object-fit: contain;
}

/* Header title and subtitle */
.header-content {
    text-align: center;
}

.header-content h1 {
    margin: 0;
    font-size: 2.5rem;
}

.header-content p {
    margin: 8px 0 0;
    color: var(--blue);
}

/* Main content */
main {
    width: min(850px, 92%);
    margin: 32px auto;
}

/* Content panels */
.panel {
    background: var(--white);
    padding: 28px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 5px 18px rgba(16, 43, 70, 0.05);
}

h2 {
    color: var(--navy);
    margin-top: 0;
}

.description {
    color: var(--muted);
}

/* Input labels */
label {
    display: block;
    margin: 20px 0 8px;
    font-weight: bold;
}

/* Text input areas */
textarea {
    display: block;
    width: 100%;
    padding: 13px;
    font: inherit;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    resize: vertical;
}

textarea:focus {
    outline: 2px solid var(--blue);
    border-color: var(--navy-light);
}

/* Buttons */
.buttons {
    display: flex;
    gap: 12px;
    margin-top: 22px;
}

button {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    background: var(--navy);
    color: var(--white);
    font: inherit;
    font-weight: bold;
    cursor: pointer;
}

button:hover {
    background: var(--navy-light);
}

button:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 3px;
}

button.secondary {
    background: #e8eef5;
    color: var(--navy);
}

/* Error messages */
#error {
    color: var(--red);
    font-weight: bold;
}

/* PED calculation results */
.result-card {
    padding: 20px;
    margin-top: 18px;
    border: 1px solid var(--border);
    border-left: 5px solid var(--blue);
    border-radius: 10px;
    overflow-wrap: anywhere;
}

.result-card h3 {
    color: var(--navy);
    margin-top: 0;
}

.ped-value {
    color: var(--navy);
    font-size: 1.5rem;
    font-weight: bold;
}

.classification {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    background: #e8f7fc;
    color: var(--navy);
    font-weight: bold;
}

.result-message {
    color: var(--red);
}

/* PED reference guide */
.guide-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.guide-item:last-child {
    border-bottom: none;
}

.guide-item strong {
    color: var(--navy);
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    color: var(--muted);
}

/* Mobile-friendly layout */
@media (max-width: 600px) {
    .site-header {
        min-height: 105px;
        padding: 20px 100px;
    }

    .logo-link {
        left: 12px;
    }

    .wellington-logo {
        width: 65px;
        max-height: 65px;
    }

    .header-content h1 {
        font-size: 1.4rem;
    }

    .header-content p {
        font-size: 0.8rem;
    }

    .panel {
        padding: 20px;
    }

    .guide-item {
        flex-direction: column;
        gap: 2px;
    }
}
