/* Visual refresh. Baseline: checkpoint/mvp-before-redesign-2026-10-05. */
@font-face {
  font-family: Onest;
  src: url("fonts/onest-variable.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
:root {
  --ink: #30253b;
  --muted: #706778;
  --line: #e7e1eb;
  --bg: #f6f5f8;
  --soft: #eee5f7;
  --yellow: #f8de7e;
  font-family:
    Onest,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
body {
  -webkit-font-smoothing: antialiased;
}
h1 {
  font-weight: 650;
  letter-spacing: -1.3px;
}
h2,
h3 {
  font-weight: 600;
}
.ui-icon {
  flex-shrink: 0;
  vertical-align: middle;
}
.eyebrow {
  letter-spacing: 0.07em;
  font-size: 11px;
  font-weight: 600;
}
.main {
  padding-top: 36px;
}
.public-header {
  height: 86px;
}
.public-header .brand {
  width: 174px;
}
.public-header .quiet-link {
  color: var(--ink);
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 30px;
  font-size: 13px;
}
.public-header .quiet-link:hover {
  background: var(--bg);
  text-decoration: none;
}
.header-label {
  font-size: 12px;
}
.button {
  border-radius: 12px;
  font-weight: 550;
  min-height: 46px;
  padding: 11px 19px;
}
.button:not(:disabled):active {
  transform: translateY(1px);
}
.secondary {
  border-color: #dcd2e3;
  background: white;
}
.button:disabled:hover {
  background: var(--purple);
}
.button.secondary:disabled:hover {
  background: white;
}
.panel {
  border-radius: 20px;
  border-color: var(--line);
}
.page-context {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 8px;
}
.help-strip {
  background: #ece8f1;
  border-radius: 14px;
  color: #64506e;
}
footer {
  font-size: 11px;
  padding-block: 24px;
  background: transparent;
}

/* One expressive moment on the welcome page; the choices stay quiet. */
.olympiad-hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 32px;
  padding: 34px 48px;
  min-height: 328px;
  background: var(--soft);
  border-radius: 26px;
  overflow: hidden;
}
.hero-subjects {
  color: #6c4a7e;
  font-size: 13px;
  margin-bottom: 20px;
}
.olympiad-hero h1 {
  font-size: clamp(42px, 4.9vw, 66px);
  line-height: 1.05;
  letter-spacing: -2.8px;
  color: var(--purple);
  margin-bottom: 22px;
}
.hero-description {
  color: #6b5478;
  font-size: 15px;
  line-height: 1.55;
  margin: 0;
  max-width: 350px;
}
.hero-illustration {
  display: block;
  width: 100%;
  max-width: 440px;
  height: auto;
  max-height: 300px;
  object-fit: contain;
  justify-self: end;
}
.class-selection {
  margin-top: 38px;
}
.selection-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 20px;
}
.selection-heading h2 {
  font-size: 23px;
  margin: 0;
  letter-spacing: -0.6px;
}
.selection-heading > span {
  font-size: 12px;
  color: var(--muted);
}
.class-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}
.class-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 22px 20px 16px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  transition:
    border-color 0.16s,
    box-shadow 0.16s;
}
.class-card:hover {
  text-decoration: none;
  border-color: #b499c7;
  box-shadow: 0 5px 16px #47245e0a;
}
.class-card-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 24px;
}
.class-card-number {
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-size: 54px;
  font-weight: 550;
  letter-spacing: -2px;
  line-height: 1;
  color: var(--purple);
}
.class-card-number small {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
}
.subject-label {
  font-size: 10px;
  font-weight: 500;
  padding: 4px 7px;
  color: #5c4811;
  background: #f8de7e;
  border-radius: 6px;
}
.class-card-python {
  background: #fbf8ff;
  border-color: #d9cce4;
}
.class-card h3 {
  font-size: 15px;
  line-height: 1.4;
  min-height: 42px;
  margin-bottom: 16px;
  overflow-wrap: anywhere;
}
.class-card-description {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.class-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  color: var(--muted);
  font-size: 11px;
  margin-top: auto;
}
.class-card-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.class-card-meta .ui-icon {
  width: 14px;
  height: 14px;
}
.class-card-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding-top: 15px;
  margin-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  font-weight: 500;
  color: var(--purple);
}
.card-arrow {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #f3eef8;
}
.class-card:hover .card-arrow {
  background: var(--purple);
  color: white;
}
.card-arrow .ui-icon {
  width: 17px;
  height: 17px;
}
.registration-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  margin: 22px 0 0;
}

