:root {
  --pj-red: #da281c;
  --pj-red-dark: #a31914;
  --pj-green: #2d5d2a;
  --pj-cream: #f5d4d1;
  --pj-sand: #fbeeec;
  --pj-dark: #1c1c1c;
  --ink-soft: rgba(28, 28, 28, 0.72);
  --line: rgba(28, 28, 28, 0.12);
  --surface: #ffffff;
  --success: #267340;
  --error-bg: #fff0ef;
  --error-line: #da281c;
  --focus: rgba(45, 93, 42, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--pj-sand);
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, var(--pj-cream) 0, var(--pj-sand) 360px, #fff8f7 100%);
  color: var(--pj-dark);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

.site-header {
  background: rgba(251, 238, 236, 0.92);
  border-bottom: 1px solid rgba(28, 28, 28, 0.08);
}

.site-header-inner {
  width: min(1120px, calc(100% - 40px));
  min-height: 78px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-logo {
  display: block;
  width: min(220px, 56vw);
  height: auto;
}

.training-pill {
  flex: 0 0 auto;
  border: 1px solid rgba(45, 93, 42, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--pj-green);
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.shell {
  width: min(920px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: end;
  padding: 26px 0 12px;
}

.eyebrow,
.step-label {
  margin: 0 0 8px;
  color: var(--pj-green);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--pj-dark);
}

h1 {
  max-width: 760px;
  margin-bottom: 12px;
  font-family: Fraunces, Georgia, serif;
  font-size: 60px;
  font-weight: 900;
  line-height: 1.02;
}

h2 {
  margin-bottom: 18px;
  font-family: Fraunces, Georgia, serif;
  font-size: 34px;
  font-weight: 800;
  line-height: 1.05;
}

h3 {
  margin-bottom: 10px;
  font-family: Fraunces, Georgia, serif;
  font-size: 23px;
  line-height: 1.15;
}

.hero-text {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.55;
}

.hero-note {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 16px;
  border: 1px solid rgba(28, 28, 28, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 24px 44px -32px rgba(218, 40, 28, 0.45);
}

.hero-note strong,
.hero-note span {
  display: block;
}

.hero-note strong {
  margin-bottom: 2px;
  font-size: 15px;
}

.hero-note span:not(.status-dot) {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.3;
}

.status-dot {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--pj-green);
  box-shadow: 0 0 0 5px rgba(45, 93, 42, 0.12);
}

.panel {
  margin-top: 20px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 22px 50px -36px rgba(28, 28, 28, 0.4);
}

.hidden {
  display: none;
}

.language-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.primary {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: var(--pj-red);
  color: #fff;
  padding: 12px 18px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.primary:hover {
  background: var(--pj-red-dark);
  box-shadow: 0 16px 30px -18px rgba(218, 40, 28, 0.7);
  transform: translateY(-1px);
}

.primary:active {
  transform: translateY(0);
}

.secondary {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(45, 93, 42, 0.26);
  border-radius: 999px;
  background: #fff;
  color: var(--pj-green);
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.secondary:hover {
  border-color: rgba(45, 93, 42, 0.52);
  box-shadow: 0 14px 26px -20px rgba(45, 93, 42, 0.72);
  transform: translateY(-1px);
}

.secondary:active {
  transform: translateY(0);
}

.primary:focus-visible,
.secondary:focus-visible,
input:focus-visible {
  outline: 4px solid var(--focus);
  outline-offset: 2px;
}

.form-grid {
  display: grid;
  gap: 15px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--pj-dark);
  font-size: 14px;
  font-weight: 800;
}

input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(28, 28, 28, 0.18);
  border-radius: 8px;
  background: #fff;
  color: var(--pj-dark);
  padding: 10px 12px;
  font-size: 16px;
}

input:hover {
  border-color: rgba(45, 93, 42, 0.36);
}

.module {
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.module:first-child {
  padding-top: 2px;
  border-top: 0;
}

.module p {
  color: var(--ink-soft);
  line-height: 1.55;
}

.module p strong {
  color: var(--pj-dark);
}

.module-kicker {
  margin-bottom: 8px;
  color: var(--pj-green);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.key-points {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.key-points li {
  position: relative;
  padding-left: 20px;
  color: var(--ink-soft);
  line-height: 1.45;
}

.key-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--pj-green);
}

.scenario {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(218, 40, 28, 0.16);
  border-radius: 8px;
  background: #fff7f6;
}

.scenario span {
  display: block;
  margin-bottom: 6px;
  color: var(--pj-red-dark);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.scenario p {
  margin-bottom: 0;
}

.knowledge-check {
  margin-top: 16px;
}

.choices {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.choice {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  min-height: 52px;
  border: 1px solid rgba(28, 28, 28, 0.14);
  border-radius: 8px;
  background: #fff;
  padding: 12px 14px;
  color: var(--pj-dark);
  font-weight: 700;
  line-height: 1.35;
}

.choice input {
  width: 20px;
  min-height: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--pj-red);
}

.choice span {
  overflow-wrap: anywhere;
}

.choice:has(input:checked) {
  border-color: rgba(45, 93, 42, 0.5);
  box-shadow: 0 0 0 3px rgba(45, 93, 42, 0.08);
}

.choice.is-wrong,
.choice.is-wrong:has(input:checked) {
  border-color: var(--error-line);
  background: var(--error-bg);
  color: var(--pj-red-dark);
  box-shadow: 0 0 0 3px rgba(218, 40, 28, 0.1);
}

.choice.is-wrong input {
  accent-color: var(--pj-red);
}

.choice.is-correct,
.choice.is-correct:has(input:checked) {
  border-color: rgba(38, 115, 64, 0.55);
  background: #f2fbf5;
  color: #1d5f35;
}

.choice-feedback {
  min-height: 18px;
  margin: 9px 0 0;
  color: var(--pj-red-dark);
  font-size: 13px;
  font-weight: 800;
}

.verified-summary {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(45, 93, 42, 0.2);
  border-radius: 8px;
  background: #f7fbf7;
  padding: 14px;
}

.verified-summary[hidden] {
  display: none;
}

.verified-summary span {
  color: var(--pj-green);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.verified-summary strong {
  color: var(--pj-dark);
  font-size: 18px;
}

.verified-summary small {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}

.review-action {
  margin-top: 12px;
}

.review-banner {
  margin: -4px 0 18px;
  border: 1px solid rgba(45, 93, 42, 0.2);
  border-radius: 8px;
  background: #f7fbf7;
  color: var(--pj-green);
  padding: 12px 14px;
  font-weight: 800;
  line-height: 1.4;
}

.message {
  min-height: 22px;
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-weight: 800;
  line-height: 1.4;
}

.message.error {
  color: var(--pj-red-dark);
}

@media (max-width: 760px) {
  .site-header-inner {
    width: min(100% - 28px, 1120px);
    min-height: 68px;
  }

  .brand-logo {
    width: min(174px, 52vw);
  }

  .training-pill {
    padding: 7px 10px;
    font-size: 11px;
  }

  .shell {
    width: min(100% - 24px, 920px);
    padding: 16px 0 36px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 16px;
    padding-top: 18px;
  }

  .hero-text {
    font-size: 16px;
  }

  h1 {
    font-size: 40px;
  }

  h2 {
    font-size: 30px;
  }

  .panel {
    margin-top: 14px;
    padding: 18px;
  }

  .language-actions {
    grid-template-columns: 1fr;
  }

  .primary {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .site-header-inner {
    width: min(100% - 20px, 1120px);
    gap: 10px;
  }

  .brand-logo {
    width: min(150px, 48vw);
  }

  .training-pill {
    max-width: 124px;
    text-align: center;
  }

  .shell {
    width: min(100% - 18px, 920px);
  }

  .panel {
    padding: 16px;
  }

  h1 {
    font-size: 35px;
  }

  h2 {
    font-size: 28px;
  }

  .choice {
    grid-template-columns: 20px minmax(0, 1fr);
    padding: 12px;
  }
}

/* Completion (thank-you) panel */
.done-check {
  font-size: 3rem;
  line-height: 1;
  color: #1a7f37;
  text-align: center;
  margin-bottom: 0.5rem;
}
#done-panel { text-align: center; }
#done-panel #done-text { font-size: 1.05rem; }
