:root {
  --jra-primary: #2356a5;
  --jra-primary-dark: #173e7c;
  --jra-navy: #0f2a4f;
  --jra-accent: #ff794a;
  --jra-paper: #fbfaf7;
  --jra-surface: #fff;
  --jra-soft: #f4f2ec;
  --jra-border: #e3e0d6;
  --jra-text: #0f1b2d;
  --jra-muted: #5a6577;
  --jra-success: #1f7a4d;
  --jra-warning: #b76b0b;
  --jra-danger: #c43c32;
}

#jra {
  background: var(--jra-paper);
  color: var(--jra-text);
  font-family: "Inter", system-ui, sans-serif;
  min-height: 70vh;
}

#jra *, #jra *::before, #jra *::after { box-sizing: border-box; }
#jra h1, #jra h2, #jra h3, #jra p, #jra ul, #jra ol { margin: 0; }
#jra ul, #jra ol { padding: 0; }
#jra button, #jra input, #jra select { font: inherit; }
#jra a { text-decoration: none; }
#jra :focus-visible { outline: 3px solid var(--jra-accent); outline-offset: 3px; }

.jra-container {
  width: min(100% - 2rem, 1120px);
  margin-inline: auto;
}

.jra-screen { display: none; }
.jra-screen.is-active { display: block; animation: jra-in .25s ease-out; }
@keyframes jra-in { from { opacity: 0; transform: translateY(8px); } }

.jra-opening { padding-block: clamp(3rem, 8vw, 6.5rem); }
.jra-eyebrow {
  color: var(--jra-accent);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.jra-opening h1,
.jra-basic-result h2 {
  color: var(--jra-navy);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2.6rem, 7vw, 5.25rem);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.04;
  margin-top: .8rem;
  max-width: 900px;
}

.jra-lead {
  color: var(--jra-muted);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.7;
  margin-top: 1.4rem !important;
  max-width: 760px;
}

.jra-facts {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-block: 2.5rem;
  max-width: 760px;
}

.jra-facts div {
  align-items: baseline;
  background: var(--jra-surface);
  border: 1px solid var(--jra-border);
  border-radius: 1rem;
  display: flex;
  gap: .5rem;
  padding: 1.2rem;
}

.jra-facts strong { color: var(--jra-primary); font-size: 1.5rem; }
.jra-facts span { color: var(--jra-muted); font-size: .9rem; }

.jra-readiness-panel {
  background: var(--jra-soft);
  border: 1px solid var(--jra-border);
  border-radius: 1.25rem;
  margin-bottom: 2rem;
  max-width: 900px;
  padding: 1.5rem;
}

.jra-readiness-panel h2, .jra-trust h2, .jra-lead-panel h2, .jra-detailed h2 {
  color: var(--jra-navy);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 600;
}

.jra-readiness-panel ul {
  display: grid;
  gap: .6rem;
  grid-template-columns: repeat(5, 1fr);
  list-style: none;
  margin-top: 1.25rem !important;
}

.jra-readiness-panel li {
  background: #fff;
  border-radius: .75rem;
  font-size: .82rem;
  font-weight: 600;
  padding: .85rem .6rem;
  text-align: center;
}

.jra-btn {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  min-height: 3.15rem;
  padding: .8rem 1.5rem;
  transition: .18s ease;
}

