:root {
  --ink: #082d3a;
  --ink-deep: #061f2a;
  --ink-soft: #244a56;
  --cream: #f7f4ea;
  --paper: #fffdf7;
  --gold: #e2a73b;
  --gold-light: #f4c863;
  --teal: #0e7f76;
  --green: #167f55;
  --red: #b64242;
  --orange: #bb6c22;
  --line: rgba(8, 45, 58, 0.13);
  --shadow: 0 28px 80px rgba(2, 27, 37, 0.18);
  --radius-lg: 30px;
  --radius-md: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    radial-gradient(circle at 10% 10%, #164f5b 0, transparent 34%),
    linear-gradient(145deg, #062631 0%, #082f3c 55%, #051c27 100%);
  background-size: 48px 48px, 48px 48px, auto, auto;
  font-family: "Cairo", "Tahoma", "Segoe UI", Arial, sans-serif;
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
}

.page-glow {
  position: fixed;
  z-index: -1;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.16;
  pointer-events: none;
}

.page-glow--one {
  top: -180px;
  right: -120px;
  background: var(--gold);
}

.page-glow--two {
  bottom: 4%;
  left: -200px;
  background: #3fc0aa;
}

.site-header,
.main-shell,
footer {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: #fff;
  text-decoration: none;
}

.brand__mark {
  width: 49px;
  height: 49px;
  display: grid;
  place-items: center;
  color: var(--ink-deep);
  background: linear-gradient(145deg, var(--gold-light), var(--gold));
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 16px 16px 5px 16px;
  box-shadow: 0 10px 26px rgba(226, 167, 59, 0.22);
  font-size: 25px;
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 18px;
  letter-spacing: -0.2px;
}

.brand small {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
}

.header-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 15px;
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 12px;
  backdrop-filter: blur(10px);
}

.header-badge i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #55d59b;
  box-shadow: 0 0 0 5px rgba(85, 213, 155, 0.11);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logout-form {
  margin: 0;
}

.logout-form button {
  min-height: 39px;
  padding: 0 14px;
  color: rgba(255, 255, 255, 0.76);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  transition: color 150ms ease, background 150ms ease;
}

.logout-form button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.main-shell {
  padding: 46px 0 74px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 0.77fr);
  gap: clamp(46px, 8vw, 112px);
  align-items: center;
  min-height: 600px;
}

.hero__copy {
  color: #fff;
  padding-bottom: 34px;
}

.eyebrow,
.result-kicker {
  display: inline-block;
  color: var(--gold-light);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.2px;
}

.eyebrow {
  margin-bottom: 20px;
  padding: 8px 13px;
  border: 1px solid rgba(244, 200, 99, 0.25);
  border-radius: 999px;
  background: rgba(244, 200, 99, 0.08);
}

.hero h1 {
  margin: 0;
  max-width: 640px;
  font-size: clamp(52px, 6vw, 82px);
  line-height: 1.16;
  letter-spacing: -3.4px;
}

.hero h1 em {
  position: relative;
  color: var(--gold-light);
  font-style: normal;
}

.hero h1 em::after {
  content: "";
  position: absolute;
  right: 2%;
  bottom: -6px;
  width: 94%;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--gold-light));
  transform: rotate(-1deg);
}

.hero__copy > p {
  max-width: 610px;
  margin: 28px 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 18px;
  line-height: 2;
}

.quick-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 34px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.quick-facts span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.quick-facts b {
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  color: #0b3a38;
  background: #74d9ae;
  border-radius: 50%;
  font-size: 12px;
}

.search-card {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 4vw, 46px);
  color: var(--ink);
  background:
    radial-gradient(circle at 100% 0%, rgba(226, 167, 59, 0.14), transparent 28%),
    var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.search-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, var(--teal), var(--gold-light));
}

.search-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.search-card__top h2 {
  margin: 0;
  font-size: 27px;
  letter-spacing: -0.8px;
}

.search-card__top p {
  margin: 9px 0 0;
  color: #66808a;
  font-size: 13px;
}

