/* Заявки в университеты.
   Цвет здесь несёт смысл: красный — дедлайн сегодня, жёлтый — в ближайшие 7 дней, чернильный — дальше. */

:root {
  color-scheme: light;
  --paper: #f1f4f6;
  --card: #ffffff;
  --ink: #0f1d36;
  --muted: #56627c;
  --line: #d3d9e2;
  --red: #d6272b;
  --amber: #f2b01e;
  --amber-ink: #2a1b00;
  --radius: 6px;
  --font: "Onest", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.5 var(--font);
}

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

.wrap {
  width: min(1120px, 100% - 32px);
  margin-inline: auto;
}

@media (min-width: 720px) {
  .wrap { width: min(1120px, 100% - 64px); }
}

/* Шапка */

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-block: 16px;
}

.brand { font-weight: 600; }

.link {
  appearance: none;
  border: 0;
  background: none;
  padding: 6px 0;
  font: inherit;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.link:hover { color: var(--ink); }

/* Плакат с ближайшим дедлайном */

.hero {
  margin-block: 8px 24px;
  padding: clamp(24px, 4vw, 48px);
  border-radius: var(--radius);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 1.2rem + 4vw, 4.25rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.hero p {
  margin: 16px 0 0;
  max-width: 62ch;
  font-size: 1.0625rem;
}

.hero p + p { margin-top: 8px; font-weight: 600; }

.hero--today { background: var(--red); color: #fff; }
.hero--soon { background: var(--amber); color: var(--amber-ink); }
.hero--later { background: var(--ink); color: #fff; }
.hero--past { background: var(--line); color: var(--ink); }

/* Карточки */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 16px;
  align-items: start;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  height: 100%;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.card--today { padding: 19px; border: 2px solid var(--red); }
.card--past { background: transparent; color: var(--muted); }

.card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.card h2 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.015em;
}

.card__name {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.card__name [lang] { white-space: nowrap; }

.status {
  flex: none;
  padding: 6px 10px;
  border: 1px dashed var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1;
  white-space: nowrap;
}

.status--set {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
}

/* Раунды подачи: короткая шкала сверху вниз */

.rounds {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.round {
  position: relative;
  display: grid;
  gap: 2px;
  justify-items: start;
  padding: 0 0 18px 28px;
}

.round:last-child { padding-bottom: 0; }

.round::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 0;
  width: 14px;
  height: 14px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--card);
}

.round::after {
  content: "";
  position: absolute;
  top: 22px;
  bottom: 0;
  left: 6px;
  width: 2px;
  background: var(--line);
}

.round:last-child::after { display: none; }

.round__label { color: var(--muted); font-size: 0.875rem; }

.round__date {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.round__when { font-size: 0.9375rem; font-weight: 500; }

.round__hint { color: var(--muted); font-size: 0.8125rem; }

.mark { margin-left: 1px; color: var(--muted); }

.round--today::before { border-color: var(--red); background: var(--red); }
.round--soon::before { border-color: var(--amber); background: var(--amber); }

.round--today .round__when,
.round--soon .round__when {
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.round--today .round__when { background: var(--red); color: #fff; }
.round--soon .round__when { background: var(--amber); color: var(--amber-ink); }

.round--past::before { border-color: var(--line); background: var(--line); }
.round--past .round__date { color: var(--muted); text-decoration: line-through; }
.round--past .round__when { color: var(--muted); }

/* Подвал */

.foot {
  max-width: 70ch;
  margin: 24px 0 48px;
  color: var(--muted);
  font-size: 0.875rem;
}

.foot p { margin: 0 0 4px; }

/* Вход и сообщения */

.gate {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px 16px;
}

.gate__box { width: min(100%, 420px); }

.gate h1 {
  margin: 0 0 12px;
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.gate p { margin: 0 0 24px; color: var(--muted); }

.gate__error {
  padding: 10px 14px;
  border-left: 4px solid var(--red);
  background: var(--card);
  color: var(--ink);
}

.btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.btn:hover { background: #1d3157; }
