/* Quad A Exam Portal — student portal + portal chooser.
   Ported verbatim from the original exams/index.html and exams/login.html
   inline stylesheets. Fidelity matters: this is a platform port, not a redesign. */

@font-face { font-family: 'Zona Pro'; src: url('../fonts/ZonaPro-Bold.otf') format('opentype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Gotham'; src: url('../fonts/GothamMedium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Gotham'; src: url('../fonts/GothamBook.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Fira Sans'; src: url('../fonts/FiraSans-Regular.otf') format('opentype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Fira Sans'; src: url('../fonts/FiraSans-Light.otf') format('opentype'); font-weight: 300; font-display: swap; }

:root {
  --black: #050505; --panel: #0b0b0b; --line: rgba(255,255,255,0.10);
  --white: #ffffff; --mist: rgba(255,255,255,0.72); --dim: rgba(255,255,255,0.45);
  --orange: #ff8b00;
  --display: 'Zona Pro', 'Gotham', sans-serif;
  --ui: 'Gotham', 'Fira Sans', sans-serif;
  --body: 'Fira Sans', 'Gotham', sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: var(--black); color: var(--white);
  font-family: var(--body); font-weight: 300; min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--orange); color: #000; }
a { color: inherit; text-decoration: none; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px 80px; }

/* top bar */
.bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 0; border-bottom: 1px solid var(--line); margin-bottom: 48px;
}
.mark { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: 0.14em; }
.mark img { height: 64px; width: auto; display: block; }
@media (max-width: 560px) { .mark img { height: 50px; } }
.mark span { color: var(--orange); }
.login-logo { display: block; margin: 0 auto 26px; height: 165px; width: auto; }
@media (max-width: 560px) { .login-logo { height: 128px; } }
.bar .right { display: flex; align-items: center; gap: 12px; }
.home-btn {
  /* 44px floor: this button is a real tap target on phones */
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex: 0 0 auto;
  min-height: 44px; min-width: 44px;
  font-family: var(--ui); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--orange); text-decoration: none; border: 1px solid rgba(255,139,0,0.5);
  padding: 8px 14px; transition: background .2s, color .2s;
}
.home-btn svg { display: block; }
.home-btn:hover { background: var(--orange); color: #000; }
@media (max-width: 480px) { .home-btn span { display: none; } .home-btn { padding: 8px 10px; } }
.bar .who { font-family: var(--ui); font-size: 12px; letter-spacing: 0.08em; color: var(--mist); text-align: right; }
.bar .who b { color: var(--white); font-weight: 500; }
.bar button {
  margin-left: 16px; background: none; border: 1px solid var(--line); color: var(--mist);
  font-family: var(--ui); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 8px 14px; cursor: pointer; transition: border-color .2s, color .2s;
}
.bar button:hover { border-color: var(--orange); color: var(--orange); }

.kicker { font-family: var(--ui); font-size: 11px; letter-spacing: 0.34em; text-transform: uppercase; color: var(--orange); margin-bottom: 14px; }
h1 { font-family: var(--display); font-weight: 700; font-size: clamp(28px, 5vw, 44px); line-height: 1.08; margin-bottom: 12px; }
.lede { color: var(--mist); font-size: 15px; line-height: 1.7; max-width: 560px; }

/* login card */
.login { max-width: 460px; margin: 8vh auto 0; }
.card {
  background: var(--panel); border: 1px solid var(--line); padding: 36px 32px; margin-top: 30px;
}
label { display: block; font-family: var(--ui); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--dim); margin: 20px 0 8px; }
label:first-child { margin-top: 0; }
input, select {
  width: 100%; background: #101010; border: 1px solid var(--line); color: var(--white);
  font-family: var(--body); font-size: 15px; padding: 13px 14px; border-radius: 0;
  outline: none; transition: border-color .2s; -webkit-appearance: none; appearance: none;
}
select { background-image: linear-gradient(45deg, transparent 50%, var(--orange) 50%), linear-gradient(135deg, var(--orange) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
input:focus, select:focus { border-color: var(--orange); }
.btn {
  width: 100%; margin-top: 28px; background: var(--orange); border: none; color: #000;
  font-family: var(--ui); font-weight: 500; font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase;
  padding: 15px; cursor: pointer; transition: filter .2s;
}
.btn:hover { filter: brightness(1.12); }
.btn:disabled { filter: grayscale(1) brightness(0.6); cursor: wait; }
.err { display: none; margin-top: 16px; font-size: 13px; color: #ff6a6a; line-height: 1.5; }
.hint { margin-top: 22px; font-size: 12px; color: var(--dim); line-height: 1.6; }

/* dashboard */
.weeks { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; margin-top: 44px; }
.week {
  position: relative; background: var(--panel); border: 1px solid var(--line);
  padding: 26px 24px 24px; display: flex; flex-direction: column; min-height: 210px;
  transition: border-color .25s, transform .25s;
}
.week.open:hover { border-color: rgba(255,139,0,0.55); transform: translateY(-3px); }
.week .wnum { font-family: var(--display); font-weight: 700; font-size: 40px; color: rgba(255,255,255,0.08); position: absolute; top: 14px; right: 18px; }
.week .tag { font-family: var(--ui); font-size: 10px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--orange); margin-bottom: 10px; }
.week h3 { font-family: var(--ui); font-weight: 500; font-size: 16px; line-height: 1.4; margin-bottom: 8px; }
.week .state { font-size: 12.5px; color: var(--mist); line-height: 1.6; flex: 1; }
.week .state .score { color: var(--orange); font-weight: 400; }
.week .go {
  margin-top: 18px; display: inline-block; font-family: var(--ui); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--orange); border: 1px solid rgba(255,139,0,0.45);
  padding: 11px 0; text-align: center; cursor: pointer; background: none; transition: background .2s, color .2s;
}
.week.open .go:hover { background: var(--orange); color: #000; }
.week.locked { opacity: 0.55; }
.week.locked .go { color: var(--dim); border-color: var(--line); cursor: not-allowed; }
.week.done { border-color: rgba(255,139,0,0.35); }
.lockline { margin-top: 34px; font-size: 12.5px; color: var(--dim); line-height: 1.7; }
.lockline b { color: var(--orange); font-weight: 400; }

@media (max-width: 560px) {
  .wrap { padding: 0 16px 60px; }
  .bar { flex-wrap: wrap; gap: 10px; margin-bottom: 34px; }
  .card { padding: 28px 20px; }
  .login { margin-top: 4vh; }
  .weeks { grid-template-columns: 1fr; }
  .week { min-height: 0; }
}

/* ---------- portal chooser (was login.html) ---------- */
body.qep-chooser { display: flex; flex-direction: column; font-family: 'Fira Sans', sans-serif; font-weight: 400; }
body.qep-chooser .wrap { max-width: 880px; padding: 0 24px 60px; }
body.qep-chooser .bar { justify-content: space-between; gap: 14px; margin-bottom: 0; }
body.qep-chooser .mark { color: inherit; text-decoration: none; }
body.qep-chooser .home-btn { padding: 9px 15px; }
@media (max-width: 480px) { body.qep-chooser .home-btn { padding: 9px 11px; } }
.center { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 0; }
.inner { text-align: center; width: 100%; }
.logo { height: 170px; width: auto; margin: 0 auto 28px; display: block; }
body.qep-chooser .kicker { letter-spacing: 0.34em; margin-bottom: 12px; }
body.qep-chooser h1 { font-size: clamp(26px, 4.5vw, 40px); margin-bottom: 10px; }
body.qep-chooser .lede { font-size: 15px; max-width: 460px; margin: 0 auto; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; max-width: 640px; margin: 40px auto 0; }
.choice {
  display: block; background: var(--panel); border: 1px solid var(--line); padding: 36px 28px;
  color: inherit; text-decoration: none; transition: border-color .25s, transform .25s; text-align: center;
}
.choice:hover { border-color: rgba(255,139,0,0.6); transform: translateY(-3px); }
.choice .icon { margin-bottom: 16px; }
.choice .icon svg { width: 52px; height: 52px; stroke: var(--orange); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.choice h2 { font-family: var(--ui); font-weight: 500; font-size: 17px; letter-spacing: 0.06em; margin-bottom: 8px; }
.choice p { font-size: 13px; color: var(--mist); line-height: 1.6; }
.choice .go { display: inline-block; margin-top: 18px; font-family: var(--ui); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--orange); border: 1px solid rgba(255,139,0,0.45); padding: 11px 22px; }
.choice:hover .go { background: var(--orange); color: #000; }
.footnote { margin: 30px auto 0; font-size: 12px; color: var(--dim); line-height: 1.7; max-width: 460px; }
.footnote a { color: var(--orange); text-decoration: underline; }
@media (max-width: 560px) {
  body.qep-chooser .wrap { padding: 0 16px 40px; }
  .choices { grid-template-columns: 1fr; }
  .logo { height: 132px; }
}