/* Organizer workspace. */
.sidebar {
  background: #fdfcfe;
  padding: 30px 20px 24px;
}
.sidebar .brand {
  width: 180px;
  margin-bottom: 34px;
}
.workspace-label {
  font-size: 12px;
  letter-spacing: 0;
  margin: 0 12px 18px;
}
.workspace-label span {
  background: transparent;
  color: var(--muted);
  padding: 0;
}
.sidebar nav {
  gap: 6px;
}
.sidebar nav a {
  border-radius: 12px;
  padding: 13px 14px;
  font-weight: 450;
  align-items: center;
  gap: 12px;
  color: #6c6176;
}
.sidebar nav a:hover {
  background: var(--soft);
  text-decoration: none;
  color: var(--purple);
}
.sidebar nav a.active {
  background: var(--purple);
  color: white;
  font-weight: 500;
}
.sidebar nav .ui-icon {
  width: 19px;
  height: 19px;
}
.admin-top {
  background: transparent;
  border: 0;
  height: 68px;
  color: var(--muted);
}
.admin-page .main {
  padding-top: 24px;
}
.page-heading h1 {
  font-size: 34px;
}
.stats {
  padding: 0;
  border: 0;
  gap: 16px;
  background: transparent;
  margin-bottom: 32px;
}
.stats > div {
  position: relative;
  padding: 23px 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
}
.stats > div:last-child {
  border: 1px solid var(--line);
}
.stats > div:first-child {
  background: var(--purple);
  border-color: var(--purple);
  color: white;
}
.stats > div:first-child span {
  color: #e5d6f0;
}
.stats span {
  color: var(--muted);
  font-size: 12px;
}
.stats strong {
  font-size: 42px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -1px;
  margin: 14px 0 0;
}
.stats strong em {
  font-size: 18px;
  color: var(--muted);
}
.section-title h2 {
  font-size: 20px;
  font-weight: 550;
}
.count {
  border-radius: 50%;
  width: 26px;
  height: 26px;
  font-weight: 500;
  background: #e9e1ef;
}
.test-list {
  border-radius: 18px;
}
.test-row {
  padding: 22px 24px;
}
.test-row:hover {
  background: #fdfbff;
}
.test-info h3 {
  font-size: 16px;
  font-weight: 550;
}
.test-info p {
  font-size: 12px;
}
.class-tile {
  border-radius: 14px;
  font-weight: 500;
  background: #f0e7f7;
}
.class-tile.yellow {
  background: #f9e8ad;
  color: #604c17;
}
.badge {
  border-radius: 20px;
  padding: 4px 9px;
  font-weight: 450;
}
.published {
  background: #e9f3ec;
  color: #326044;
}
th {
  background: #f5f2f8;
  color: #706179;
  font-weight: 500;
}
tbody tr:hover {
  background: #fcfaff;
}
.profile .avatar {
  border-radius: 11px;
}

