:root {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: #172a39;
  background: #f5f7f8;
  line-height: 1.5;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
a { color: #0b6572; text-decoration: none; }
a:hover { color: #084b56; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.shell { max-width: 1140px; margin: 0 auto; padding: 0 28px; }
.site-header { background: #fff; border-bottom: 1px solid #e3eaec; }
.header-inner { min-height: 78px; display: flex; justify-content: space-between; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: #173442; white-space: nowrap; }
.brand:hover { color: #173442; }
.brand-mark { width: 42px; height: 42px; border-radius: 12px; background: #0b6572; color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 23px; }
.brand strong, .brand small { display: block; line-height: 1.2; }
.brand strong { font-size: 16px; }
.brand small { color: #73838d; font-size: 11px; margin-top: 4px; letter-spacing: .02em; }
nav { display: flex; align-items: center; gap: 22px; font-size: 14px; }
nav a { color: #385462; font-weight: 600; }
.nav-signup { padding: 10px 16px; border-radius: 9px; background: #e6f2f1; color: #0b6572; }
.user-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #73838d; }
.inline-form { display: inline; }
.text-button { border: 0; background: transparent; color: #0b6572; padding: 0; font-weight: 600; }
main.shell { min-height: calc(100vh - 160px); padding-top: 34px; padding-bottom: 74px; }
.site-footer { border-top: 1px solid #e3eaec; color: #81919b; font-size: 13px; padding: 22px 0; }
.flash { border: 1px solid #b8d8d7; background: #e9f6f4; padding: 14px 18px; border-radius: 10px; margin-bottom: 24px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(30px, 4vw, 48px); line-height: 1.13; letter-spacing: -.035em; margin-bottom: 17px; }
h2 { letter-spacing: -.02em; }
p { color: #667986; }
.eyebrow { display: inline-block; color: #0b7781; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 800; margin-bottom: 12px; }
.hero { padding: 38px 0 30px; max-width: 730px; }
.hero p, .section-head p { font-size: 17px; line-height: 1.6; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.card { min-height: 275px; display: flex; flex-direction: column; background: #fff; border: 1px solid #e0e8eb; border-radius: 16px; padding: 25px; color: #172a39; box-shadow: 0 8px 24px rgba(28, 65, 74, .035); transition: transform .18s, box-shadow .18s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(28, 65, 74, .09); color: #172a39; }
.card-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; background: #e8f3f2; color: #0b6572; margin-bottom: 20px; font-size: 20px; }
.card h2 { font-size: 22px; margin-bottom: 8px; }
.card p { font-size: 14px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { margin-top: auto; display: flex; justify-content: space-between; color: #0b6572; font-size: 14px; font-weight: 700; }
.back { display: inline-block; color: #617985; font-size: 14px; margin: 8px 0 30px; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; margin-bottom: 27px; }
.section-head p { max-width: 710px; margin-bottom: 0; }
.section-head .button { flex: none; }
.button { display: inline-flex; align-items: center; justify-content: center; border: 1px solid #0b6572; background: #0b6572; color: #fff; padding: 12px 20px; border-radius: 9px; font-weight: 700; line-height: 1.2; min-height: 46px; }
.button:hover { color: #fff; background: #084d57; }
.button-secondary { background: #fff; color: #0b6572; border-color: #bfd2d5; }
.button-secondary:hover { color: #084d57; background: #eaf3f3; }
.empty { background: #fff; border: 1px dashed #ccd9de; border-radius: 16px; padding: 52px; text-align: center; }
.empty p { max-width: 470px; margin: 0 auto 23px; }
.lecture-list { background: #fff; border: 1px solid #e0e8eb; border-radius: 15px; overflow: hidden; }
.lecture-row { min-height: 86px; padding: 16px 22px; display: flex; align-items: center; gap: 20px; border-bottom: 1px solid #edf1f2; color: #172a39; }
.lecture-row:last-child { border-bottom: 0; }
a.lecture-row:hover { background: #f6fbfb; color: #172a39; }
.lecture-number { width: 46px; flex: none; color: #9aaeb5; font-size: 19px; font-weight: 800; }
.lecture-main { flex: 1; min-width: 0; }
.lecture-main strong, .lecture-main small { display: block; }
.lecture-main small { color: #8a9ca5; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lecture-status { color: #0b6572; font-weight: 700; font-size: 13px; white-space: nowrap; }
.video-wrap { background: #132631; border-radius: 15px; overflow: hidden; box-shadow: 0 18px 45px rgba(17, 45, 55, .14); }
.video-wrap video { display: block; width: 100%; max-height: 650px; aspect-ratio: 16 / 9; background: #0d1a21; }
.progress-panel { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 22px 0; }
.progress-panel p { font-size: 14px; margin: 7px 0 0; }
.status-pill { display: inline-block; border-radius: 999px; background: #e4f2f0; color: #0b6572; padding: 7px 12px; font-weight: 700; font-size: 12px; white-space: nowrap; }
.success-banner { border: 1px solid #b7d9cf; background: #eaf7f0; border-radius: 11px; padding: 16px 19px; margin-bottom: 20px; }
.success-banner a { font-weight: 700; }
.auth-layout, .form-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 65px; align-items: start; margin-top: 52px; }
.auth-copy { padding: 45px 0; }
.auth-copy p { font-size: 17px; line-height: 1.65; max-width: 470px; }
.panel { background: #fff; border: 1px solid #e0e8eb; border-radius: 16px; padding: 35px; box-shadow: 0 10px 25px rgba(28, 65, 74, .04); }
.panel h2 { font-size: 23px; margin-bottom: 26px; }
label { display: block; color: #334d5a; font-weight: 650; font-size: 14px; margin-bottom: 19px; }
input, textarea, select { display: block; width: 100%; border: 1px solid #cfdcdf; border-radius: 9px; background: #fff; color: #172a39; padding: 12px 13px; margin-top: 8px; outline: 0; }
input:focus, textarea:focus, select:focus { border-color: #0b6572; box-shadow: 0 0 0 3px rgba(11, 101, 114, .12); }
textarea { min-height: 105px; resize: vertical; }
select { appearance: none; padding-right: 42px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m3 6 5 5 5-5' fill='none' stroke='%230b6572' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; }
label small { display: block; color: #9aacb4; font-weight: 400; margin-top: 6px; }
.auth-form .button, .form-panel .button { width: 100%; }
.registration-form form + form { margin-top: 22px; padding-top: 22px; border-top: 1px solid #e0e8eb; }
.registration-bots { display: flex; gap: 10px; margin: 18px 0 24px; }
.registration-edit-actions { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 26px; padding-top: 18px; border-top: 1px solid #e0e8eb; }
.registration-edit-actions form + form { margin: 0; padding: 0; border: 0; }
.registration-steps { padding-left: 23px; color: #617985; line-height: 2; }
.application-details dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 26px; margin: 0; }
.application-details dt { color: #8397a0; font-size: 12px; }
.application-details dd { margin: 4px 0 0; overflow-wrap: anywhere; }
.application-actions { display: flex; gap: 20px; align-items: start; margin-top: 22px; }
.application-actions form { flex: 1; }
.subtle { font-size: 13px; margin: 17px 0 0; text-align: center; }
.form-layout { grid-template-columns: .8fr 1.2fr; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stats div { background: #fff; border: 1px solid #e0e8eb; border-radius: 13px; padding: 22px; }
.stats strong { display: block; font-size: 30px; line-height: 1; }
.stats span { color: #8397a0; font-size: 13px; }
.admin-actions { display: flex; gap: 12px; margin: 28px 0; }
.list-heading { margin: 38px 0 15px; }
.small-button { border: 1px solid #bfd2d5; background: #fff; color: #0b6572; padding: 8px 11px; border-radius: 8px; font-weight: 700; font-size: 12px; }
.small-button:hover { background: #eaf3f3; }
.chat-panel { min-height: 290px; max-height: 600px; overflow-y: auto; background: #fff; border: 1px solid #e0e8eb; border-radius: 15px; padding: 25px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.empty-chat { color: #8ea1a9; margin: auto; text-align: center; }
.chat-bubble { max-width: min(75%, 610px); border-radius: 12px; padding: 13px 17px; background: #eef4f4; }
.chat-own { align-self: flex-end; background: #dcf0ed; }
.chat-bubble span { color: #0b6572; font-size: 12px; font-weight: 800; }
.chat-bubble p { color: #263f4b; margin: 5px 0; white-space: normal; overflow-wrap: anywhere; }
.chat-bubble small { color: #98aab1; font-size: 11px; }
.chat-bubble a { display: block; font-weight: 700; margin: 9px 0; }
.chat-form { max-width: 750px; margin-top: 23px; }
.chat-form .button { margin-top: 4px; }
.certificate-actions { display: flex; justify-content: space-between; align-items: start; }
.certificate { background: #fff; border: 1px solid #d4e0e1; padding: 20px; max-width: 950px; margin: 20px auto 0; box-shadow: 0 18px 45px rgba(17, 45, 55, .08); }
.certificate-border { min-height: 670px; border: 2px solid #0b6572; text-align: center; padding: 30px 50px; display: flex; flex-direction: column; align-items: center; }
.certificate-partners { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 16px; width: 100%; align-items: center; margin-bottom: 20px; }
.certificate-partners img { display: block; max-width: 100%; height: 74px; object-fit: contain; margin: 0 auto 7px; }
.certificate-partners .tektorg-logo { width: 180px; height: auto; max-height: 74px; }
.certificate-partners span { display: block; color: #536c77; font-size: 11px; font-weight: 700; }
.certificate-kicker { letter-spacing: .2em; text-transform: uppercase; color: #0b6572; font-weight: 800; font-size: 12px; }
.certificate h1 { color: #0b6572; font-family: Georgia, serif; font-size: 58px; margin: 12px 0 8px; }
.certificate-lead { font-size: 17px; margin: 0; }
.certificate-name { font-family: Georgia, serif; font-size: 31px; margin: 22px 0 4px; }
.certificate-org { margin: 0 0 24px; }
.certificate h2 { max-width: 650px; font-family: Georgia, serif; font-size: 25px; margin: 12px 0 20px; }
.certificate-verification { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: auto; margin-bottom: 22px; font-size: 11px; }
.certificate-verification img { width: 74px; height: 74px; image-rendering: pixelated; }
.certificate-meta { margin-top: auto; width: 100%; display: flex; justify-content: space-between; border-top: 1px solid #c4d4d6; padding-top: 18px; font-size: 13px; color: #5e717b; }
.verify-card { max-width: 660px; margin: 48px auto; padding: 38px; background: #fff; border: 1px solid #cee1df; border-radius: 16px; box-shadow: 0 12px 35px rgba(28, 65, 74, .06); }
.verify-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: #e4f6ed; color: #147a55; font-weight: 900; font-size: 24px; margin-bottom: 22px; }
.verify-card h1 { font-size: 32px; }
.verify-card dl { margin: 22px 0 0; }
.verify-card dl div { display: grid; grid-template-columns: 145px 1fr; gap: 12px; border-top: 1px solid #e3eaec; padding: 13px 0; }
.verify-card dt { color: #8598a1; }
.verify-card dd { margin: 0; font-weight: 700; }
.quiz-form { max-width: 790px; }
.quiz-chat { display: flex; flex-direction: column; gap: 16px; margin: 18px 0 28px; }
.quiz-question { background: #fff; border: 1px solid #dbe6e8; border-radius: 16px; padding: 24px 28px; margin: 0; }
.quiz-question legend { display: block; width: 100%; padding: 0; margin-bottom: 16px; font-size: 18px; font-weight: 800; color: #172a39; }
.quiz-question legend span { display: block; color: #0b7781; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 5px; }
.quiz-question ol { color: #607681; margin: 14px 0 0; padding-left: 22px; }
.quiz-option { display: flex; align-items: center; gap: 12px; border: 1px solid #dbe6e8; border-radius: 10px; padding: 11px 14px; margin: 9px 0; cursor: pointer; font-size: 15px; }
.quiz-option:has(input:checked) { border-color: #0b6572; background: #edf8f6; }
.quiz-option input { width: auto; margin: 0; accent-color: #0b6572; }
.question-form { max-width: 790px; margin-top: 25px; }
@media (max-width: 800px) {
  .header-inner { flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; }
  nav { width: 100%; flex-wrap: wrap; gap: 12px 18px; }
  .auth-layout, .form-layout { grid-template-columns: 1fr; gap: 0; margin-top: 10px; }
  .auth-copy { padding: 10px 0 12px; }
  .section-head { flex-direction: column; }
  .stats { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 560px) {
  .application-details dl { grid-template-columns: 1fr; }
  .application-actions { flex-direction: column; }
  .shell { padding: 0 17px; }
  main.shell { padding-top: 20px; }
  .panel { padding: 23px; }
  .hero { padding: 25px 0 18px; }
  .lecture-row { gap: 11px; padding: 14px; }
  .lecture-number { width: 27px; font-size: 14px; }
  .lecture-status { display: none; }
  .stats { gap: 6px; }
  .stats div { padding: 12px; }
  .stats strong { font-size: 23px; }
  .admin-actions { flex-wrap: wrap; }
  .chat-bubble { max-width: 92%; }
  .certificate { padding: 8px; }
  .certificate-border { padding: 28px 16px; min-height: 520px; }
  .certificate-partners { gap: 7px; }
  .certificate-partners img { height: 44px; }
  .certificate-partners .tektorg-logo { max-height: 44px; }
  .certificate-partners span { font-size: 8px; }
  .certificate h1 { font-size: 41px; }
  .certificate-name { font-size: 25px; }
  .certificate h2 { font-size: 20px; }
  .certificate-meta { flex-direction: column; gap: 6px; }
  .verify-card { margin: 12px 0; padding: 24px; }
  .verify-card dl div { grid-template-columns: 1fr; gap: 2px; }
  .quiz-question { padding: 20px; }
}
@media print {
  @page { size: A4 landscape; margin: 12mm; }
  body { background: #fff; }
  .site-header, .site-footer, .certificate-actions { display: none; }
  main.shell { padding: 0; min-height: 0; max-width: none; }
  .certificate { border: 0; box-shadow: none; margin: 0; max-width: none; padding: 0; }
  .certificate-border { min-height: 180mm; }
}
