.rpa-shell {
  --rpa-ink: #17211f;
  --rpa-muted: #61706b;
  --rpa-paper: #f7f3ea;
  --rpa-panel: #ffffff;
  --rpa-line: #d9ded5;
  --rpa-forest: #28614d;
  --rpa-forest-dark: #174636;
  --rpa-gold: #c58a2b;
  --rpa-clay: #9e4b36;
  --rpa-sky: #dcebf0;
  --rpa-focus: #134f7f;
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 24px;
  color: var(--rpa-ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

.rpa-shell,
.rpa-shell * {
  box-sizing: border-box;
}

.rpa-shell button {
  font: inherit;
}

.rpa-intro {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 32px;
  align-items: end;
  padding: 24px 0 28px;
}

.rpa-intro::before {
  content: "";
  position: absolute;
  inset: -36px -20px -18px auto;
  width: min(430px, 48vw);
  background: url("rogueprep-logo.png") center / contain no-repeat;
  opacity: 0.12;
  pointer-events: none;
}

.rpa-intro > * {
  position: relative;
  z-index: 1;
}

.rpa-eyebrow {
  margin: 0 0 8px;
  color: var(--rpa-forest-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.rpa-shell h1,
.rpa-shell h2,
.rpa-shell h3,
.rpa-shell p {
  overflow-wrap: anywhere;
}

.rpa-shell h1 {
  margin: 0;
  font-size: clamp(2.5rem, 7vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.rpa-lede {
  max-width: 660px;
  margin: 18px 0 0;
  color: var(--rpa-muted);
  font-size: 1.12rem;
  line-height: 1.6;
}

.rpa-score-gauge {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  height: 92px;
  align-items: end;
}

.rpa-score-gauge span {
  display: block;
  border: 1px solid rgba(23, 70, 54, 0.2);
  background: var(--rpa-panel);
  border-radius: 8px 8px 2px 2px;
  box-shadow: 0 16px 40px rgba(23, 33, 31, 0.08);
}

.rpa-score-gauge span:nth-child(1) {
  height: 42%;
  border-top-color: var(--rpa-clay);
}

.rpa-score-gauge span:nth-child(2) {
  height: 68%;
  border-top-color: var(--rpa-gold);
}

.rpa-score-gauge span:nth-child(3) {
  height: 100%;
  border-top-color: var(--rpa-forest);
}

.rpa-audit-panel {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--rpa-line);
  border-radius: 8px;
  box-shadow: 0 22px 70px rgba(23, 33, 31, 0.12);
  padding: clamp(20px, 4vw, 42px);
}

.rpa-progress-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--rpa-muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.rpa-progress-track,
.rpa-result-meter {
  height: 10px;
  margin: 14px 0 36px;
  overflow: hidden;
  background: #e8ece6;
  border-radius: 999px;
}

[data-rpa-progress-fill],
[data-rpa-result-meter-fill] {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--rpa-clay), var(--rpa-gold), var(--rpa-forest));
  border-radius: inherit;
  transition: width 220ms ease;
}

[data-rpa-question-title],
.rpa-result-header h2 {
  max-width: 760px;
  margin: 0 0 24px;
  font-size: clamp(1.8rem, 4vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.rpa-answers {
  display: grid;
  gap: 12px;
}

.rpa-answer-button {
  min-height: 70px;
  width: 100%;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--rpa-line);
  border-radius: 8px;
  background: var(--rpa-panel);
  color: var(--rpa-ink);
  cursor: pointer;
  text-align: left;
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.rpa-answer-button:hover,
.rpa-answer-button:focus-visible {
  border-color: var(--rpa-forest);
  box-shadow: 0 12px 32px rgba(40, 97, 77, 0.14);
  transform: translateY(-1px);
}

.rpa-answer-button:focus-visible,
.rpa-ghost-button:focus-visible,
.rpa-primary-button:focus-visible {
  outline: 3px solid var(--rpa-focus);
  outline-offset: 3px;
}

.rpa-answer-index {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 999px;
  background: var(--rpa-sky);
  color: var(--rpa-forest-dark);
  font-weight: 850;
}

.rpa-answer-text {
  font-size: 1.03rem;
  line-height: 1.35;
}

.rpa-nav-row {
  min-height: 46px;
  margin-top: 22px;
}

.rpa-ghost-button,
.rpa-primary-button {
  min-height: 44px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
}

.rpa-ghost-button {
  padding: 0 18px;
  border: 1px solid var(--rpa-line);
  background: transparent;
  color: var(--rpa-forest-dark);
}

.rpa-ghost-button[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
}

.rpa-primary-button {
  padding: 0 22px;
  border: 0;
  background: var(--rpa-forest);
  color: #fff;
}

.rpa-hidden {
  display: none;
}

.rpa-result-header p {
  max-width: 760px;
  color: var(--rpa-muted);
  font-size: 1.06rem;
  line-height: 1.55;
}

.rpa-score-label {
  margin: -20px 0 28px;
  color: var(--rpa-muted);
  font-weight: 800;
}

.rpa-result-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 18px;
  align-items: start;
}

.rpa-result-grid section,
.rpa-next-step,
.rpa-take-action {
  border: 1px solid var(--rpa-line);
  border-radius: 8px;
  background: var(--rpa-panel);
  padding: 20px;
}

.rpa-result-grid section:first-child {
  background: linear-gradient(135deg, rgba(220, 235, 240, 0.72), #fff 58%);
  border-color: rgba(40, 97, 77, 0.28);
}

.rpa-result-grid section:nth-child(2) {
  background: linear-gradient(135deg, rgba(197, 138, 43, 0.12), #fff 55%);
}

.rpa-result-grid h3,
.rpa-next-step h3,
.rpa-take-action h3 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.rpa-shell ul {
  margin: 0;
  padding-left: 20px;
}

.rpa-shell li {
  margin: 0 0 10px;
  color: var(--rpa-muted);
  line-height: 1.45;
}

.rpa-next-step {
  margin: 18px 0;
}

.rpa-next-step p {
  margin: 0;
  color: var(--rpa-muted);
  line-height: 1.55;
}

.rpa-take-action {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 18px 0;
  background: linear-gradient(135deg, rgba(220, 235, 240, 0.8), #fff 55%);
}

.rpa-take-action > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.rpa-take-action p {
  margin: 0;
  color: var(--rpa-muted);
  line-height: 1.55;
}

.rpa-primary-link,
.rpa-secondary-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: 850;
  text-decoration: none;
}

.rpa-primary-link {
  padding: 0 18px;
  background: var(--rpa-forest);
  color: #fff;
}

.rpa-secondary-link {
  padding: 0;
  color: var(--rpa-forest-dark);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.rpa-primary-link:focus-visible,
.rpa-secondary-link:focus-visible {
  outline: 3px solid var(--rpa-focus);
  outline-offset: 3px;
}

.rpa-site-footer {
  margin-top: 18px;
  color: var(--rpa-muted);
  font-size: 0.88rem;
  line-height: 1.45;
  text-align: center;
}

@media (max-width: 720px) {
  .rpa-shell {
    width: min(100% - 22px, 1040px);
    padding-top: 22px;
  }

  .rpa-intro {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .rpa-score-gauge {
    width: 130px;
    height: 58px;
  }

  .rpa-intro::before {
    inset: -18px -36px auto auto;
    width: 260px;
    height: 180px;
    opacity: 0.09;
  }

  .rpa-progress-row,
  .rpa-result-grid,
  .rpa-take-action {
    grid-template-columns: 1fr;
  }

  .rpa-progress-row {
    display: grid;
  }

  .rpa-answer-button {
    grid-template-columns: 32px minmax(0, 1fr);
    min-height: 64px;
  }

  .rpa-answer-index {
    width: 32px;
    height: 32px;
  }
}
