:root {
  --ept-primary: #008b74;
  --ept-primary-dark: #006b5a;
  --ept-ink: #17211f;
  --ept-muted: #60706c;
  --ept-line: #dce7e4;
  --ept-soft: #f2f8f6;
  --ept-white: #fff;
  --ept-danger: #a53b2b;
}

.ept-app,
.ept-app * {
  box-sizing: border-box;
}

.ept-app {
  width: 100%;
  max-width: 920px;
  margin: 32px auto;
  color: var(--ept-ink);
  font-family: inherit;
  letter-spacing: 0;
}

.ept-shell {
  width: 100%;
  padding: clamp(24px, 5vw, 52px);
  overflow: hidden;
  background: var(--ept-white);
  border: 1px solid var(--ept-line);
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(19, 48, 42, .1);
}

.ept-center { text-align: center; }

.ept-mark {
  display: grid;
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  color: var(--ept-primary);
  place-items: center;
  background: #e9f6f3;
  border: 1px solid #cce8e2;
  border-radius: 50%;
}

.ept-mark svg,
.ept-audio-play svg {
  width: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ept-kicker {
  margin: 0 0 8px;
  color: var(--ept-primary-dark);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.8;
}

.ept-shell h2 {
  margin: 0;
  color: var(--ept-ink);
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 900;
  line-height: 1.5;
  letter-spacing: 0;
}

.ept-lead {
  max-width: 650px;
  margin: 14px auto 0;
  color: var(--ept-muted);
  font-size: 17px;
  line-height: 2;
}

.ept-level-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 34px;
}

.ept-level-choice {
  display: flex;
  min-width: 0;
  min-height: 112px;
  padding: 16px 10px;
  color: var(--ept-muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--ept-white);
  border: 1px solid var(--ept-line);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(19, 48, 42, .05);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
  touch-action: manipulation;
}

.ept-level-choice:hover,
.ept-level-choice:focus-visible {
  border-color: var(--ept-primary);
  box-shadow: 0 12px 28px rgba(0, 139, 116, .13);
  outline: none;
  transform: translateY(-2px);
}

.ept-level-code {
  margin-bottom: 8px;
  color: var(--ept-primary);
  font: 900 31px/1 Arial, sans-serif;
}

.ept-note {
  margin: 24px 0 0;
  color: #7b8986;
  font-size: 13px;
  line-height: 1.9;
  text-align: center;
}

.ept-alert,
.ept-inline-error {
  color: var(--ept-danger);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.8;
}

.ept-alert {
  margin-top: 20px;
  padding: 12px 15px;
  background: #fff6f3;
  border: 1px solid #f2d2cb;
  border-radius: 6px;
}

.ept-test-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.ept-test-head h2 { font-size: clamp(21px, 3vw, 27px); }

.ept-count {
  display: flex;
  min-width: 70px;
  min-height: 58px;
  padding: 7px 12px;
  color: var(--ept-primary-dark);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--ept-soft);
  border: 1px solid #d6ebe6;
  border-radius: 7px;
}

.ept-count strong { font: 900 22px/1 Arial, sans-serif; }
.ept-count span { margin-top: 4px; font-size: 11px; }

.ept-progress {
  height: 5px;
  margin: 20px 0 32px;
  overflow: hidden;
  background: #e8efed;
  border-radius: 3px;
}

.ept-progress span {
  display: block;
  height: 100%;
  background: var(--ept-primary);
  border-radius: inherit;
  transition: width .2s ease;
}

.ept-passage {
  max-height: 310px;
  margin-bottom: 28px;
  padding: clamp(18px, 4vw, 28px);
  overflow-y: auto;
  color: #273431;
  font: 400 17px/1.9 Georgia, "Times New Roman", serif;
  text-align: left;
  background: #fafcfb;
  border: 1px solid var(--ept-line);
  border-left: 4px solid var(--ept-primary);
  border-radius: 6px;
}

.ept-passage-title {
  margin-bottom: 10px;
  color: var(--ept-primary-dark);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
  text-align: right;
}

.ept-question h3 {
  margin: 0 0 24px;
  color: var(--ept-ink);
  font: 700 clamp(19px, 3vw, 24px)/1.65 Arial, sans-serif;
  text-align: left;
  letter-spacing: 0;
}

.ept-options {
  display: grid;
  gap: 10px;
}

.ept-option {
  display: flex;
  min-height: 58px;
  padding: 14px 16px;
  color: #26322f;
  font: 500 16px/1.65 Arial, sans-serif;
  cursor: pointer;
  align-items: center;
  gap: 13px;
  background: #f8faf9;
  border: 1px solid var(--ept-line);
  border-radius: 7px;
  transition: background .14s ease, border-color .14s ease;
  touch-action: manipulation;
}

