/* Java Level Exam modal — ТЕРАКОР */

body.jle-open {
  overflow: hidden;
}

.jle-root {
  position: relative;
  z-index: 1080;
  font-family: "Manrope", system-ui, "Segoe UI", Roboto, sans-serif;
  letter-spacing: normal;
}

.jle-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(12, 10, 24, 0.72);
  backdrop-filter: blur(6px);
  overflow-y: auto;
}

.jle-modal {
  position: relative;
  width: min(100%, 560px);
  margin: auto;
  padding: 1.75rem 1.5rem 1.5rem;
  background: #fff;
  border-radius: 24px;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.06);
  color: #1a1a2e;
}

.jle-modal--exam,
.jle-modal--result {
  width: min(100%, 720px);
}

.jle-lead--report {
  font-size: 0.95rem;
  line-height: 1.55;
  color: #374151;
}

.jle-section-lead {
  margin: -0.15rem 0 0.75rem;
  font-size: 0.86rem;
  line-height: 1.45;
  color: #6b7280;
}

.jle-reading {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.jle-read-block {
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e8ecf3;
}

.jle-read-block__topic {
  font-size: 0.82rem;
  font-weight: 700;
  color: #c05600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.jle-read-block__focus {
  margin: 0 0 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #16213e;
}

.jle-read-block__tip {
  margin: 0 0 0.55rem;
  font-size: 0.84rem;
  line-height: 1.45;
  color: #4b5563;
}

.jle-read-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.86rem;
  line-height: 1.45;
}

.jle-read-list li + li {
  margin-top: 0.35rem;
}

.jle-read-link {
  color: #1d4ed8;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.jle-read-link:hover {
  color: #1e40af;
}

.jle-read-src {
  color: #9ca3af;
  font-size: 0.78rem;
}

.jle-missed-list,
.jle-rec-list,
.jle-steps-list {
  margin: 0 0 0.25rem;
  padding-left: 1.15rem;
  font-size: 0.88rem;
  color: #374151;
  line-height: 1.45;
}

.jle-missed-list li + li,
.jle-rec-list li + li,
.jle-steps-list li + li {
  margin-top: 0.35rem;
}

.jle-missed-reason {
  color: #9ca3af;
  font-style: normal;
  font-size: 0.8rem;
}

.jle-missed-list {
  list-style: none;
  padding-left: 0;
}

.jle-missed-item {
  margin: 0 0 0.75rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}

.jle-missed-item + .jle-missed-item {
  margin-top: 0;
}

.jle-missed-q {
  margin: 0.35rem 0 0.4rem;
  font-weight: 650;
  color: #111827 !important;
  line-height: 1.4;
}

.jle-missed-yours {
  margin: 0 0 0.3rem;
  font-size: 0.84rem;
  color: #6b7280 !important;
}

.jle-missed-correct {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: #0f766e !important;
  line-height: 1.45;
}

.jle-missed-arts {
  margin-top: 0.55rem;
  padding-top: 0.45rem;
  border-top: 1px dashed rgba(15, 23, 42, 0.12);
}
.jle-missed-arts__label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 0.25rem;
}
.jle-missed-item .jle-read-list {
  margin: 0;
}


.jle-steps-list a {
  color: #c05600;
  font-weight: 700;
  text-decoration: none;
}

.jle-steps-list a:hover {
  text-decoration: underline;
}

.jle-modal--result {
  max-height: min(92vh, 920px);
  overflow-y: auto;
}

.jle-close {
  position: absolute;
  top: 0.75rem;
  right: 0.85rem;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 999px;
  background: #f3f4f8;
  color: #6b7280;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

/* Keep close visible while scrolling long result reports */
.jle-modal--result > .jle-close {
  position: sticky;
  float: right;
  top: 0.5rem;
  z-index: 6;
  margin: 0 0 0.25rem 0.5rem;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.14);
}

.jle-close:hover {
  background: #e8eaf0;
  color: #111827;
}

.jle-kicker {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e67e22;
}