.step-number {
  color: rgba(8, 45, 58, 0.13);
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
  direction: ltr;
}

.search-modes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
  margin-top: 30px;
  padding: 6px;
  background: #eef0e9;
  border-radius: 15px;
}

.search-mode {
  min-height: 45px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  color: #718589;
  background: transparent;
  border-radius: 11px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  transition: color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.search-mode span {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  color: inherit;
  border: 1px solid currentColor;
  border-radius: 7px;
  font-size: 12px;
}

.search-mode.is-active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 5px 14px rgba(8, 45, 58, 0.08);
}

#result-form {
  margin-top: 25px;
}

#result-form label {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 800;
}

.input-wrap {
  position: relative;
}

.input-icon {
  position: absolute;
  top: 50%;
  right: 19px;
  z-index: 1;
  color: var(--gold);
  font-size: 22px;
  font-weight: 900;
  transform: translateY(-50%);
}

#search-query,
#portal-password {
  width: 100%;
  height: 66px;
  padding: 0 56px 0 68px;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid #d9e0de;
  border-radius: 16px;
  outline: none;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: 2px;
  text-align: right;
  direction: ltr;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

#search-query::placeholder,
#portal-password::placeholder {
  color: #b7c1c0;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
}

#search-query:focus,
#portal-password:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 5px rgba(226, 167, 59, 0.12);
}

#search-query[aria-invalid="true"],
#portal-password[aria-invalid="true"] {
  border-color: var(--red);
  box-shadow: 0 0 0 5px rgba(182, 66, 66, 0.09);
}

.digit-counter {
  position: absolute;
  top: 50%;
  left: 17px;
  color: #92a3a6;
  font-size: 11px;
  direction: ltr;
  transform: translateY(-50%);
}

#input-hint {
  display: block;
  margin-top: 8px;
  color: #859699;
  font-size: 11px;
}

.primary-button {
  width: 100%;
  height: 61px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 25px;
  padding-inline: 24px;
  color: #fff;
  background: linear-gradient(135deg, #0b4b59, var(--ink));
  border-radius: 16px;
  box-shadow: 0 15px 30px rgba(8, 45, 58, 0.2);
  cursor: pointer;
  font-weight: 800;
  transition: transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
}

.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(8, 45, 58, 0.25);
}

.primary-button:active {
  transform: translateY(0);
}

.primary-button:focus-visible,
.secondary-button:focus-visible,
.text-button:focus-visible {
  outline: 3px solid var(--gold-light);
  outline-offset: 3px;
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.78;
  transform: none;
}

.button-arrow {
  margin-right: auto;
  font-size: 20px;
  transition: transform 150ms ease;
}

.primary-button:hover .button-arrow {
  transform: translateX(-4px);
}

.button-loader {
  display: none;
  width: 19px;
  height: 19px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.primary-button.is-loading .button-loader {
  display: block;
}

.primary-button.is-loading .button-arrow {
  display: none;
}

.form-message {
  min-height: 21px;
  margin: 11px 0 -4px;
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
}

.max-score-note {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  padding-top: 19px;
  border-top: 1px solid var(--line);
}

.max-score-note > span {
  min-width: 52px;
  color: var(--gold);
  font-size: 27px;
  font-weight: 900;
  direction: ltr;
}

.max-score-note p {
  margin: 0;
  color: #758a8e;
  font-size: 12px;
}

.max-score-note strong {
  color: var(--ink-soft);
}

.candidates-panel {
  position: relative;
  overflow: hidden;
  margin-top: 38px;
  padding: clamp(26px, 5vw, 46px);
  background: var(--paper);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  animation: reveal 420ms ease both;
}

.candidates-panel::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, var(--teal), var(--gold));
}

.candidates-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.candidates-header h2 {
  margin: 7px 0 6px;
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -0.7px;
}

.candidates-header p {
  margin: 0;
  color: #74898d;
  font-size: 12px;
}