/* Registration, forms and focused task surfaces share the same visual language. */
input[type="text"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="email"],
input[type="url"],
select,
textarea {
  border-radius: 10px;
  border-color: #ddd4e4;
  background: #fefcfe;
}
input:focus,
select:focus,
textarea:focus {
  border-color: #9b76b4;
}
.field label,
form > p > label {
  font-size: 13px;
  font-weight: 500;
  color: #55465f;
}
.registration-aside {
  padding: 22px 26px 26px 0;
}
.registration-aside > .quiet-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.registration-aside > .quiet-link .ui-icon {
  width: 16px;
}
.registration-aside .class-tile.large {
  background: var(--purple);
  color: white;
  width: 84px;
  height: 92px;
  margin: 30px 0 24px;
  border-radius: 20px;
}
.registration-aside h1 {
  font-size: 36px;
  line-height: 1.15;
}
.registration-aside .fact {
  border-color: var(--line);
}
.registration-panel h2 {
  margin-bottom: 24px;
}
.login-panel {
  padding: 36px;
  margin-top: 60px;
}
.login-panel .page-context {
  margin-bottom: 16px;
}
.login-panel h1 {
  margin-bottom: 28px;
}
.duration {
  background: #f7f3fb;
  border: 0;
  border-radius: 14px;
}
.success-icon {
  border-radius: 22px;
  width: 64px;
  height: 64px;
  font-size: 30px;
}
.play-heading .eyebrow {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 6px;
  background: var(--soft);
  margin-bottom: 12px;
  font-size: 10px;
  letter-spacing: 0.04em;
}
.timer-box {
  padding: 11px 20px;
  border-radius: 15px;
  border-color: #e1d3eb;
}
.timer-box strong {
  font-size: 31px;
  font-weight: 550;
  letter-spacing: -0.7px;
}
.question-sidebar {
  border-radius: 16px;
}
.question-nav button {
  font-weight: 500;
  border-color: #e0d6e7;
}
.question-nav button.current {
  box-shadow: 0 2px 5px #602b7a18;
}
.task-copy .eyebrow {
  letter-spacing: 0.055em;
  color: #897295;
}
.task-copy h2 {
  font-weight: 550;
}
.answer-option {
  border-color: #e4dbe9;
  border-radius: 12px;
  padding-block: 17px;
}
.answer-option:has(input:checked) {
  background: #f2eaf8;
}
.python-grid > div {
  border-radius: 12px;
}
.python-pane-label {
  background: #f3edf8;
}
.python-reference summary {
  font-size: 12px;
}
dialog:not(.image-lightbox) {
  border-radius: 22px;
}

