:root {
    --petrol: #173a3f;
    --orange: #f59a23;
    --paper: #f7f7f3;
    --muted: #607476;
    --line: #dce3df;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--petrol);
    background: var(--paper);
    font-size: 16px;
    line-height: 1.5;
    color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--petrol); text-underline-offset: 4px; }
img { max-width: 100%; }
svg { display: block; }
:focus-visible { outline: 3px solid var(--petrol); outline-offset: 4px; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 10; padding: 12px; background: white; }
.skip-link:focus { top: 12px; }
.site-header { max-width: 1080px; margin: auto; padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; font-size: 1.4rem; letter-spacing: -.065em; white-space: nowrap; }
.brand strong { font-weight: 800; }
.brand img { flex: 0 0 36px; }
.site-header nav { display: flex; align-items: center; }
.site-header nav a, .text-button { min-height: 44px; display: inline-flex; align-items: center; font-size: .88rem; }
nav form { margin: 0; }
main { max-width: 1040px; margin: 14px auto 48px; padding: 0 20px; }
h1 { margin: 0 0 24px; font-size: clamp(1.8rem, 5vw, 2.8rem); letter-spacing: -.045em; line-height: 1.15; overflow-wrap: anywhere; }
h2 { margin: 0 0 14px; font-size: 1.25rem; letter-spacing: -.025em; overflow-wrap: anywhere; }
p { margin: 0 0 18px; }
.narrow { max-width: 560px; margin: 24px auto 0; }
.columns { display: grid; gap: 0; }
.card { padding: 24px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 20px; background: white; box-shadow: 0 3px 14px #173a3f04; }
.welcome { position: relative; overflow: hidden; display: grid; gap: 28px; margin-bottom: 24px; padding: 30px 24px; border-radius: 24px; background: var(--petrol); color: white; }
.eyebrow { margin-bottom: 18px; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .16em; color: #d6e1df; }
.welcome h1 { font-size: clamp(2rem, 6vw, 3.4rem); margin-bottom: 18px; letter-spacing: -.055em; }
.welcome h1 span { color: var(--orange); }
.welcome-intro { max-width: 28ch; color: #e0e8e5; }
.welcome .button { margin-top: 4px; }
.welcome .button span { margin-left: 24px; }
.reminder-preview { position: relative; padding: 22px; background: var(--paper); border-radius: 18px; color: var(--petrol); box-shadow: 0 14px 35px #0002; transform: rotate(-2deg); align-self: center; }
.preview-heading { display: flex; align-items: center; gap: 9px; font-size: .85rem; font-weight: 700; }
.preview-time { margin-left: auto; color: var(--muted); font-size: .7rem; font-weight: 400; }
.preview-title { font-size: 1.45rem; font-weight: 750; letter-spacing: -.035em; margin: 18px 0 8px; }
.reminder-preview p { margin: 0; color: var(--muted); font-size: .85rem; }
.preview-check { display: inline-flex; align-items: center; justify-content: center; margin-top: 18px; width: 36px; height: 36px; background: #fbe7c6; color: var(--petrol); border-radius: 50%; font-weight: 800; }
.school-list { list-style: none; padding: 0; margin: 0; }
.school-list a { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 56px; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 650; overflow-wrap: anywhere; }
.school-list li:last-child a { border-bottom: 0; }
.school-list a span { color: #976013; font-size: 1.3rem; }
.school-list a:hover { color: #976013; }
#schools { scroll-margin-top: 20px; }
label { display: block; font-weight: 650; font-size: .9rem; margin: 18px 0 8px; }
input, select { display: block; width: 100%; min-width: 0; min-height: 50px; padding: 12px 14px; border: 1px solid #aebfbc; border-radius: 12px; font: inherit; background: white; color: var(--petrol); }
input:focus, select:focus { outline: 3px solid #f59a2359; outline-offset: 2px; border-color: #946014; }
input.input-validation-error, select.input-validation-error { border-color: #a43429; }
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; border: 0; border-radius: 14px; padding: 13px 20px; margin-top: 22px; font: inherit; font-weight: 750; background: var(--orange); color: var(--petrol); cursor: pointer; text-decoration: none; }
form button { width: 100%; }
button:hover, .button:hover { background: #e98b13; }
.text-button { width: auto; background: transparent; color: var(--petrol); padding: 0 4px; margin: 0; font-weight: 500; text-decoration: underline; border-radius: 4px; }
.text-button:hover { background: transparent; color: #976013; }
.secondary { background: #edf1ed; color: var(--petrol); }
.secondary:hover { background: #e0e7e1; }
.danger { background: #a43429; color: white; }
.danger:hover { background: #842b24; }
.notice { padding: 16px; margin-bottom: 20px; border: 1px solid #c3decf; border-radius: 14px; background: #eaf4ec; }
.validation-summary-errors, .field-validation-error { color: #a43429; font-size: .9rem; overflow-wrap: anywhere; }
.validation-summary-errors ul { padding-left: 20px; }
.validation-summary-valid, .field-validation-valid { display: none; }
.muted { color: var(--muted); font-size: .88rem; overflow-wrap: anywhere; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
hr { border: 0; border-top: 1px solid var(--line); margin: 26px 0; }
small { font-size: .85rem; color: var(--muted); }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 24px 0; }
.page-heading h1 { font-size: clamp(1.65rem, 4vw, 2.5rem); margin: 0; }
.add-certificate { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 46px; min-height: 46px; background: var(--orange); color: var(--petrol); border-radius: 15px; font-size: 1.9rem; text-decoration: none; line-height: 1; }
.add-certificate:hover { background: #e98b13; }
.certificate-row { padding: 20px; }
.certificate-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.certificate-title h2 { font-size: 1.05rem; margin-bottom: 8px; }
.certificate-date { font-size: .85rem; color: var(--muted); margin-top: 4px; }
.status { padding: 5px 9px; border-radius: 9px; font-size: .7rem; font-weight: 650; white-space: nowrap; }
.status.valid { background: #e0f0e4; color: #285737; }
.status.soon { background: #fff0d3; color: #80500d; }
.status.expired { background: #fce3df; color: #952d24; }
.certificate-update { display: flex; align-items: center; justify-content: space-between; min-height: 44px; margin-top: 12px; border-top: 1px solid #edf1ed; padding-top: 10px; font-size: .9rem; font-weight: 650; text-decoration: none; }
.certificate-update:hover { color: #976013; }
.empty-state { text-align: center; padding: 36px 24px; }
.empty-state img { margin-bottom: 18px; }
.empty-state h2 { margin-bottom: 0; }
.site-footer { max-width: 1040px; margin: auto; padding: 0 20px 28px; text-align: center; }
.site-footer img { display: block; width: 150px; height: auto; margin: auto; }
.account-nav { display: flex; justify-content: space-around; gap: 6px; position: sticky; bottom: 0; z-index: 5; padding: 10px 16px max(10px, env(safe-area-inset-bottom)); background: #fffffff5; border-top: 1px solid var(--line); backdrop-filter: blur(12px); }
.account-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 48px; min-width: 72px; text-decoration: none; color: var(--muted); font-size: .72rem; }
.account-nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.account-nav a[aria-current="page"] { color: #946014; font-weight: 700; }
body:has(.account-nav) { padding-bottom: 88px; }
body:has(.account-nav) .account-nav { position: fixed; left: 0; right: 0; }
@media (max-width: 359px) {
    .site-header, main { padding-left: 14px; padding-right: 14px; }
    .brand { font-size: 1.25rem; gap: 6px; }
    .card, .welcome { padding: 20px; }
    .certificate-title { flex-wrap: wrap; }
}
@media (min-width: 720px) {
    .site-header { padding: 24px 20px; }
    main { margin-top: 28px; }
    .columns { grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
    .card { padding: 30px; }
    .welcome { grid-template-columns: 1.25fr 1fr; padding: 44px; gap: 48px; margin-bottom: 32px; }
    .reminder-preview { max-width: 340px; }
    .certificate-row { padding: 24px; display: flex; align-items: center; gap: 28px; }
    .certificate-details { flex: 1; min-width: 0; }
    .certificate-title { justify-content: flex-start; align-items: center; }
    .certificate-title h2 { margin: 0; }
    .certificate-update { border: 0; padding: 12px 16px; margin: 0; background: #edf1ed; border-radius: 12px; gap: 18px; }
    .account-nav { border: 1px solid var(--line); border-radius: 20px 20px 0 0; max-width: 520px; margin: auto; }
}
@media (max-width: 719px) { .reminder-preview { display: none; } }
@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
    button, .button, a { transition: background-color .15s, color .15s; }
}