.candidates-count {
  flex: 0 0 auto;
  padding: 9px 14px;
  color: var(--teal);
  background: rgba(14, 127, 118, 0.09);
  border: 1px solid rgba(14, 127, 118, 0.16);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.candidates-list {
  display: grid;
  gap: 10px;
  margin-top: 26px;
}

.candidate-card {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  padding: 17px 18px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  cursor: pointer;
  text-align: right;
  transition: border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.candidate-card:hover {
  border-color: rgba(226, 167, 59, 0.65);
  box-shadow: 0 12px 26px rgba(8, 45, 58, 0.08);
  transform: translateY(-2px);
}

.candidate-card:focus-visible {
  outline: 3px solid rgba(226, 167, 59, 0.35);
  outline-offset: 2px;
}

.candidate-order {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--gold);
  background: rgba(226, 167, 59, 0.1);
  border-radius: 12px;
  direction: ltr;
  font-size: 12px;
  font-weight: 900;
}

.candidate-identity {
  min-width: 0;
}

.candidate-identity strong,
.candidate-identity small {
  display: block;
}

.candidate-identity strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.candidate-identity small {
  margin-top: 5px;
  color: #7c8e91;
  font-size: 10px;
  direction: rtl;
}

.candidate-status {
  padding: 7px 10px;
  color: var(--ink-soft);
  background: #f1f3ed;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
}

.candidate-arrow {
  color: var(--gold);
  font-size: 20px;
}

.candidates-note {
  margin: 17px 0 0;
  padding: 13px 16px;
  color: var(--orange);
  background: rgba(187, 108, 34, 0.08);
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
}

.result-panel {
  position: relative;
  overflow: hidden;
  margin-top: 38px;
  padding: clamp(26px, 5vw, 52px);
  background: var(--paper);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  animation: reveal 420ms ease both;
}

.result-panel__accent {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 7px;
  background: linear-gradient(90deg, var(--teal), var(--gold));
}

.result-header,
.student-identity,
.score-layout,
.performance,
.result-actions {
  position: relative;
  z-index: 1;
}

.result-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.result-kicker {
  color: var(--teal);
  letter-spacing: 0.4px;
}

.result-header h2 {
  margin: 7px 0 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.7px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 15px;
  color: var(--green);
  background: rgba(22, 127, 85, 0.1);
  border: 1px solid rgba(22, 127, 85, 0.18);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.status-badge[data-tone="warning"] {
  color: var(--orange);
  background: rgba(187, 108, 34, 0.1);
  border-color: rgba(187, 108, 34, 0.18);
}

.status-badge[data-tone="danger"] {
  color: var(--red);
  background: rgba(182, 66, 66, 0.1);
  border-color: rgba(182, 66, 66, 0.18);
}

.student-identity {
  display: flex;
  align-items: center;
  gap: 19px;
  margin-top: 34px;
  padding: 25px;
  background: #f4f2e9;
  border: 1px solid rgba(8, 45, 58, 0.07);
  border-radius: var(--radius-md);
}

.student-avatar {
  flex: 0 0 auto;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #15566a, var(--ink));
  border-radius: 18px;
  box-shadow: 0 10px 22px rgba(8, 45, 58, 0.18);
  font-size: 27px;
  font-weight: 900;
}

.student-identity span {
  color: #809093;
  font-size: 11px;
}

.student-identity h3 {
  margin: 5px 0 7px;
  color: var(--ink);
  font-size: clamp(18px, 3vw, 26px);
  line-height: 1.5;
}

.student-identity p {
  margin: 0;
  color: #6e8388;
  font-size: 12px;
}

.student-identity b {
  color: var(--ink);
  font-size: 13px;
}

.score-layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  align-items: center;
  gap: 38px;
  margin-top: 34px;
}

.score-ring {
  --score: 0deg;
  position: relative;
  width: 170px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--gold) var(--score), #e5e7df 0);
  box-shadow: inset 0 0 0 1px rgba(8, 45, 58, 0.04);
}

.score-ring::before {
  content: "";
  position: absolute;
  inset: 19px;
  width: 132px;
  aspect-ratio: 1;
  background: var(--paper);
  border-radius: 50%;
}

