:root {
  --color-primary: #3E6E97;
  --color-primary-hover: #2B4A6B;
  --color-red: #C28A2E;
  --color-red-hover: #E0A84C;
}

.test-embed-section {
  position: relative;
}

.test-embed-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 28px 62px -38px rgba(38,53,74,.55);
  overflow: hidden;
}

.test-embed-top {
  background:
    radial-gradient(85% 120% at 88% 0%, rgba(224,168,76,.34), transparent 58%),
    linear-gradient(120deg, var(--blue-night), var(--blue-deep));
  color: #EAF1F8;
  padding: 28px;
}

.test-embed-top .eyebrow {
  color: var(--gold-light);
}

.test-embed-top h2 {
  color: #fff;
  font-size: clamp(28px, 3.4vw, 42px);
  margin: 8px 0 10px;
}

.test-embed-top p {
  max-width: 62ch;
  color: #BCD0E2;
  font-size: 15.5px;
}

#testengine {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 28px;
  color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.58;
  text-align: left;
}

#testengine h1,
#testengine h2,
#testengine h3 {
  color: var(--ink);
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  line-height: 1.08;
}

#testengine h2 {
  text-align: center;
  font-size: clamp(28px, 3.4vw, 42px);
}

#testengine a {
  color: var(--blue-deep);
}

#testengine .testengine-loading,
#testengine > img {
  display: block;
  margin: 70px auto;
  height: 72px;
  border: none;
}

#testengine .testengine_block,
#testengine .testengine-result-container,
#testengine .testengine-contacts {
  max-width: 980px;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 20px 48px -38px rgba(38,53,74,.45);
  padding: 24px;
}

#testengine .testengine_block {
  margin: 0 auto 18px;
}

#testengine .testengine_block_2 .testengine_table tr {
  border-bottom: 1px solid var(--border);
}

#testengine .testengine_table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

#testengine .testengine_td {
  color: var(--ink);
  border-color: var(--border);
  padding: 10px 8px;
  font-size: 14px;
}

#testengine .testengine_td_question {
  color: var(--ink);
}

#testengine .testengine_td_field_title {
  color: var(--ink);
  font-weight: 600;
}

#testengine .testengine_required_note,
#testengine .testengine_note,
#testengine .testengine_copyright,
#testengine .testengine_version,
#testengine .testengine-copyright {
  color: var(--ink-soft);
}

#testengine .testengine_input_text,
#testengine .testengine_input_select,
#testengine .testengine_textarea,
#testengine select,
#testengine input[type="text"],
#testengine input[type="email"],
#testengine input[type="tel"],
#testengine input[type="number"] {
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
}

#testengine .testengine_input_text:focus,
#testengine .testengine_input_select:focus,
#testengine .testengine_textarea:focus,
#testengine select:focus,
#testengine input:focus {
  outline: 3px solid rgba(224,168,76,.24);
  border-color: var(--gold-deep);
}

#testengine input[type="radio"],
#testengine input[type="checkbox"] {
  accent-color: var(--blue);
}

#testengine input[type="button"],
#testengine input[type="submit"],
#testengine button,
#testengine .testengine_button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #2A1B05;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  box-shadow: 0 12px 30px -12px rgba(224,168,76,.65);
  cursor: pointer;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 600;
}

#testengine input[type="button"]:hover,
#testengine input[type="submit"]:hover,
#testengine button:hover,
#testengine .testengine_button:hover {
  transform: translateY(-1px);
}

#testengine input[disabled],
#testengine button[disabled] {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
}

#testengine a.start_new_test.btn {
  position: relative !important;
  display: inline-flex !important;
  align-items: center;
  width: auto !important;
  max-width: none !important;
  min-height: 34px !important;
  height: auto !important;
  margin: 16px 0 0 !important;
  padding: 0 2px 2px !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: var(--ink) !important;
  background: transparent !important;
  box-shadow: none !important;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px !important;
  font-style: normal !important;
  font-weight: 500 !important;
  letter-spacing: .01em;
  line-height: 1.35 !important;
  opacity: .78 !important;
  text-align: left !important;
  text-decoration: none !important;
  transition: color .2s ease, opacity .2s ease;
}

