/* Навигация задаёт контраст; учебный текст остаётся на спокойном светлом фоне. */
:root {
  --accent: #075795;
  --accent-dark: #063d6a;
  --accent-soft: #e8f5fb;
  --cyan: #009bb9;
  --ink: #183148;
  --muted: #52697c;
  --paper: #f0f4f8;
  --line: #d4e0eb;
  --nav-ink: #0b3155;
}

.topbar { border-bottom-color: #c7d8e7; box-shadow: 0 2px 12px #153d6010; }
.brand { color: #0b3155; }
h1 { color: #102f4b; font-weight: 760; }
.eyebrow { color: #006b83; letter-spacing: 1.4px; font-size: 11px; }
.back { display: inline-flex; align-items: center; min-height: 36px; margin-bottom: 16px; font-weight: 650; }
.card { border-color: #d1deea; box-shadow: 0 3px 16px #153d6007; }
.button { box-shadow: 0 3px 7px #073e7314; }
.button.secondary { border-color: #a9c4d9; box-shadow: none; }
.section-heading h2 { color: #0b3c61; font-weight: 730; }
.count { color: #064b70; background: #dceef7; font-weight: 700; }

/* Высокий контраст и положение маркера различают текущий пункт и наведение. */
.sidebar { background: var(--nav-ink); border-right: 1px solid #173f63; }
.sidebar .nav-caption { color: #b7d5eb; font-weight: 650; }
.sidebar nav { gap: 9px; }
.sidebar nav a {
  min-height: 52px;
  color: #e6f1fb;
  border: 1px solid transparent;
  border-radius: 10px;
  line-height: 1.45;
  font-weight: 550;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.sidebar nav a > span { color: #a4d5ed; flex: 0 0 22px; }
.sidebar .nav-icon svg { display: block; width: 22px; height: 22px; flex: none; }
.sidebar nav a[aria-current] {
  color: #073a59;
  background: #dcf5ff;
  border-color: #b1e0f1;
  box-shadow: 0 5px 15px #001b3426;
  font-weight: 750;
}
.sidebar nav a[aria-current] > span { color: #075d82; }
.sidebar nav a::before { background: #32cee1; width: 4px; }
.sidebar nav a[aria-current]::before { background: #007990; }
.sidebar nav a:focus-visible {
  outline: 3px solid #79e3f2;
  outline-offset: 3px;
  background: #184b70;
  color: #fff;
}
.sidebar nav a[aria-current]:focus-visible { background: #dcf5ff; color: #073a59; }
.sidebar-foot { border-top: 1px solid #335573; margin-top: auto; }
.sidebar-foot a { color: #c5dfef; font-size: 12px; min-height: 34px; }

.course-card { border-top: 4px solid #008aa6; }
.course-card .text-link { color: #075795; font-size: 13px; }
.task-card { border-left: 4px solid #008797; }
.task-card .badge { background: #dff2f4; color: #005c68; }
.task-card .card-bottom { border-color: #d1e4e9; }
.info-panel { background: #e5f2f9; border: 1px solid #c1dce9; border-left: 4px solid #0878a5; }
.info-panel h3 { color: #103e5c; }
.info-panel p { color: #405e74; }
.score-pill { background: #0a4975; color: #fff; border: 1px solid #0a4975; }
.results-table thead th { background: #123e60; color: #fff; border-color: #345d7a; }
.results-table thead th small { color: #d0e7f6; }
.results-table tbody tr:nth-child(even) { background: #f3f8fc; }
.results-table tbody tr:hover { background: #e5f2f8; }
.result-total { color: #065575; }
.feedback { border: 1px solid #b7d8c5; border-left: 4px solid #287153; }

/* Обложка выделяет точку входа; содержимое карточки остаётся доступным текстом. */
.catalog-heading { max-width: 850px; margin: 0 0 30px; }
.catalog-heading .lead { color: #4b6275; font-size: 16px; }
.catalog-grid { align-items: stretch; }
.catalog-grid .course-tile { padding: 0; overflow: hidden; display: flex; flex-direction: column; border-top: 0; margin: 0; }
.course-tile-cover {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; min-height: 118px; padding: 22px 26px;
  background: linear-gradient(118deg, #0c3458, #075d82);
  border-bottom: 3px solid #35bad1;
}
.course-tile-cover .badge { background: #d6f4fa; color: #06415d; font-size: 10px; white-space: nowrap; }
.course-tile-drawing { width: 155px; height: 78px; flex: 0 1 155px; min-width: 70px; color: #8bddec; fill: #d8f7ff; }
.course-tile-copy { flex: 1; display: flex; flex-direction: column; padding: 26px; }
.course-tile .course-tile-copy h2 { color: #123b5b; font-size: 24px; line-height: 1.35; margin: 0 0 15px; }
.course-tile .course-tile-copy p { font-size: 14px; line-height: 1.75; color: #4b6275; margin: 0 0 24px; }
.course-tile-link { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 17px; margin-top: auto; border-top: 1px solid #d5e3ed; color: #075795; font-size: 14px; font-weight: 750; }
.course-tile-link > span { flex: 0 0 32px; display: grid; place-items: center; height: 32px; border-radius: 50%; background: #e0f2f8; font-size: 19px; }
.course-tile:focus-visible { outline: 3px solid #007b9a; outline-offset: 4px; }

/* Программа: сначала курс, затем модуль, затем отдельное занятие. */
.course-overview { position: relative; padding: 28px 32px; margin-bottom: 32px; background: #fff; border: 1px solid #c8dce9; border-left: 5px solid #008ba6; border-radius: 16px; }
.course-overview h1 { max-width: 1000px; font-size: clamp(28px, 2.9vw, 38px); }
.course-overview .lead { color: #466177; font-size: 16px; max-width: 900px; }
.course-start { margin-top: 4px; gap: 16px; }
.course-program-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin: 0 0 18px; scroll-margin-top: 24px; }
.course-program-heading h2 { font-size: 25px; color: #133b59; margin: 0; }
.course-program-heading .eyebrow { margin-bottom: 6px; }
.course-program-heading p { max-width: 390px; font-size: 13px; color: #52697c; margin: 0; }
.course-module-nav { display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.course-module-nav a { padding: 9px 13px; gap: 8px; font-size: 12px; border: 1px solid #bfd3e2; background: #fff; color: #214d6a; min-height: 44px; min-width: 0; overflow-wrap: anywhere; }
.course-module-nav a > span { font-size: 11px; color: #006d82; font-weight: 800; }
.course-module-nav a:hover { border-color: #6aaac4; background: #eaf6fb; }
.card.course-module { overflow: hidden; padding: 0; margin-bottom: 28px; border-color: #bfd3e2; scroll-margin-top: 24px; }
.course-module-head { display: flex; gap: 18px; align-items: center; padding: 22px 26px; background: #123e60; color: #fff; }
.course-module-index { flex: 0 0 48px; height: 48px; display: grid; place-items: center; font-size: 22px; font-weight: 750; background: #215574; border: 1px solid #52839d; border-radius: 10px; color: #d5f6ff; font-variant-numeric: tabular-nums; }
.course-module-label { display: block; margin-bottom: 5px; font-size: 10px; letter-spacing: 1.2px; color: #b8e0f0; font-weight: 650; }
.course-module-head h2 { margin: 0; font-size: 21px; color: #fff; }
.course-module-head > div { min-width: 0; }
.course-module-lessons { padding: 8px 20px; }
.course-module-lessons > .muted { padding: 12px 6px; }
.course-module .lesson-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 18px; padding: 20px 8px; color: #17374f; border-top: 1px solid #d9e5ed; border-radius: 0; transition: background-color .16s ease; }
.course-module .lesson-row:first-child { border-top: 0; }
.course-module .lesson-row:hover { text-decoration: none; background: #edf7fb; }
.course-module .lesson-row:focus-visible { outline: 3px solid #007b9a; outline-offset: -3px; border-radius: 8px; }
.course-module .lesson-number { display: grid; place-items: center; align-self: center; width: 44px; height: 44px; font-variant-numeric: tabular-nums; border: 1px solid #c5dce9; border-radius: 11px; background: #edf6fb; color: #07527d; font-size: 17px; font-weight: 750; }
.course-lesson-copy { min-width: 0; }
.course-lesson-label { display: block; margin-bottom: 4px; font-size: 10px; letter-spacing: .8px; color: #38657f; font-weight: 700; }
.course-module .lesson-row h3 { font-size: 17px; font-weight: 700; }
.course-module .lesson-row small { display: block; margin-top: 5px; font-size: 12px; line-height: 1.5; color: #52697c; }
.course-module .course-lesson-open { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 19px; color: #086b8b; }
.course-lesson-open > span { font-size: 12px; font-weight: 700; }
.course-module .lesson-row-supplementary .lesson-number { border-style: dashed; background: #fff; }

@media (hover: hover) and (pointer: fine) {
  .sidebar nav a:hover { background: #194a6d; color: #fff; border-color: #376380; transform: none; box-shadow: none; }
  .sidebar nav a:hover > span { color: #a1e7f3; transform: none; }
  .sidebar nav a[aria-current]:hover { background: #c7edf9; color: #073a59; border-color: #b1e0f1; }
  .sidebar nav a[aria-current]:hover > span { color: #075d82; }
  a.course-tile:hover { border-color: #6dabc5; box-shadow: 0 8px 24px #123e601a; }
}

@media (max-width: 760px) {
  .topbar { padding-left: 12px; padding-right: 12px; gap: 12px; }
  .topbar .brand { flex-shrink: 0; }
  .topbar .account { min-width: 0; flex: 1; justify-content: flex-end; gap: 4px; }
  .topbar .account > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar .account small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar .account form { flex: 0 0 auto; }
  .sidebar { padding: 10px; border-bottom: 3px solid #1582a4; }
  .sidebar nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; gap: 6px; }
  .sidebar nav a { padding: 9px 10px; gap: 8px; min-height: 46px; white-space: normal; font-size: 12px; }
  .sidebar nav a > span { font-size: 17px; flex-basis: 22px; min-width: 22px; }
  .sidebar nav a::before { left: 0; right: auto; top: 22%; bottom: 22%; width: 3px; height: auto; }
  .course-overview { padding: 23px 20px; margin-bottom: 26px; }
  .course-overview h1 { font-size: 28px; }
  .course-overview .lead { font-size: 14px; }
  .course-program-heading { display: block; }
  .course-program-heading h2 { font-size: 23px; }
  .course-program-heading p { margin-top: 9px; }
  .course-module-nav { gap: 7px; margin-bottom: 20px; }
  .course-module-nav a { padding: 8px 11px; font-size: 12px; width: 100%; }
  .course-module-head { padding: 18px; gap: 12px; }
  .course-module-head h2 { font-size: 18px; }
  .course-module-index { flex-basis: 40px; height: 40px; font-size: 19px; }
  .course-module-lessons { padding: 4px 12px; }
  .course-module .lesson-row { grid-template-columns: 34px minmax(0, 1fr) 20px; gap: 10px; padding: 18px 3px; }
  .course-module .lesson-number { width: 34px; height: 36px; font-size: 14px; border-radius: 9px; }
  .course-module .lesson-row h3 { font-size: 16px; }
  .course-module .lesson-row small { font-size: 11px; }
  .course-lesson-open > span { display: none; }
  .catalog-heading { margin-bottom: 24px; }
  .catalog-heading .lead { font-size: 14px; }
  .course-tile-cover { padding: 20px; min-height: 106px; }
  .course-tile-drawing { width: 120px; height: 64px; }
  .course-tile-copy { padding: 22px 20px; }
  .course-tile .course-tile-copy h2 { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar nav a, .sidebar nav a > span, .sidebar nav a::before,
  .course-tile, .course-module .lesson-row { transition: none !important; transform: none !important; }
}

@media (max-width: 380px) {
  .course-overview h1 { font-size: 24px; }
}

/* Оценка времени отделена от фактического прогресса студента. */
.study-time{display:flex;align-items:center;gap:10px 18px;flex-wrap:wrap;margin:0 0 20px;color:#355b76;font-size:13px}.study-time>span{display:inline-flex;gap:8px;flex-wrap:wrap;padding:7px 11px;background:#fff;border:1px solid #bfd8ea;border-radius:8px}.study-time strong{color:#075496;white-space:nowrap}.study-time small{font-size:12px;color:#536b80}

/* Личные данные и навигация по уровню обучения. */
.account-profile { color: var(--ink, #15354d); text-decoration: none; overflow-wrap: anywhere; }
.account-profile:hover { color: #005a9e; text-decoration: underline; }
.profile-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(230px, 1fr); gap: 24px; align-items: start; }
.profile-layout .form-card { max-width: none; }
.profile-account dd { margin: 4px 0 20px; font-weight: 700; overflow-wrap: anywhere; }
.profile-account dt { color: #52677a; }
.education-tag { display: inline-flex; padding: 7px 12px; background: #e2f2f7; border: 1px solid #a6cddc; border-radius: 9px; color: #16526c; font-weight: 600; }
.catalog-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 16px; }
.catalog-filters p { flex: 1 1 210px; margin: 0; min-width: 0; }
.catalog-filters select { width: 100%; }
.catalog-filters > a { padding: 12px 0; }
.sidebar-foot a { margin-top: 12px; }
@media (max-width: 720px) { .profile-layout { grid-template-columns: minmax(0, 1fr); } .account-profile { max-width: 180px; font-size: 13px; } }
.topbar .account-profile { min-width: 0; }
.topbar .account-profile small { display: block; }

.topbar { height: auto; min-height: 82px; padding-top: 10px; padding-bottom: 10px; }
@media (max-width: 720px) { .topbar { min-height: 70px; } }
.group-tabs{display:flex;flex-wrap:wrap;gap:10px;margin:0 0 24px}.group-tabs a{padding:10px 18px;border:1px solid #aacde2;border-radius:10px;background:#fff;color:#0c578b}.group-tabs a[aria-current]{background:#123e60;color:white;border-color:#123e60}
