:root {
    color-scheme: light;
    --ink: #233d40;
    --muted: #617174;
    --teal: #245b60;
    --line: #dce5e3;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: #f2f5f3;
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
}

a { color: var(--teal); text-underline-offset: 4px; }
a:hover { text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 3px solid #a66622; outline-offset: 4px; }
button { font: inherit; }
svg { display: block; }

.studentbevis-shell { width: min(100% - 40px, 460px); margin: 0 auto; padding: 32px 0 24px; }
.page-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; }
.school-brand { display: inline-flex; color: var(--ink); text-decoration: none; }
.school-brand img { display: block; width: 100px; height: 100px; }
.language-switch { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 10px; }
.language-switch a { min-height: 38px; display: flex; align-items: center; padding: 6px 9px; font-size: 12px; text-decoration: none; border-radius: 7px; }
.language-switch a[aria-current] { background: #fff; color: var(--ink); font-weight: 650; box-shadow: 0 1px 3px #233d4010; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
h1, h2, p { margin-top: 0; }
h1 { font-size: 28px; line-height: 1.2; font-weight: 650; letter-spacing: -.8px; margin-bottom: 0; }

.student-card { overflow: hidden; background: #fff; border: 1px solid #d4e0dc; border-radius: 20px; box-shadow: 0 10px 32px #1d47440a, 0 2px 5px #1d474404; }
.card-topline { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 24px; background: var(--teal); color: #fff; }
.card-title { margin: 0; font-size: 20px; line-height: 1.3; font-weight: 600; letter-spacing: -.2px; }
.card-year { opacity: .85; font-size: 16px; font-variant-numeric: tabular-nums; }
.card-content { padding: 26px 24px 24px; }
.student-identity { display: flex; align-items: center; gap: 22px; }
.profile-photo { flex: 0 0 120px; width: 120px; height: 144px; overflow: hidden; background: #f2f5f3; border: 1px solid var(--line); border-radius: 12px; }
.profile-photo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.student-name { min-width: 0; }
.student-name h2 { font-size: 25px; font-weight: 650; line-height: 1.2; letter-spacing: -.6px; margin: 0 0 8px; overflow-wrap: anywhere; }
.student-name p { color: var(--muted); font-size: 14px; margin: 0; }
.student-details { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 16px; margin: 25px 0 0; }
.student-details > div { min-width: 0; }
.student-details dt { color: var(--muted); font-size: 12px; margin-bottom: 3px; }
.student-details dd { margin: 0; font-weight: 600; font-size: 16px; line-height: 1.4; overflow-wrap: anywhere; }
.student-details .study-detail { grid-column: 1 / -1; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.validity-strip { display: flex; align-items: center; gap: 12px; padding: 17px 24px; background: #eaf3eb; border-top: 1px solid #dce9de; color: #28543a; }
.validity-mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #d6e8d8; font-size: 16px; font-weight: 700; }
.validity-strip > div { display: flex; flex-direction: column; }
.validity-strip > div > span { font-size: 12px; }
.validity-strip strong { font-size: 19px; line-height: 1.4; letter-spacing: .2px; font-variant-numeric: tabular-nums; }
.validity-seal { width: 28px; height: 28px; margin-left: auto; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.card-actions { margin-top: 22px; }
.card-actions form { margin: 0; }
.button { display: flex; align-items: center; justify-content: center; gap: 14px; width: 100%; min-height: 50px; padding: 13px 18px; border: 1px solid transparent; border-radius: 11px; font-size: 15px; font-weight: 600; line-height: 1.4; text-align: center; text-decoration: none; cursor: pointer; }
.button-primary { color: #fff; background: var(--teal); }
.button-primary:hover { background: #1a494e; }
.button-secondary { color: var(--teal); border-color: #b6ccca; background: #fff; }
.button-secondary:hover { background: #eaf0ee; }
.button > span { font-size: 20px; line-height: 1; }
.action-hint { max-width: 330px; margin: 11px auto 0; font-size: 12px; line-height: 1.6; text-align: center; color: var(--muted); }
.photo-notice { padding: 14px 16px; background: #fff6e5; border: 1px solid #ebddbf; border-radius: 10px; color: #69512f; font-size: 14px; margin: 16px 0 0; }
.check-banner { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; padding: 15px 18px; border: 1px solid #c9dfce; border-radius: 12px; background: #eaf3eb; color: #28543a; }
.check-icon { display: grid; place-items: center; flex: 0 0 30px; height: 30px; border-radius: 50%; background: #28543a; color: #fff; font-weight: 700; }
.check-banner strong { display: block; font-size: 15px; }
.check-banner div > span { display: block; font-size: 12px; font-variant-numeric: tabular-nums; }

.welcome-panel { padding: 36px 30px 30px; background: #fff; border: 1px solid var(--line); border-radius: 20px; text-align: center; box-shadow: 0 10px 32px #1d47440a; }
.welcome-symbol { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 22px; border-radius: 20px; color: var(--teal); background: #edf4f1; }
.welcome-symbol svg { width: 45px; height: 45px; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.welcome-panel h1 { font-size: 28px; }
.welcome-panel p { margin: 14px auto 26px; max-width: 290px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.page-footer { padding-top: 26px; color: var(--muted); font-size: 12px; line-height: 1.8; text-align: center; }
.page-footer nav { display: flex; align-items: center; justify-content: center; gap: 18px; margin-bottom: 14px; font-size: 13px; }
.page-footer nav a { display: inline-flex; align-items: center; min-height: 40px; }
.page-footer p { margin: 0; }
.page-footer p a { color: var(--muted); }

@media (max-width: 380px) {
    .studentbevis-shell { width: calc(100% - 28px); padding-top: 20px; }
    .page-header { gap: 8px; margin-bottom: 26px; }
    .school-brand img { width: 90px; height: 90px; }
    .language-switch a { padding: 6px 7px; }
    .card-topline { padding-right: 18px; padding-left: 18px; }
    .card-content { padding: 20px 18px; }
    .student-identity { gap: 16px; }
    .profile-photo { flex-basis: 100px; width: 100px; height: 124px; }
    .student-name h2 { font-size: 22px; }
    .validity-strip { padding-right: 18px; padding-left: 18px; }
    .welcome-panel { padding: 30px 22px 24px; }
}

@media (prefers-reduced-motion: no-preference) {
    .button { transition: background-color .15s ease; }
}