@media (max-width: 1100px) {
  .olympiad-hero {
    padding: 34px;
    gap: 16px;
  }
  .class-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .class-card h3 {
    min-height: 0;
  }
  .class-card-top {
    margin-bottom: 20px;
  }
  .stats > div {
    padding: 20px;
  }
}
@media (max-width: 740px) {
  .main {
    padding-top: 24px;
  }
  .public-header {
    height: 76px;
    padding-inline: 20px;
  }
  .public-header .brand {
    width: 145px;
  }
  .public-header .quiet-link {
    padding: 8px 11px;
    font-size: 11px;
  }
  .olympiad-hero {
    grid-template-columns: 1fr;
    padding: 28px;
    border-radius: 20px;
    gap: 22px;
    min-height: auto;
  }
  .olympiad-hero h1 {
    font-size: 46px;
    letter-spacing: -2px;
    margin-bottom: 16px;
  }
  .hero-subjects {
    font-size: 11px;
    margin-bottom: 18px;
  }
  .hero-description {
    font-size: 13px;
  }
  .hero-illustration {
    width: 220px;
    max-height: 150px;
    justify-self: end;
    margin-top: -6px;
  }
  .class-selection {
    margin-top: 28px;
  }
  .selection-heading {
    margin-bottom: 16px;
  }
  .selection-heading h2 {
    font-size: 21px;
  }
  .selection-heading > span {
    display: none;
  }
  .class-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .class-card {
    padding: 19px 15px 12px;
    border-radius: 15px;
  }
  .class-card-number {
    font-size: 46px;
  }
  .class-card-number small {
    font-size: 11px;
  }
  .class-card h3 {
    font-size: 13px;
    min-height: 37px;
  }
  .class-card-top {
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 18px;
  }
  .class-card-meta {
    font-size: 10px;
  }
  .class-card-action {
    font-size: 11px;
    padding-top: 12px;
    margin-top: 12px;
  }
  .card-arrow {
    width: 26px;
    height: 26px;
  }
  .subject-label {
    font-size: 9px;
    padding: 3px 5px;
  }
  .registration-note {
    font-size: 11px;
  }
  .sidebar {
    padding: 18px 20px 14px;
  }
  .sidebar .brand {
    width: 155px;
    margin: 0 0 18px;
  }
  .sidebar nav a {
    padding: 10px 12px;
    font-size: 12px;
    gap: 7px;
    border-radius: 10px;
  }
  .sidebar nav .ui-icon {
    display: none;
  }
  .admin-top {
    height: 44px;
  }
  .admin-page .main {
    padding-top: 18px;
  }
  .page-heading h1 {
    font-size: 29px;
  }
  .page-context {
    font-size: 12px;
  }
  .page-heading .button {
    padding: 10px 12px;
    gap: 5px;
  }
  .page-heading .button .ui-icon {
    width: 16px;
  }
  .stats {
    gap: 8px;
    margin-bottom: 28px;
  }
  .stats > div,
  .stats > div:last-child {
    padding: 16px 11px;
    border-radius: 13px;
  }
  .stats span {
    font-size: 10px;
    line-height: 1.45;
  }
  .stats strong {
    font-size: 29px;
    margin-top: 12px;
  }
  .stats strong em {
    font-size: 13px;
  }
  .test-row {
    padding: 18px;
  }
  .test-info {
    min-width: 0;
  }
  .test-info h3 {
    font-size: 14px;
    overflow-wrap: anywhere;
  }
  .test-info p {
    font-size: 10px;
  }
  .panel {
    border-radius: 16px;
  }
  .registration-aside {
    padding: 0;
  }
  .registration-aside h1 {
    font-size: 27px;
  }
  .registration-panel h2 {
    font-size: 23px;
  }
  .login-panel {
    padding: 26px;
    margin-top: 24px;
  }
  .login-panel h1 {
    font-size: 26px;
  }
  .play-heading h1 {
    font-size: 22px;
  }
  .timer-box {
    padding: 9px 12px;
    min-width: 110px;
  }
  .timer-box strong {
    font-size: 25px;
  }
  .task-copy h2 {
    font-size: 20px;
  }
  .task-panel {
    padding: 20px;
  }
  footer {
    font-size: 10px;
  }
}
@media (max-width: 359px) {
  .olympiad-hero {
    padding: 24px;
  }
  .olympiad-hero h1 {
    font-size: 39px;
  }
  .class-grid {
    grid-template-columns: 1fr;
  }
  .class-card h3 {
    min-height: 0;
  }
  .class-card-top {
    margin-bottom: 12px;
  }
  .stats {
    grid-template-columns: 1fr;
  }
  .stats > div {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
  }
  .stats strong {
    margin: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .class-card {
    transition: none;
  }
  .button:not(:disabled):active {
    transform: none;
  }
}

@media (max-width: 740px) {
  .stats span {
    min-height: 30px;
  }
  .class-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
  .class-card:last-child:nth-child(odd) h3 {
    min-height: 0;
  }
}
@media (max-width: 359px) {
  .page-heading {
    flex-wrap: wrap;
  }
  .stats span {
    min-height: 0;
  }
}

@media (min-width: 741px) and (max-width: 1000px) {
  .play-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  .question-sidebar {
    position: static;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 14px 16px;
  }
  .question-sidebar h3,
  .question-sidebar .legend {
    display: none;
  }
  .question-sidebar .question-nav {
    margin: 0;
  }
  .question-sidebar #progress {
    margin: 0 auto 0 0;
  }
  .question-sidebar > .button {
    width: auto;
  }
}
.python-actions {
  justify-content: flex-start;
}
.task-copy .eyebrow {
  color: #80618f;
}