#testengine a.start_new_test.btn::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 100%;
  bottom: 0;
  height: 1.5px;
  background: var(--gold);
  transition: right .24s ease;
}

#testengine a.start_new_test.btn:hover,
#testengine a.start_new_test.btn:focus-visible {
  color: var(--ink) !important;
  opacity: 1 !important;
  outline: none !important;
  transform: none !important;
}

#testengine a.start_new_test.btn:hover::after,
#testengine a.start_new_test.btn:focus-visible::after {
  right: 2px;
}

#testengine .testengine_success,
#testengine .testengine_info,
#testengine .testengine_failue {
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 14px;
}

#testengine .testengine_success {
  color: var(--blue-night);
  background: rgba(244,216,160,.55);
  border-color: rgba(194,138,46,.35);
}

#testengine .testengine_info {
  color: var(--blue-night);
  background: rgba(62,110,151,.09);
  border-color: rgba(62,110,151,.22);
}

#testengine .testengine_failue,
#testengine .testengine_alert_bold,
#testengine .testengine_alert_normal {
  color: #8A4C12;
  background: rgba(224,168,76,.14);
  border-color: rgba(194,138,46,.35);
}

#testengine .testengine_line_cursor {
  background: rgba(224,168,76,.18);
}

#testengine .testengine_line_kbd {
  background: var(--blue);
}

#testengine .testengine_line_kbd .testengine_td {
  color: #fff;
}

#testengine .testengine_kbd_switch_on .testengine_kbd_slot {
  background: var(--blue);
}

#testengine .testengine_kbd_switch_off .testengine_kbd_slot {
  background: var(--gold-deep);
}

#testengine .testengine_kbd_handle {
  background: var(--card);
  border-color: var(--border);
}

#testengine .graph-img {
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: 0 20px 48px -38px rgba(38,53,74,.45);
}

@media (max-width: 760px) {
  .test-embed-top,
  #testengine {
    padding: 22px 16px;
  }

  #testengine .testengine_block,
  #testengine .testengine-result-container,
  #testengine .testengine-contacts {
    padding: 16px;
  }

  #testengine .testengine_table,
  #testengine .testengine_table tbody,
  #testengine .testengine_table tr,
  #testengine .testengine_table td {
    display: block;
    width: 100% !important;
  }

  #testengine .testengine_td_radio {
    display: inline-block;
    width: auto !important;
    min-width: 46px;
  }
}

/* Standard theme polish: match site CTA and soften legal note. */
#testengine .btn,
#testengine .btn-primary,
#testengine .testengine-continue,
#testengine .start_new_test,
#testengine input[type="button"],
#testengine input[type="submit"],
#testengine button {
  min-height: 48px;
  padding: 13px 28px;
  border: 1px solid rgba(255,255,255,.34) !important;
  border-radius: 999px !important;
  color: #352508 !important;
  background: linear-gradient(160deg, var(--gold-light), var(--gold)) !important;
  box-shadow: 0 10px 24px rgba(184,134,46,.28), 0 0 0 1px rgba(255,255,255,.38) inset !important;
  font-family: 'Inter', system-ui, sans-serif !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  letter-spacing: .01em;
  text-transform: none;
}

#testengine .btn:hover,
#testengine .btn-primary:hover,
#testengine .testengine-continue:hover,
#testengine .start_new_test:hover,
#testengine input[type="button"]:hover,
#testengine input[type="submit"]:hover,
#testengine button:hover {
  background: linear-gradient(160deg, #e3c37c, var(--gold)) !important;
  box-shadow: 0 14px 30px rgba(184,134,46,.36), 0 0 0 1px rgba(255,255,255,.48) inset !important;
  transform: translateY(-1px);
}

#testengine .testengine-button-block {
  text-align: center;
  margin: 22px 0 18px;
}

#testengine .testengine-copyright,
#testengine .testengine_copyright {
  max-width: 920px;
  margin: 26px auto 0 !important;
  padding: 14px 18px;
  border-top: 1px solid rgba(217,200,166,.72);
  color: rgba(28,43,72,.64) !important;
  font-size: 13px !important;
  line-height: 1.55 !important;
  text-align: center;
}

#testengine .testengine-copyright a,
#testengine .testengine_copyright a {
  color: var(--blue-deep);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
