.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  align-items: start;
}
.dashboard-main {
  min-width: 0;
}
.dashboard-welcome {
  margin-bottom: 38px;
}
.dashboard-welcome h2 {
  margin-bottom: 10px;
  font-size: clamp(32px, 3vw, 40px);
}
.dashboard-welcome h2 span {
  color: var(--accent);
}
.dashboard-welcome p {
  width: fit-content;
  max-width: 100%;
  margin: 0;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 13px;
}
.dashboard-section {
  margin-top: 30px;
}
.dashboard-section .section-head {
  margin-bottom: 14px;
}
.dashboard-section .section-head h2 {
  font-size: 24px;
}
.section-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-soft);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
}
.section-link:hover {
  color: var(--accent);
}

.current-tests {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.current-test-card {
  position: relative;
  min-height: 158px;
  overflow: hidden;
  padding: 22px 23px 19px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.current-test-card__art {
  position: absolute;
  right: -52px;
  bottom: -98px;
  width: 220px;
  height: 220px;
  color: color-mix(in srgb, var(--text-soft) 14%, transparent);
  pointer-events: none;
}
.current-test-card__art circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 10;
}
.current-test-card__head {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.current-test-card h3 {
  margin: 0;
  font-size: 27px;
}
.current-test-card__deadline {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.current-test-card__content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-top: 20px;
}
.current-test-card__info {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 9px;
  color: var(--text-soft);
  font-size: 11px;
}
.current-test-card__info span + span::before {
  content: "·";
  margin-right: 9px;
  color: var(--text-faint);
}
.current-test-card .btn {
  min-width: 132px;
}

.recent-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.result-card {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  padding: 14px 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  text-decoration: none;
}
.result-card:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
}
.result-card__main,
.result-card__score {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.result-card__main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
.result-card__main span,
.result-card__score span {
  color: var(--text-faint);
  font-size: 10px;
}
.result-card__score strong {
  color: var(--green);
  font-size: 12px;
}
.result-card__link {
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.dashboard-aside {
  position: sticky;
  top: calc(var(--header-height) + 20px);
  display: grid;
  gap: 16px;
}
.aside-card {
  padding: 20px;
}
.aside-card h2 {
  margin-bottom: 12px;
  font-size: 21px;
}
.statistics-list {
  margin: 0;
}
.statistics-row {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}
.statistics-row:last-child {
  border-bottom: 0;
}
.statistics-row dt {
  color: var(--text-soft);
  font-size: 12px;
}
.statistics-row dd {
  margin: 0;
  font-size: 18px;
  font-weight: 850;
}
.prepare-card p {
  margin-bottom: 18px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.55;
}

@media (max-width: 1050px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }
  .dashboard-aside {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 740px) {
  .dashboard-welcome {
    margin-bottom: 28px;
  }
  .current-tests,
  .recent-results,
  .dashboard-aside {
    grid-template-columns: 1fr;
  }
  .current-test-card {
    min-height: 162px;
  }
  .current-test-card__content {
    align-items: stretch;
    flex-direction: column;
  }
  .current-test-card .btn {
    width: 100%;
  }
  .result-card {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .result-card__link {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .dashboard-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .dashboard-aside {
    order: -1;
    position: static;
    width: 100%;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .dashboard-main {
    order: 0;
  }
  .dashboard-welcome {
    margin-bottom: 24px;
  }
  .aside-card {
    padding: 17px;
  }
}

.dashboard-layout {
  grid-template-areas:
    "welcome aside"
    "main aside";
  row-gap: 0;
}

.dashboard-welcome {
  grid-area: welcome;
  min-width: 0;
}

.dashboard-main {
  grid-area: main;
}

.dashboard-aside {
  grid-area: aside;
}

.dashboard-main > .dashboard-section:first-child {
  margin-top: 0;
}

@media (max-width: 1050px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "welcome"
      "aside"
      "main";
    row-gap: 20px;
  }

  .dashboard-welcome {
    margin-bottom: 0;
  }
}

@media (max-width: 760px) {
  .dashboard-layout {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
      "welcome"
      "aside"
      "main";
    gap: 14px;
  }

  .dashboard-welcome {
    order: initial;
    margin: 0 0 4px;
  }

  .dashboard-aside {
    order: initial;
    margin: 0 0 4px;
  }

  .dashboard-main {
    order: initial;
  }
}

@media (max-width: 760px) {
  .dashboard-welcome {
    text-align: center;
  }
  .dashboard-welcome h2 {
    margin-inline: auto;
  }
  .dashboard-welcome p {
    margin-inline: auto;
    text-align: center;
  }
}

.dashboard-welcome h3 {
  margin-bottom: 10px;
  font-size: clamp(28px, 2.5vw, 34px);
  line-height: 1.15;
}
.dashboard-welcome h3 span {
  color: var(--accent);
}
.dashboard-section .section-head h3 {
  font-size: 22px;
}
.aside-card h3 {
  margin-bottom: 12px;
  font-size: 19px;
}
@media (max-width: 760px) {
  .dashboard-welcome h3 {
    margin-inline: auto;
  }
}