.ept-option:hover,
.ept-option.is-selected {
  background: #eef8f5;
  border-color: var(--ept-primary);
}

.ept-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.ept-radio {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border: 2px solid #81908c;
  border-radius: 50%;
  box-shadow: inset 0 0 0 4px var(--ept-white);
}

.ept-option.is-selected .ept-radio {
  background: var(--ept-primary);
  border-color: var(--ept-primary);
}

.ept-option:focus-within { outline: 3px solid rgba(0, 139, 116, .18); outline-offset: 2px; }
.ept-option.is-locked { cursor: not-allowed; opacity: .62; }

.ept-timer {
  margin: -8px 0 26px;
  padding: 13px 16px;
  color: var(--ept-primary-dark);
  background: #f2f8f6;
  border: 1px solid #d6ebe6;
  border-radius: 7px;
}

.ept-timer > div {
  display: flex;
  margin-bottom: 9px;
  font-size: 13px;
  font-weight: 800;
  align-items: center;
  justify-content: space-between;
}

.ept-timer strong { font: 800 17px/1 Arial, sans-serif; }
.ept-timer-track { display: block; height: 5px; overflow: hidden; background: #dce9e6; border-radius: 3px; direction: ltr; }
.ept-timer-track i { display: block; width: 100%; height: 100%; background: var(--ept-primary); border-radius: inherit; transition: width .25s linear; }
.ept-timer.is-expired { color: var(--ept-danger); font-size: 14px; font-weight: 800; line-height: 1.8; background: #fff6f3; border-color: #f2d2cb; }

.ept-nav {
  display: grid;
  grid-template-columns: 130px 1fr 130px;
  align-items: center;
  gap: 16px;
  margin-top: 30px;
}

.ept-button {
  display: inline-flex;
  min-height: 52px;
  padding: 12px 22px;
  color: #fff !important;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.7;
  text-decoration: none !important;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  background: var(--ept-primary);
  border: 1px solid var(--ept-primary);
  border-radius: 7px;
  box-shadow: 0 10px 22px rgba(0, 139, 116, .18);
  transition: background .15s ease, transform .15s ease;
  touch-action: manipulation;
}

.ept-button:hover,
.ept-button:focus-visible { color: #fff; background: var(--ept-primary-dark); outline: 3px solid rgba(0, 139, 116, .18); outline-offset: 2px; }
.ept-button:active { transform: translateY(1px); }
.ept-button:disabled { cursor: not-allowed; opacity: .46; box-shadow: none; }

.ept-button-secondary {
  color: var(--ept-primary-dark) !important;
  background: var(--ept-white);
  border-color: #beddd6;
  box-shadow: none;
}

.ept-button-secondary:hover,
.ept-button-secondary:focus-visible { color: var(--ept-primary-dark) !important; background: var(--ept-soft); }
.ept-answered { color: #7b8986; font-size: 13px; text-align: center; }
.ept-inline-error { min-height: 26px; margin-top: 12px; text-align: center; }
.ept-wide { width: min(100%, 360px); margin-top: 28px; }

.ept-score { color: var(--ept-primary); font: 900 48px/1.2 Arial, sans-serif; }

.ept-audio {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  margin-bottom: 28px;
  padding: 16px;
  align-items: center;
  background: var(--ept-soft);
  border: 1px solid #d6ebe6;
  border-radius: 8px;
  direction: ltr;
}

.ept-audio-play {
  display: grid;
  width: 52px;
  height: 52px;
  padding: 0;
  color: #fff;
  cursor: pointer;
  place-items: center;
  background: var(--ept-primary);
  border: 0;
  border-radius: 50%;
}

.ept-audio-play svg { width: 23px; stroke-width: 2.2; }
.ept-audio .ept-pause-shape { display: none; }
.ept-audio.is-playing .ept-play-shape { display: none; }
.ept-audio.is-playing .ept-pause-shape { display: block; }
.ept-audio-track input { width: 100%; accent-color: var(--ept-primary); cursor: pointer; }
.ept-audio-track div { display: flex; margin-top: 4px; color: var(--ept-muted); font: 12px/1 Arial, sans-serif; justify-content: space-between; }

.ept-profile form {
  width: min(100%, 520px);
  margin: 28px auto 0;
  text-align: right;
}

.ept-field { display: block; margin-bottom: 16px; color: var(--ept-ink); font-size: 14px; font-weight: 800; }
.ept-field span { display: block; margin-bottom: 7px; }
.ept-field input {
  width: 100%;
  min-height: 52px;
  padding: 11px 14px;
  color: var(--ept-ink);
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.6;
  background: #fff;
  border: 1px solid #cddbd8;
  border-radius: 7px;
}
.ept-field input:focus { border-color: var(--ept-primary); outline: 3px solid rgba(0, 139, 116, .12); }

.ept-profile .ept-button { display: flex; margin-right: auto; margin-left: auto; }

.ept-result-level {
  display: inline-flex;
  min-width: 180px;
  margin-top: 24px;
  padding: 18px 28px;
  color: var(--ept-primary);
  flex-direction: column;
  background: var(--ept-soft);
  border: 1px solid #cce8e2;
  border-radius: 8px;
}
.ept-result-level strong { font: 900 46px/1.1 Arial, sans-serif; }
.ept-result-level span { margin-top: 7px; font-size: 17px; font-weight: 800; }
.ept-text-button { display: block; margin: 18px auto 0; padding: 8px; color: var(--ept-muted); font-family: inherit; font-size: 13px; font-weight: 700; line-height: 1.6; cursor: pointer; background: none; border: 0; }
.ept-text-button:hover { color: var(--ept-primary-dark); }

.ept-report {
  width: 100%;
  margin-top: 38px;
  padding-top: 32px;
  text-align: right;
  border-top: 1px solid var(--ept-line);
}

.ept-report-title { margin-bottom: 22px; text-align: center; }
.ept-report-title h3 { margin: 0; color: var(--ept-ink); font-size: 24px; line-height: 1.5; }
.ept-report-level { margin-top: 24px; }
.ept-report-level > header {
  display: flex;
  margin-bottom: 10px;
  padding: 0 2px;
  align-items: center;
  justify-content: space-between;
}
.ept-report-level h4 { margin: 0; color: var(--ept-ink); font-size: 17px; }
.ept-report-level > header > span { color: var(--ept-primary-dark); font: 800 15px/1 Arial, sans-serif; }
.ept-report-items { display: grid; gap: 10px; }
.ept-report-item {
  padding: 16px 18px;
  color: #34413e;
  text-align: left;
  background: #fafcfb;
  border: 1px solid var(--ept-line);
  border-left: 4px solid;
  border-radius: 6px;
}
.ept-report-item.is-correct { border-left-color: var(--ept-primary); }
.ept-report-item.is-wrong { border-left-color: #c05646; }
.ept-report-item-head { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; }
.ept-report-item-head > span { color: var(--ept-ink); font: 700 15px/1.7 Arial, sans-serif; }
.ept-report-item-head b { flex: 0 0 auto; padding: 3px 8px; font-family: inherit; font-size: 11px; line-height: 1.5; border-radius: 4px; }
.ept-report-item.is-correct .ept-report-item-head b { color: #006b5a; background: #e4f5f1; }
.ept-report-item.is-wrong .ept-report-item-head b { color: #963827; background: #fff0ed; }
.ept-report-item p { margin: 9px 0 0; color: var(--ept-muted); font: 13px/1.7 Arial, sans-serif; }
.ept-report-item p span { display: inline-block; margin-right: 5px; font-family: inherit; }
.ept-report-item p strong { color: var(--ept-ink); font-weight: 700; }

.ept-loading {
  display: flex;
  min-height: 260px;
  color: var(--ept-muted);
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--ept-line);
  border-radius: 8px;
}
.ept-spinner { width: 22px; height: 22px; border: 2px solid #cce8e2; border-top-color: var(--ept-primary); border-radius: 50%; animation: ept-spin .7s linear infinite; }
@keyframes ept-spin { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
  .ept-app { margin: 16px auto; }
  .ept-level-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ept-level-choice:last-child { grid-column: 1 / -1; }
  .ept-nav { grid-template-columns: 1fr 1fr; }
  .ept-answered { grid-row: 2; grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  .ept-shell { padding: 22px 16px; border-right: 0; border-left: 0; border-radius: 0; }
  .ept-test-head { align-items: flex-start; }
  .ept-progress { margin-bottom: 24px; }
  .ept-passage { max-height: 260px; font-size: 16px; }
  .ept-question h3 { font-size: 18px; }
  .ept-option { min-height: 56px; padding: 12px; font-size: 15px; }
  .ept-nav { gap: 10px; }
  .ept-button { min-height: 54px; padding: 11px 13px; }
  .ept-audio { grid-template-columns: 50px 1fr; padding: 13px; }
  .ept-audio-play { width: 48px; height: 48px; }
  .ept-report-item { padding: 14px; }
  .ept-report-item-head { flex-direction: column; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .ept-app *, .ept-app *::before, .ept-app *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