.score-ring > div {
  position: relative;
  z-index: 1;
  text-align: center;
}

.score-ring strong,
.score-ring span {
  display: block;
}

.score-ring strong {
  color: var(--ink);
  font-size: 30px;
  font-weight: 900;
  direction: ltr;
}

.score-ring span {
  margin-top: 3px;
  color: #829294;
  font-size: 10px;
}

.score-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.score-card {
  min-height: 118px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.score-card > span {
  margin-bottom: 12px;
  color: #75898d;
  font-size: 11px;
}

.score-card > strong {
  color: var(--ink);
  font-size: 27px;
  font-weight: 900;
}

.score-card > strong b {
  font-weight: 900;
}

.score-card small {
  color: #9ca9a9;
  font-size: 13px;
  font-weight: 600;
}

.performance {
  margin-top: 32px;
  padding: 25px;
  background: rgba(8, 45, 58, 0.035);
  border-radius: 18px;
}

.performance__labels {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: #6e8388;
  font-size: 11px;
}

.performance__labels b {
  color: var(--ink);
}

.progress-track {
  height: 9px;
  overflow: hidden;
  margin-top: 13px;
  background: #dfe4df;
  border-radius: 999px;
  direction: rtl;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--gold-light), var(--gold));
  border-radius: inherit;
  transition: width 700ms cubic-bezier(.2, .8, .2, 1);
}

.performance p {
  margin: 14px 0 0;
  color: #596f75;
  font-size: 12px;
  line-height: 1.8;
}

.result-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
}

.secondary-button,
.text-button {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  background: var(--ink);
}

.text-button {
  color: var(--ink);
  background: transparent;
}

.help-strip {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 18px;
  margin-top: 34px;
  padding: 24px 28px;
  color: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.045);
}

.help-strip__number {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  color: var(--gold-light);
  border: 1px solid rgba(244, 200, 99, 0.28);
  border-radius: 13px;
  font-size: 20px;
  font-weight: 900;
}

.help-strip h2,
.help-strip p {
  margin: 0;
}

.help-strip h2 {
  margin-bottom: 5px;
  color: #fff;
  font-size: 14px;
}

.help-strip p {
  color: rgba(255, 255, 255, 0.53);
  font-size: 11px;
  line-height: 1.7;
}

.help-strip__line {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.privacy-note {
  max-width: 260px;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0 30px;
  color: rgba(255, 255, 255, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 10px;
}

footer p {
  margin: 0;
}

.noscript-message {
  position: fixed;
  right: 20px;
  bottom: 20px;
  left: 20px;
  z-index: 100;
  padding: 15px;
  color: #fff;
  background: var(--red);
  border-radius: 12px;
  text-align: center;
}

.login-page {
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-shell {
  width: min(100%, 455px);
}

.login-card {
  position: relative;
  overflow: hidden;
  padding: clamp(30px, 7vw, 48px);
  color: var(--ink);
  background:
    radial-gradient(circle at 100% 0%, rgba(226, 167, 59, 0.15), transparent 31%),
    var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  text-align: center;
}

.login-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, var(--teal), var(--gold-light));
}

.login-card__mark {
  margin: 0 auto 24px;
}

.login-card .eyebrow {
  margin-bottom: 14px;
  color: var(--teal);
  background: rgba(14, 127, 118, 0.07);
  border-color: rgba(14, 127, 118, 0.16);
}

.login-card h1 {
  margin: 0;
  font-size: clamp(30px, 7vw, 40px);
  letter-spacing: -1px;
}

.login-card > p {
  margin: 12px auto 0;
  color: #708589;
  font-size: 13px;
  line-height: 1.8;
}

.login-form {
  margin-top: 30px;
  text-align: right;
}

.login-form label {
  display: block;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 800;
}

#portal-password {
  padding-left: 20px;
  letter-spacing: 1px;
  text-align: right;
  direction: ltr;
}

.login-error {
  margin: 10px 0 -7px;
  color: var(--red);
  font-size: 11px;
  font-weight: 800;
  text-align: right;
}

.login-security {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 25px;
  color: #829497;
  font-size: 9px;
}

