.demo-live {
  position: relative;
  height: 236px;
  margin: 0 0 18px;
  padding: 12px;
  border-radius: 22px;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: hidden;
}
.demo-field, .demo-btn {
  height: 34px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  font-size: 13px;
}
.demo-field span { color: #94a3b8; width: 72px; font-size: 11px; font-weight: 700; }
.demo-field b { font-weight: 700; color: #0f172a; min-height: 1em; }
.demo-field b:after, .demo-field.on b:after {
  content: "";
  display: inline-block;
  width: 1px;
  height: 12px;
  margin-left: 1px;
  background: #2563eb;
  vertical-align: -1px;
}
.demo-field.on { border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(37,99,235,.12); background: #fff; }
.demo-btn {
  justify-content: center;
  margin: 0;
  background: linear-gradient(90deg, #2563eb, #7c3aed);
  color: #fff;
  border: 0;
  font-weight: 800;
}
.demo-btn.hot { transform: scale(.98); filter: brightness(1.08); }
.demo-result {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 214px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #d1fae5;
  box-shadow: 0 16px 36px -24px rgba(5, 150, 105, .7);
  padding: 14px 16px 12px;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .35s ease, transform .35s ease;
}
.demo-result.show { opacity: 1; transform: none; }
.demo-result-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.demo-check {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #059669;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 18px;
  flex: none;
}
.demo-result p { margin: 0; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #047857; font-weight: 800; }
.demo-result strong { display: block; color: #065f46; font-size: 16px; }
.demo-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid #ecfdf5;
  padding: 6px 0;
  font-size: 12px;
}
.demo-row span { color: #64748b; font-weight: 600; }
.demo-row b { color: #064e3b; }
.demo-again {
  margin-top: 8px;
  text-align: center;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  border-radius: 12px;
  padding: 8px;
  font-size: 13px;
  font-weight: 800;
}
.demo-cursor {
  position: absolute;
  width: 16px;
  height: 16px;
  left: 18px;
  top: 18px;
  background: #0f172a;
  clip-path: polygon(0 0, 0 100%, 28% 72%, 46% 100%, 58% 94%, 40% 68%, 72% 68%);
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.25));
  transition: left .55s ease, top .55s ease;
  z-index: 2;
}


.mark-id {
  display: inline;
  color: #0369a1;
  background: #e0f2fe;
  font-weight: 800;
  padding: 0 .28em;
  border-radius: .35rem;
}
.mark-hint {
  display: inline;
  color: #1d4ed8;
  background: #eff6ff;
  font-weight: 700;
  padding: .2rem .45rem;
  border-radius: .5rem;
  line-height: 1.6;
}

.bg-grid {
  inset: 0;
  background-image:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(37, 99, 235, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 90% 0%, rgba(124, 58, 237, 0.10), transparent);
  pointer-events: none;
}

.course-card {
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: 1.25rem;
  padding: 1.25rem 1.35rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  transition: transform .2s ease, box-shadow .2s ease;
}

.course-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px -20px rgba(15, 23, 42, 0.18);
}

@media (max-width: 720px) {
  .course-card {
    grid-template-columns: 1fr;
  }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .75rem;
  font-weight: 700;
  padding: .28rem .6rem;
  border-radius: 999px;
}

.badge-done { background: #ecfdf5; color: #047857; }
.badge-progress { background: #eff6ff; color: #1d4ed8; }
.badge-cert { background: #f5f3ff; color: #6d28d9; }

.grade-pills {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 15px;
  line-height: 1;
}
.pill-aplus, .pill-gold { background: #f8e7b0; color: #8a5a00; }
.pill-a { background: #d8f3e2; color: #0f7a45; }
.pill-aminus { background: #e5f6ec; color: #1a7f4c; }
.pill-bplus, .pill-b, .pill-bminus { background: #dbe7fb; color: #1d4ed8; }
.pill-cplus, .pill-c, .pill-cminus { background: #f3e8c8; color: #92650a; }
.pill-d, .pill-f { background: #fde2e2; color: #b42318; }
.pill-empty { background: #f1f5f9; color: #94a3b8; }

.lang-switch {
  display: inline-flex;
  background: rgba(255,255,255,.86);
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
  box-shadow: 0 8px 24px -18px rgba(15, 23, 42, .35);
}
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  padding: 6px 11px 6px 7px;
  border-radius: 999px;
  color: #64748b;
  background: transparent;
}
.lang-btn.active {
  background: #0f172a;
  color: #fff;
}
.flag {
  width: 18px;
  height: 13px;
  border-radius: 2px;
  display: inline-block;
  box-shadow: 0 0 0 1px rgba(15,23,42,.12);
  background-size: cover;
  background-position: center;
  flex: none;
}
.flag-ru {
  background-image: linear-gradient(to bottom, #fff 0 33.33%, #0039a6 33.33% 66.66%, #d52b1e 66.66% 100%);
}
.flag-us {
  background-image:
    linear-gradient(180deg, #fff 0 7.7%, #b22234 7.7% 15.4%, #fff 15.4% 23.1%, #b22234 23.1% 30.8%, #fff 30.8% 38.5%, #b22234 38.5% 46.2%, #fff 46.2% 53.9%, #b22234 53.9% 61.6%, #fff 61.6% 69.3%, #b22234 69.3% 77%, #fff 77% 84.7%, #b22234 84.7% 92.4%, #fff 92.4% 100%),
    linear-gradient(#3c3b6e, #3c3b6e);
  background-size: 100% 100%, 40% 54%;
  background-repeat: no-repeat;
  background-position: 0 0, 0 0;
}

.lookup-card {
  background: #fff;
  border: 1px solid #e8eef6;
  border-radius: 1.6rem;
  padding: 1.6rem 1.6rem 1.7rem;
  box-shadow: 0 24px 50px -28px rgba(15, 23, 42, .28);
}
.lookup-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.15rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eef2f7;
}
.lookup-lock {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, #eff6ff, #e0e7ff);
  box-shadow: inset 0 0 0 1px rgba(37,99,235,.12);
  position: relative;
}
.lookup-lock:before {
  content: "";
  position: absolute;
  left: 50%;
  top: 11px;
  width: 10px;
  height: 8px;
  border: 2px solid #2563eb;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  transform: translateX(-50%);
}
.lookup-lock:after {
  content: "";
  position: absolute;
  left: 50%;
  top: 18px;
  width: 16px;
  height: 12px;
  background: #2563eb;
  border-radius: 3px;
  transform: translateX(-50%);
}
.lookup-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #64748b;
}
.lookup-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.lookup-card input {
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease, transform .2s ease;
}
.lookup-card input:hover {
  border-color: #60a5fa;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .12), 0 10px 28px -12px rgba(37, 99, 235, .45);
}
.lookup-card input:focus {
  border-color: #2563eb;
  background: #fff;
  box-shadow: 0 0 0 5px rgba(37, 99, 235, .18), 0 12px 32px -12px rgba(124, 58, 237, .4);
}

.verified-card {
  background: #fff;
  border: 1px solid #d1fae5;
  border-radius: 1.6rem;
  padding: 1.5rem 1.6rem;
  box-shadow: 0 24px 50px -28px rgba(6, 95, 70, .28);
}
.verified-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1rem;
}
.verified-check {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: #059669;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 800;
  box-shadow: 0 10px 20px -12px #059669;
}
.verified-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #047857;
}
.verified-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #065f46;
}
.verified-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid #ecfdf5;
  font-size: 14px;
}
.verified-row span { color: #64748b; font-weight: 600; }
.verified-row strong { color: #064e3b; font-weight: 800; word-break: break-all; text-align: right; }
.verified-reset {
  margin-top: 14px;
  width: 100%;
  border-radius: 1rem;
  border: 1px solid #a7f3d0;
  background: #ecfdf5;
  color: #047857;
  font-weight: 800;
  padding: 11px 14px;
}
