@font-face {
  font-family: Inter;
  src: url('/fonts/inter-400.ttf') format('truetype');
  font-display: swap;
  font-weight: 400;
}

@font-face {
  font-family: Inter;
  src: url('/fonts/inter-600.ttf') format('truetype');
  font-display: swap;
  font-weight: 600;
}

@font-face {
  font-family: Playfair;
  src: url('/fonts/playfair-display-500.ttf') format('truetype');
  font-display: swap;
  font-weight: 500;
}

:root {
  color-scheme: light;
  --paper: #fffdf9;
  --ink: #2b1810;
  --muted: #736357;
  --line: #e5dcd0;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  isolation: isolate;
  color: var(--ink);
  background: #2b1810;
  font: 14px/1.7 Inter, Arial, sans-serif;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, #23110826, #2311080d),
    #2b1810 url('/student-login-background.webp') 72% center / cover no-repeat;
}

.document-layout {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px 24px;
}

.verification {
  width: min(100%, 540px);
  min-width: 0;
  padding: 36px 42px 38px;
  border: 1px solid #e8ded1;
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 16px 60px #160b0633;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.brand img { height: 59px; width: auto; }
.brand-name { font: 500 26px/1.25 Playfair, Georgia, serif; }
.brand-name span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font: 9px/1.5 Inter, Arial, sans-serif;
  letter-spacing: .17em;
}

h1 {
  margin: 0;
  text-align: center;
  font: 500 clamp(28px, 3.6vw, 35px)/1.25 Playfair, Georgia, serif;
  letter-spacing: -.025em;
  text-wrap: balance;
}
.intro {
  max-width: 360px;
  margin: 14px auto 0;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  line-height: 1.8;
}

form { margin-top: 30px; }
label { display: block; margin-bottom: 9px; font-size: 12px; font-weight: 600; }
.form-controls { display: flex; flex-direction: column; gap: 16px; }
input {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 13px 15px;
  border: 1px solid #a5917d;
  border-radius: 7px;
  color: var(--ink);
  background: #fff;
  font: 16px/1.5 Inter, Arial, sans-serif;
}
input::placeholder { color: var(--muted); opacity: 1; font-size: 13px; }
button {
  min-height: 50px;
  padding: 14px 20px;
  border: 1px solid var(--ink);
  border-radius: 7px;
  background: var(--ink);
  color: #fff8eb;
  font: 600 13px/1.5 Inter, Arial, sans-serif;
  cursor: pointer;
  transition: background-color .15s;
}
button:hover { background: #4a3024; }
button:disabled { opacity: .7; cursor: wait; }
.help { margin: 18px 0 0; color: var(--muted); text-align: center; font-size: 11px; line-height: 1.8; }

.status {
  margin-top: 26px;
  padding: 12px 14px;
  border: 1px solid #cfddd1;
  border-radius: 6px;
  background: #f0f5ef;
  color: #34563d;
  font-size: 12px;
  font-weight: 600;
}
.status.error { border-color: #e5cfc8; background: #fbf2ee; color: #923b30; }
.status.pending { border-color: var(--line); background: #f7f3ec; color: var(--muted); }
.status:not([hidden]) ~ form { margin-top: 24px; }

.record { margin-top: 24px; }
.record h2 { margin: 0 0 22px; font: 500 22px/1.35 Playfair, Georgia, serif; }
dl { display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px 20px; margin: 0; }
dl > div { min-width: 0; }
.record-person, .record-course { grid-column: 1 / -1; }
.record-course { border-bottom: 1px solid var(--line); padding-bottom: 20px; }
dt { color: var(--muted); font-size: 11px; }
dd { margin: 5px 0 0; font-size: 13px; overflow-wrap: anywhere; }
.record-person dd { font: 500 26px/1.3 Playfair, Georgia, serif; }
.record-course dd { font-size: 14px; }
#reference { font-weight: 600; font-variant-numeric: tabular-nums; }
.notice { margin: 23px 0 0; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.legal-note { margin: 12px 0 0; color: var(--muted); font-size: 11px; }
.another-document { display: inline-flex; align-items: center; min-height: 44px; margin-top: 12px; color: var(--ink); font-size: 12px; text-underline-offset: 4px; }

.site-footer { padding: 0 20px 24px; color: #f1dfc9; text-align: center; font-size: 10px; }
:focus-visible { outline: 2px solid #967125; outline-offset: 4px; }
.skip-link { position: absolute; top: -100px; left: 20px; padding: 12px 18px; border-radius: 4px; background: var(--paper); color: var(--ink); z-index: 1; }
.skip-link:focus { top: 12px; }
[hidden] { display: none !important; }

@media (max-width: 600px) {
  .document-layout { padding: 32px 16px 24px; }
  .verification { padding: 28px 24px 30px; border-radius: 12px; }
  .brand { gap: 13px; padding-bottom: 24px; margin-bottom: 24px; }
  .brand img { height: 52px; }
  .brand-name { font-size: 24px; }
  .brand-name span { font-size: 8px; }
  h1 { font-size: 29px; }
  form { margin-top: 26px; }
  dl { grid-template-columns: 1fr; }
  .site-footer { padding-bottom: 20px; font-size: 9px; }
}

@media (max-width: 360px) {
  .verification { padding-inline: 20px; }
  .brand { gap: 10px; }
  .brand img { height: 45px; }
  .brand-name { font-size: 21px; }
  .brand-name span { font-size: 7px; }
  h1 { font-size: 27px; }
  input::placeholder { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  button { transition: none; }
}
