/* HSE University brand styling */
@font-face {
  font-family: "HSE Sans";
  src: url("../fonts/HSESans-Thin.otf") format("opentype");
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "HSE Sans";
  src: url("../fonts/HSESans-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "HSE Sans";
  src: url("../fonts/HSESans-Italic.otf") format("opentype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "HSE Sans";
  src: url("../fonts/HSESans-SemiBold.otf") format("opentype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "HSE Sans";
  src: url("../fonts/HSESans-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "HSE Sans";
  src: url("../fonts/HSESans-Black.otf") format("opentype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --hse-blue: #0f2d69;
  --hse-blue-bright: #234b9b;
  --hse-cyan: #0fa0d7;
  --hse-light-blue: #cddcf0;
  --hse-lightest-blue: #f3f6fb;
  --hse-grey-500: #4c5565;
  --hse-grey-200: #dfe5ed;
  --hse-grey-100: #eef2f8;
  --hse-yellow: #ffd746;
  --hse-focus: rgba(15, 45, 105, 0.3);
  --font-sans: "HSE Sans", "HSESans", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
  --text-primary: #1c2433;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--hse-lightest-blue);
  line-height: 1.6;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 45, 105, 0.08) 0%, rgba(205, 220, 240, 0.4) 100%);
  pointer-events: none;
  z-index: -1;
}

a {
  color: var(--hse-blue);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

a:not(.button):not(.site-nav__link):hover,
a:not(.button):not(.site-nav__link):focus {
  color: var(--hse-blue-bright);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--hse-yellow);
  outline-offset: 3px;
}

.page-body {
  display: flex;
  flex-direction: column;
}

.site-header {
  background: var(--hse-blue);
  color: #fff;
}

.site-header__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem 1.5rem;
  gap: 1.5rem;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.95rem;
}

.site-brand__mark {
  display: inline-flex;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid #fff;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.95rem;
  line-height: 1;
}

.site-nav {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.site-nav__link {
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  transition: background 0.2s ease;
}

.site-nav__link:hover,
.site-nav__link:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.site-nav__link[aria-current="page"] {
  background: rgba(255, 255, 255, 0.3);
}

.page-main {
  flex: 1;
  padding: 3rem 1.5rem 4rem;
}

.content-area {
  max-width: 900px;
  margin: 0 auto;
  background: #fff;
  padding: 2.5rem 2.25rem;
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(15, 45, 105, 0.08);
}

h1,
h2,
h3 {
  color: var(--hse-blue);
  margin-top: 0;
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(1.75rem, 2vw + 1rem, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
}

p {
  margin-top: 0;
  margin-bottom: 1.25rem;
}

.lead {
  font-size: 1.125rem;
  color: var(--hse-grey-500);
}

.button,
button,
input[type="submit"],
input[type="button"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--hse-blue);
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.015em;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover,
button:hover,
.button:focus-visible,
button:focus-visible {
  /* background: var(--hse-blue-bright); */
  box-shadow: 0 12px 24px rgba(15, 45, 105, 0.25);
  transform: translateY(-1px);
}

.button--secondary {
  background: var(--hse-cyan);
  color: var(--hse-blue);
}

.notice {
  background: var(--hse-light-blue);
  border-radius: 16px;
  padding: 1.5rem 1.75rem;
  border: 1px solid rgba(15, 45, 105, 0.1);
  margin-bottom: 2rem;
}

.notice strong {
  font-weight: 600;
  color: var(--hse-blue);
}

form {
  margin-top: 2rem;
}

label {
  font-weight: 500;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 2rem;
  border: 1px solid var(--hse-grey-200);
  border-radius: 18px;
  overflow: hidden;
}

thead {
  background: var(--hse-light-blue);
  color: var(--hse-blue);
  font-weight: 600;
}

thead th {
  padding: 0.85rem 1rem;
  text-align: left;
}

tbody td {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--hse-grey-200);
  vertical-align: middle;
}

tbody tr:nth-child(odd) {
  background: var(--hse-grey-100);
}

th:first-child,
td:first-child {
  width: 60%;
}

input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--hse-blue);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.site-footer {
  background: #ffffff;
  border-top: 1px solid var(--hse-grey-200);
  padding: 1.25rem 1.5rem;
  color: var(--hse-grey-500);
}

.site-footer__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

.score-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: grid;
  gap: 0.5rem;
}

.score-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  background: #fff;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(15, 45, 105, 0.12);
}

.score-list li span {
  font-weight: 600;
  color: var(--hse-blue);
}

.footnote {
  font-size: 0.9rem;
  color: var(--hse-grey-500);
  margin-top: 1.5rem;
}


.scale-grid {
  margin-top: 1.25rem;
}

.scale-grid__caption {
  font-size: 1rem;
  margin-bottom: 0.8rem;
  color: var(--text-primary);
  font-weight: 400;
}

.scale-grid__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem;
}

.scale-grid--instruction {
  margin-bottom: 2rem;
}

.scale-grid__button {
  border: none;
  background: var(--hse-blue);
  color: #fff;
  border-radius: 18px;
  padding: 0.85rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.scale-grid__button:hover:not(:disabled),
.scale-grid__button:focus-visible:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(15, 45, 105, 0.25);
}

.scale-grid__button:focus-visible:not(:disabled) {
  outline: 3px solid var(--hse-yellow);
  outline-offset: 3px;
}

.scale-grid__number {
  font-size: 1.4rem;
  font-weight: 700;
}

.scale-grid__label {
  font-size: 0.95rem;
  font-weight: 500;
}

.scale-grid__button--preview {
  cursor: default;
  opacity: 0.95;
}

.scale-grid__button--preview:disabled {
  pointer-events: none;
}

.instruction-content h3 {
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}

.instruction-start {
  margin-top: 2rem;
}


@media (max-width: 720px) {
  .site-header__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .content-area {
    padding: 2rem 1.5rem;
    border-radius: 18px;
  }

  table {
    font-size: 0.95rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