.jle-title {
  margin: 0 0 0.65rem;
  font-size: clamp(1.25rem, 2.5vw, 1.55rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: normal !important;
  color: #16213e;
}

.jle-lead {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #6b7280;
}

.jle-rules {
  margin: 0 0 1.15rem;
  padding: 0.85rem 0.85rem 0.85rem 1.5rem;
  background: #f7f8fc;
  border-radius: 14px;
  color: #374151;
  font-size: 0.9rem;
  line-height: 1.45;
}

.jle-rules li + li {
  margin-top: 0.35rem;
}

.jle-label {
  display: block;
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #4b5563;
  text-align: left;
}

.jle-input,
.jle-textarea {
  width: 100%;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  color: #111827;
  font: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.jle-input {
  height: 46px;
  padding: 0 0.9rem;
  margin-bottom: 0.85rem;
}

.jle-textarea {
  padding: 0.85rem 0.9rem;
  min-height: 140px;
  resize: vertical;
  margin-bottom: 1rem;
}

.jle-input:focus,
.jle-textarea:focus {
  border-color: #f0a04b;
  box-shadow: 0 0 0 3px rgba(240, 160, 75, 0.18);
}

.jle-email-note {
  margin: -0.35rem 0 1rem;
  font-size: 0.85rem;
  color: #6b7280;
}

.jle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2.5rem;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  border: none;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.jle-btn--primary {
  width: auto;
  min-width: 8.5rem;
  background: linear-gradient(180deg, #ffb347 0%, #f39c12 45%, #e67e22 100%);
  color: #fff;
  box-shadow: 0 8px 18px rgba(230, 126, 34, 0.28);
}

.jle-btn--primary:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
  color: #fff;
}

.jle-btn--ghost {
  background: #f3f4f8;
  color: #374151;
}

.jle-btn--ghost:hover {
  background: #e8eaf0;
  color: #111827;
}

.jle-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  margin-top: 0.35rem;
}

.jle-actions .jle-btn--primary {
  flex: 0 0 auto;
  width: auto;
  min-width: 7.5rem;
}

.jle-actions .jle-btn--ghost {
  flex: 0 0 auto;
  min-width: 0;
}

.jle-actions--result {
  margin-top: 1.25rem;
  justify-content: stretch;
}

.jle-actions--result .jle-btn {
  flex: 1 1 100%;
  width: 100%;
}

/* Start / auth screens: primary button fills form width */
.jle-modal > .jle-btn--primary,
.jle-auth .jle-btn--primary,
.jle-gate .jle-btn--primary,
.jle-form .jle-btn--primary,
.jle-save-form .jle-btn--primary,
.jle-expert-form .jle-btn--primary,
.jle-pdf-cta .jle-btn--primary,
.jle-expert-upsell .jle-btn--primary {
  width: 100%;
  min-width: 0;
  margin-top: 0.25rem;
}

.jle-topbar {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1rem;
  padding-right: 1.5rem;
}

.jle-progress__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #4b5563;
  margin-bottom: 0.35rem;
}

.jle-progress__track,
.jle-timer__track {
  height: 6px;
  border-radius: 999px;
  background: #eef0f5;
  overflow: hidden;
}

.jle-progress__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f39c12, #e67e22);
}

.jle-timers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.jle-timer {
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  background: #f7f8fc;
}

.jle-timer__label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9ca3af;
}

.jle-timer strong {
  display: block;
  margin: 0.1rem 0 0.35rem;
  font-size: 1.15rem;
  color: #16213e;
  font-variant-numeric: tabular-nums;
}

.jle-timer__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #34d399, #10b981);
  transition: width 0.2s linear;
}

.jle-timer__fill.is-low {
  background: linear-gradient(90deg, #fbbf24, #ef4444);
}

.jle-timer__fill--global {
  background: linear-gradient(90deg, #60a5fa, #2563eb);
}

.jle-qmeta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.55rem;
}

.jle-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #fff4e6;
  color: #c05600;
  font-size: 0.72rem;
  font-weight: 700;
}

.jle-chip--test {
  background: #ecfdf5;
  color: #047857;
}

.jle-chip--open {
  background: #eff6ff;
  color: #1d4ed8;
}

.jle-note {
  margin: 0 0 0.75rem;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e8ecf3;
  font-size: 0.82rem;
  line-height: 1.4;
  color: #4b5563;
}

.jle-qcard {
  margin-bottom: 1rem;
  padding: 1rem 1.05rem;
  border-radius: 16px;
  background: linear-gradient(165deg, #fafbfd 0%, #f3f5fa 100%);
  border: 1px solid #e5e9f2;
}

.jle-qtext {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 650;
  line-height: 1.4;
  color: #16213e;
  letter-spacing: normal !important;
}

.jle-options {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.jle-option {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  border: 1.5px solid #e5e9f2;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.jle-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.jle-option__key {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 8px;
  background: #f3f4f8;
  color: #4b5563;
  font-size: 0.78rem;
  font-weight: 700;
}

.jle-option__text {
  flex: 1 1 auto;
  font-size: 0.92rem;
  line-height: 1.35;
  color: #1f2937;
}

.jle-option:hover {
  border-color: #f0b27a;
}

.jle-option.is-selected {
  border-color: #e67e22;
  background: #fff8f1;
  box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.12);
}

.jle-option.is-selected .jle-option__key {
  background: #e67e22;
  color: #fff;
}

.jle-option--shake {
  animation: jle-shake 0.35s ease;
}

@keyframes jle-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-4px);
  }
  75% {
    transform: translateX(4px);
  }
}

.jle-chip--muted {
  background: #f3f4f8;
  color: #6b7280;
}

