@import url("https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css");
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@700&display=swap');

* {
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
}

html,
body {
  margin: 0px;
  min-height: 100%;
}

/* a blue color as a generic focus style */
button:focus-visible {
  outline: 2px solid #4a90e2 !important;
  outline: -webkit-focus-ring-color auto 5px !important;
}

a {
  text-decoration: none;
}

.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  margin-right: 8px;
  letter-spacing: -0.2px;
  border: 1px solid #fcd34d;
  font-family: 'Inter', sans-serif;
}

/* ===== Profile Streak Card ===== */
.profile-streak {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 1px solid #fcd34d;
  border-radius: 12px;
  margin: 24px 0;
}

.streak-current {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.streak-flame {
  font-size: 28px;
  line-height: 1;
}

.streak-num {
  font-size: 32px;
  font-weight: 700;
  color: #92400e;
  line-height: 1;
  font-family: 'Inter', sans-serif;
  letter-spacing: -1px;
}

.streak-label {
  color: #92400e;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
}

.streak-record {
  color: #92400e;
  font-size: 13px;
  opacity: 0.85;
  font-family: 'Inter', sans-serif;
}

.streak-record strong {
  font-weight: 700;
}

@media (max-width: 480px) {
  .profile-streak {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}
/* ===== Site Footer ===== */
.site-footer {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #eef0f3;                    /* мягкий серый, чуть темнее */
  color: #4b5563;
  padding: 64px 24px 32px;
  margin-top: 96px;
  font-size: 14px;
  line-height: 1.6;
  border-top: 1px solid #dcdfe4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid #dcdfe4;
}

.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.footer-logo {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.footer-logo span {
  font-family: 'JetBrains Mono', monospace;
  color: #fff;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -1px;
}

.footer-brand-text {
  display: flex;
  flex-direction: column;
}

.footer-title {
  font-family: 'Inter', sans-serif;
  color: #0f172a;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.3px;
  margin-bottom: 4px;
}

.footer-subtitle {
  color: #6b7280;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 400;
}

.footer-col-title {
  font-family: 'Inter', sans-serif;
  color: #0f172a;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 18px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col ul li {
  margin-bottom: 11px;
}

.footer-col a {
  font-family: 'Inter', sans-serif;
  color: #4b5563;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.1px;
  transition: color 0.15s ease;
}

.footer-col a:hover {
  color: #2563eb;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  font-size: 13px;
  color: #9ca3af;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copy {
  font-family: 'Inter', sans-serif;
  color: #6b7280;
  font-weight: 400;
}

.footer-author {
  font-family: 'Inter', sans-serif;
  color: #6b7280;
  font-weight: 400;
}

.footer-author a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.1px;
  transition: color 0.15s ease;
}

.footer-author a:hover {
  color: #1d4ed8;
}

/* Плавное появление для логотипа */
.footer-logo {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.footer-brand:hover .footer-logo {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
}

@media (max-width: 768px) {
  .site-footer {
    padding: 48px 20px 24px;
    margin-top: 64px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    padding-bottom: 32px;
  }

  .footer-brand {
    grid-column: 1 / -1;
    margin-bottom: 8px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* ===== Lesson Content ===== */
.lesson-body {
  font-size: 16px;
  line-height: 1.75;
  color: #222;
}

.lesson-body h1 { font-size: 1.8rem; font-weight: 700; margin: 2.5rem 0 1rem; }
.lesson-body h2 {
  font-size: 1.35rem; font-weight: 700; margin: 2rem 0 1rem;
  padding-bottom: .5rem; border-bottom: 2px solid #e5e7eb;
}
.lesson-body h3 { font-size: 1.1rem; font-weight: 600; margin: 1.5rem 0 .75rem; }

.lesson-body p { margin: 1rem 0; }
.lesson-body ul, .lesson-body ol { margin: 1rem 0; padding-left: 1.75rem; }
.lesson-body li { margin: .4rem 0; }
.lesson-body strong { color: #111; font-weight: 600; }
.lesson-body em { color: #555; font-style: italic; }
.lesson-body a { color: #2563eb; text-decoration: underline; }

.lesson-body code {
  background: #f3f4f6; padding: .15rem .4rem; border-radius: 4px;
  font-family: 'JetBrains Mono', monospace; font-size: .9em; color: #be185d;
}

.lesson-body table {
  width: 100%; border-collapse: collapse; margin: 1.5rem 0;
  font-size: .95rem; background: #fff; border-radius: 8px;
  overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

.lesson-body th {
  background: #f3f4f6; font-weight: 600; text-align: left;
  padding: .75rem 1rem; border-bottom: 2px solid #e5e7eb;
}

.lesson-body td { padding: .7rem 1rem; border-bottom: 1px solid #f0f0f0; }
.lesson-body tr:last-child td { border-bottom: none; }
.lesson-body tr:hover td { background: #fafafa; }

.lesson-body blockquote {
  border-left: 4px solid #2563eb; background: #f8fafc;
  padding: .75rem 1rem; margin: 1.25rem 0;
  border-radius: 0 6px 6px 0; color: #444;
}