.jra-btn-primary { background: var(--jra-primary); color: #fff !important; }
.jra-btn-primary:hover { background: var(--jra-primary-dark); transform: translateY(-1px); }
.jra-btn-secondary { background: #fff; border-color: var(--jra-border); color: var(--jra-navy); }
.jra-btn-secondary:hover { border-color: var(--jra-navy); }
.jra-btn:disabled { cursor: wait; opacity: .65; transform: none; }
.jra-disclaimer { color: var(--jra-muted); font-size: .82rem; margin-top: 1rem !important; }

.jra-question-wrap { max-width: 820px; padding-block: clamp(2.5rem, 7vw, 5rem); }
.jra-progress-meta { display: flex; justify-content: space-between; gap: 1rem; }
.jra-progress-meta p { color: var(--jra-muted); font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.jra-progress { background: #dfe5eb; border-radius: 999px; height: .65rem; margin-top: .75rem; overflow: hidden; }
.jra-progress span { background: var(--jra-primary); display: block; height: 100%; transition: width .25s ease; width: 0; }

.jra-question-card {
  background: #fff;
  border: 1px solid var(--jra-border);
  border-radius: 1.5rem;
  box-shadow: 0 20px 50px rgba(15, 42, 79, .08);
  margin-top: 2rem;
  padding: clamp(1.35rem, 5vw, 2.75rem);
}

.jra-question-card h2 {
  color: var(--jra-navy);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  font-weight: 600;
  line-height: 1.2;
}

.jra-question-note { color: var(--jra-muted); line-height: 1.6; margin-top: .75rem !important; }
.jra-answers { display: grid; gap: .7rem; margin-top: 1.7rem; }
.jra-answer {
  align-items: center;
  background: #fff;
  border: 1px solid #cbd4dd;
  border-radius: 1rem;
  color: var(--jra-text);
  cursor: pointer;
  display: flex;
  font-weight: 600;
  gap: .8rem;
  min-height: 3.8rem;
  padding: .9rem 1rem;
  text-align: left;
  width: 100%;
}
.jra-answer:hover { border-color: var(--jra-primary); }
.jra-answer.is-selected { background: #edf3fb; border: 2px solid var(--jra-primary); padding: calc(.9rem - 1px) calc(1rem - 1px); }
.jra-answer-dot { border: 2px solid #8493a2; border-radius: 50%; flex: none; height: 1.2rem; width: 1.2rem; }
.jra-answer.is-selected .jra-answer-dot { background: var(--jra-primary); box-shadow: inset 0 0 0 3px #fff; }
.jra-question-actions { display: flex; justify-content: space-between; margin-top: 1.7rem; }
.jra-alert { border-radius: .75rem; font-size: .9rem; margin-top: 1rem !important; padding: .8rem 1rem; }
.jra-alert-error { background: #fcebea; color: #941f18; }

.jra-results-wrap { padding-block: clamp(2.5rem, 7vw, 5rem); position: relative; }
.jra-text-button {
  align-items: center;
  background: var(--jra-surface);
  border: 1px solid var(--jra-border);
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(15, 42, 79, .06);
  color: var(--jra-navy);
  cursor: pointer;
  display: inline-flex;
  font-size: .85rem;
  font-weight: 700;
  gap: .45rem;
  min-height: 2.6rem;
  padding: .6rem 1rem;
  position: absolute;
  right: 0;
  top: 2rem;
  transition: border-color .2s ease, color .2s ease, transform .2s ease;
}
.jra-text-button::before {
  color: var(--jra-accent);
  content: "↻";
  font-size: 1.1rem;
  line-height: 1;
}
.jra-text-button:hover {
  border-color: var(--jra-primary);
  color: var(--jra-primary);
  transform: translateY(-1px);
}
.jra-basic-result { max-width: 900px; }
.jra-basic-result h2 { font-size: clamp(2.2rem, 5vw, 4.2rem); }
.jra-overall {
  background: #fff;
  border: 1px solid var(--jra-border);
  border-radius: 1.25rem;
  display: grid;
  margin-block: 2rem;
  max-width: 360px;
  padding: 1.5rem;
}
.jra-overall span { color: var(--jra-muted); font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.jra-overall strong { color: var(--jra-navy); font-family: "Playfair Display", Georgia, serif; font-size: 4rem; line-height: 1.15; }
.jra-overall small { color: var(--jra-muted); line-height: 1.5; }

.jra-lead-panel {
  background: var(--jra-navy);
  border-radius: 1.5rem;
  color: #fff;
  display: grid;
  gap: 2.5rem;
  grid-template-columns: .8fr 1.2fr;
  margin-top: 3rem;
  padding: clamp(1.5rem, 5vw, 3rem);
}
.jra-lead-panel h2 { color: #fff; margin-top: .6rem !important; }
.jra-lead-panel > div > p:last-child { color: rgba(255,255,255,.72); line-height: 1.7; margin-top: 1rem !important; }
.jra-form-grid { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
.jra-form-grid label { color: #fff; display: grid; font-size: .86rem; font-weight: 600; gap: .4rem; }
.jra-form-grid input,
.jra-form-grid select {
  background: #fff;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: .75rem;
  color: var(--jra-text);
  min-height: 3rem;
  padding: .7rem .85rem;
  width: 100%;
}
.jra-form-grid select { cursor: pointer; }
.jra-consent { align-items: flex-start; color: rgba(255,255,255,.8); display: flex; font-size: .78rem; gap: .65rem; line-height: 1.55; margin-block: 1rem; }
.jra-consent input { flex: none; height: 1rem; margin-top: .15rem; width: 1rem; }
.jra-consent a { color: #fff; text-decoration: underline !important; }

.jra-detailed { margin-top: 3rem; scroll-margin-top: 6rem; }
.jra-score-bars { background: var(--jra-soft); border: 1px solid var(--jra-border); border-radius: 1.25rem; display: grid; gap: 1.25rem; margin-top: 1.5rem; padding: clamp(1.25rem, 4vw, 2rem); }
.jra-score-row header { display: flex; font-size: .9rem; font-weight: 700; justify-content: space-between; margin-bottom: .5rem; }
.jra-score-track { background: #dfe5eb; border-radius: 999px; height: .6rem; overflow: hidden; }
.jra-score-track span { border-radius: inherit; display: block; height: 100%; }
.jra-detail-grid { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; margin-top: 1rem; }
.jra-detail-grid article { background: #fff; border: 1px solid var(--jra-border); border-radius: 1.25rem; padding: 1.5rem; }
.jra-detail-grid h3 { color: var(--jra-navy); font-family: "Playfair Display", Georgia, serif; font-size: 1.45rem; font-weight: 600; }
.jra-detail-grid ol { display: grid; gap: .9rem; list-style: none; margin-top: 1rem !important; }
.jra-detail-grid li { display: flex; gap: .75rem; line-height: 1.6; }
.jra-detail-grid li span:first-child { align-items: center; background: #e9eef3; border-radius: 50%; display: flex; flex: none; font-size: .75rem; font-weight: 700; height: 1.6rem; justify-content: center; width: 1.6rem; }
.jra-detail-grid p { color: var(--jra-muted); line-height: 1.75; margin-top: 1rem !important; }

.jra-trust { border-top: 1px solid var(--jra-border); padding-block: clamp(3rem, 7vw, 5rem); }
.jra-trust-grid { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; margin-top: 1.5rem; }
.jra-trust article { background: #fff; border: 1px solid var(--jra-border); border-radius: 1.25rem; padding: 1.5rem; }
.jra-trust h3 { color: var(--jra-success); font-size: 1.2rem; font-weight: 700; }
.jra-trust article:last-child h3 { color: var(--jra-danger); }
.jra-trust ul { color: var(--jra-muted); display: grid; gap: .5rem; line-height: 1.6; list-style: disc; margin: 1rem 0 0 1.1rem !important; }

/* Back to top control supplied by the shared site layout */
#backToTopBtn {
  bottom: 3.25rem;
  cursor: pointer;
  display: none;
  position: fixed;
  right: 1.25rem;
  z-index: 9999;
}

#backToTopBtn > div {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#backToTopBtn button {
  align-items: center;
  background: var(--jra-accent);
  border: 3px solid var(--jra-accent);
  border-radius: 50%;
  box-shadow: 0 6px 18px rgba(255, 121, 74, .3);
  color: #fff;
  display: inline-flex;
  height: 2.75rem;
  justify-content: center;
  padding: 0;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
  width: 2.75rem;
}

#backToTopBtn button:hover {
  background: var(--jra-primary);
  border-color: var(--jra-primary);
  transform: translateY(-2px);
}

#backToTopBtn p {
  color: var(--jra-accent);
  font-size: .78rem;
  font-weight: 600;
  margin: .35rem 0 0;
  white-space: nowrap;
}

@media (max-width: 767px) {
  .jra-facts { grid-template-columns: 1fr; }
  .jra-facts div { justify-content: center; }
  .jra-readiness-panel ul { grid-template-columns: 1fr 1fr; }
  .jra-lead-panel, .jra-form-grid, .jra-detail-grid, .jra-trust-grid { grid-template-columns: 1fr; }
  .jra-question-actions { flex-direction: column-reverse; gap: .7rem; }
  .jra-question-actions .jra-btn { width: 100%; }
  .jra-text-button { position: static; margin-bottom: 1.5rem; }
  .jra-basic-result > .jra-btn { width: 100%; }
  #backToTopBtn { bottom: 1rem; right: .8rem; }
  #backToTopBtn p { display: none; }
}

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