.jle-examiner {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.jle-trust-line {
  margin: 0.85rem 0 0;
  font-size: 0.75rem;
  color: #9ca3af;
  text-align: center;
}

.jle-live {
  display: inline-block;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.jle-chat {
  max-height: min(42vh, 360px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin: 0 0 1rem;
  padding: 0.75rem;
  border-radius: 16px;
  background: linear-gradient(180deg, #f8fafc, #f3f4f8);
  border: 1px solid #e8ebf2;
  text-align: left;
}

.jle-bubble {
  max-width: 92%;
  padding: 0.7rem 0.85rem;
  border-radius: 14px;
  font-size: 0.92rem;
  line-height: 1.45;
}

.jle-bubble__who {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.7;
}

.jle-bubble--examiner {
  align-self: flex-start;
  background: #fff;
  color: #1f2937;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.jle-bubble--candidate {
  align-self: flex-end;
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  color: #9a3412;
  border: 1px solid #fed7aa;
}

.jle-typing {
  display: inline-flex;
  gap: 0.28rem;
  align-items: center;
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e5e7eb;
  align-self: flex-start;
}

.jle-typing[hidden] {
  display: none !important;
}

.jle-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9ca3af;
  animation: jle-dot 1.2s infinite ease-in-out;
}

.jle-typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.jle-typing span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes jle-dot {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.45; }
  40% { transform: translateY(-3px); opacity: 1; }
}

.jle-otp-error {
  margin: -0.35rem 0 0.75rem;
  color: #dc2626;
  font-size: 0.85rem;
}

.jle-dev-code {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  font-size: 0.9rem;
  text-align: center;
}

.jle-dev-code code {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: #047857;
}

.jle-modal--exam {
  width: min(100%, 680px);
}

.jle-grade {
  margin: 0 0 1rem;
  padding: 1rem;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  border: 1px solid #fed7aa;
  text-align: center;
}

.jle-grade__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #9a3412;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.jle-grade__value {
  display: block;
  margin: 0.25rem 0;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  color: #9a3412;
}

.jle-grade__pct {
  display: block;
  font-size: 0.85rem;
  color: #c2410c;
}

.jle-entry {
  margin: 0 0 1.15rem;
  padding: 1.1rem 1.15rem 1.2rem;
  border-radius: 16px;
  border: 1px solid #c7d2fe;
  background: linear-gradient(160deg, #eef2ff 0%, #e0e7ff 55%, #f8fafc 100%);
}

.jle-entry--full {
  border-color: #fdba74;
  background: linear-gradient(160deg, #fff7ed 0%, #ffedd5 50%, #f8fafc 100%);
}

.jle-entry--short {
  border-color: #93c5fd;
  background: linear-gradient(160deg, #eff6ff 0%, #dbeafe 55%, #f8fafc 100%);
}

.jle-entry__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #4338ca;
}

.jle-entry--full .jle-entry__eyebrow {
  color: #c2410c;
}

.jle-entry--short .jle-entry__eyebrow {
  color: #1d4ed8;
}

.jle-entry__title {
  margin: 0 0 0.45rem;
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  line-height: 1.35;
  color: #0f172a;
}

.jle-entry__text {
  margin: 0 0 0.95rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #334155;
}

.jle-entry__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.jle-entry__actions .jle-btn {
  flex: 1 1 auto;
  text-align: center;
  text-decoration: none;
}

.jle-result-meta {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: #4b5563;
}

.jle-result-meta p {
  margin: 0.2rem 0;
}

.jle-section-title {
  margin: 0.85rem 0 0.4rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: normal !important;
  color: #16213e;
}

.jle-topic-list,
.jle-cols ul {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.88rem;
  color: #374151;
  line-height: 1.45;
}

.jle-topic-list li + li,
.jle-cols li + li {
  margin-top: 0.25rem;
}

.jle-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-top: 0.35rem;
}

@media (max-width: 575.98px) {
  .jle-modal {
    padding: 1.4rem 1.1rem 1.2rem;
  }

  .jle-cols,
  .jle-timers {
    grid-template-columns: 1fr;
  }

  .jle-actions {
    flex-direction: row;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .jle-actions .jle-btn--ghost,
  .jle-actions .jle-btn--primary {
    width: auto;
    flex: 0 0 auto;
  }

  .jle-actions--result .jle-btn {
    width: 100%;
  }
}

.jle-save-form {
  margin: 1.1rem 0 0.4rem;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  background: #f7f8fc;
  border: 1px solid #e8ebf2;
}
.jle-save-form__lead {
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
  color: #344054;
}
.jle-save-form__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem;
}
.jle-save-form__ok {
  margin: 0;
  font-weight: 600;
  color: #027a48;
}
@media (max-width: 640px) {
  .jle-save-form__row {
    grid-template-columns: 1fr;
  }
}

.jle-pdf-cta {
  margin: 1rem 0 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid #d7e0ee;
  border-radius: 14px;
  background: linear-gradient(145deg, #fff8ef 0%, #f3f6fb 100%);
}
.jle-pdf-cta .jle-section-title {
  margin-bottom: 0.35rem;
}
.jle-pdf-cta .jle-section-lead {
  margin-bottom: 0.75rem;
}