.login-security i {
  width: 7px;
  height: 7px;
  background: #55c991;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(85, 201, 145, 0.11);
}

[hidden] {
  display: none !important;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .main-shell {
    padding-top: 12px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 46px;
    min-height: 0;
  }

  .hero__copy {
    padding-top: 45px;
    padding-bottom: 0;
    text-align: center;
  }

  .hero__copy > p {
    margin-inline: auto;
  }

  .quick-facts {
    justify-content: center;
  }

  .search-card {
    width: min(100%, 620px);
    margin-inline: auto;
  }
}

@media (max-width: 620px) {
  .site-header,
  .main-shell,
  footer {
    width: min(100% - 24px, 1180px);
  }

  .site-header {
    min-height: 82px;
  }

  .brand__mark {
    width: 43px;
    height: 43px;
    border-radius: 14px 14px 4px 14px;
  }

  .brand strong {
    font-size: 15px;
  }

  .brand small {
    font-size: 9px;
  }

  .header-badge {
    display: none;
  }

  .logout-form button {
    min-height: 37px;
    padding-inline: 12px;
    font-size: 10px;
  }

  .main-shell {
    padding-bottom: 48px;
  }

  .hero {
    gap: 34px;
  }

  .hero__copy {
    padding-top: 32px;
  }

  .eyebrow {
    margin-bottom: 16px;
  }

  .hero h1 {
    font-size: clamp(44px, 14vw, 62px);
    letter-spacing: -2.4px;
  }

  .hero__copy > p {
    margin-top: 22px;
    font-size: 15px;
    line-height: 1.9;
  }

  .quick-facts {
    gap: 12px 17px;
    margin-top: 25px;
    font-size: 11px;
  }

  .search-card {
    padding: 27px 20px;
    border-radius: 24px;
  }

  .search-card__top h2 {
    font-size: 22px;
  }

  .step-number {
    font-size: 34px;
  }

  #result-form {
    margin-top: 27px;
  }

  #search-query,
  #portal-password {
    height: 62px;
    font-size: 21px;
  }

  .search-mode {
    padding-inline: 7px;
    font-size: 11px;
  }

  .candidates-panel {
    padding: 28px 17px;
    border-radius: 24px;
  }

  .candidates-header {
    display: block;
  }

  .candidates-count {
    display: inline-block;
    margin-top: 13px;
  }

  .candidate-card {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    padding: 15px 13px;
  }

  .candidate-status {
    display: none;
  }

  .result-panel {
    padding: 30px 18px;
    border-radius: 24px;
  }

  .result-header {
    display: block;
  }

  .status-badge {
    margin-top: 15px;
  }

  .student-identity {
    align-items: flex-start;
    padding: 20px 16px;
  }

  .student-avatar {
    width: 52px;
    height: 52px;
    border-radius: 15px;
    font-size: 23px;
  }

  .score-layout {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 28px;
  }

  .score-cards {
    width: 100%;
  }

  .score-card {
    min-height: 105px;
    padding: 17px;
  }

  .score-card > strong {
    font-size: 23px;
  }

  .performance {
    padding: 21px 17px;
  }

  .result-actions {
    justify-content: center;
  }

  .help-strip {
    grid-template-columns: auto 1fr;
    padding: 20px;
  }

  .help-strip__line,
  .privacy-note {
    display: none;
  }

  footer {
    display: block;
    text-align: center;
    line-height: 1.8;
  }
}

@media (max-width: 390px) {
  .score-cards {
    grid-template-columns: 1fr;
  }

  .result-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  @page {
    margin: 14mm;
    size: A4;
  }

  body {
    color: #000;
    background: #fff;
  }

  .site-header,
  .hero,
  .candidates-panel,
  .help-strip,
  footer,
  .result-actions,
  .page-glow {
    display: none !important;
  }

  .main-shell {
    width: 100%;
    padding: 0;
  }

  .result-panel {
    display: block !important;
    margin: 0;
    border: 1px solid #ddd;
    box-shadow: none;
  }
}
