:root {
  --pmt-black: #050303;
  --pmt-black-warm: #0d0708;
  --pmt-wine: #74131d;
  --pmt-wine-light: #a82c34;
  --pmt-copper: #b67950;
  --pmt-ivory: #eee4d4;
  --pmt-muted: #aa9b8f;
  --pmt-line: rgba(238, 228, 212, 0.14);
  --pmt-paper: #eee5d2;
  --pmt-ink: #211b17;
}

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

.pmt-shell {
  position: relative;
  width: 100vw;
  min-height: 100vh;
  margin-left: calc(50% - 50vw);
  overflow: hidden;
  color: var(--pmt-ivory);
  background:
    radial-gradient(circle at 78% 8%, rgba(116, 19, 29, 0.18), transparent 32%),
    radial-gradient(circle at 14% 86%, rgba(182, 121, 80, 0.08), transparent 30%),
    var(--pmt-black);
  font-family: "Iowan Old Style", Baskerville, "Palatino Linotype", Georgia, serif;
}

.pmt-grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.14;
  background-image: repeating-radial-gradient(circle at 22% 31%, transparent 0, rgba(255,255,255,.035) 1px, transparent 2px, transparent 7px);
  mix-blend-mode: soft-light;
}

.pmt-stage {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: min(1160px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 56px 0;
}

.pmt-card {
  position: relative;
  width: 100%;
  border: 1px solid var(--pmt-line);
  background: linear-gradient(150deg, rgba(17, 9, 10, 0.94), rgba(5, 3, 3, 0.98));
  box-shadow: 0 34px 90px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.025);
}

.pmt-card::before,
.pmt-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.pmt-card::before {
  inset: 10px;
  border: 1px solid rgba(182, 121, 80, .12);
}

.pmt-card::after {
  top: -1px;
  left: 8%;
  width: 84%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--pmt-wine-light), transparent);
}

.pmt-intro {
  max-width: 860px;
  padding: clamp(48px, 7vw, 86px);
  text-align: center;
}

.pmt-kicker,
.pmt-overline,
.pmt-step-label {
  color: var(--pmt-copper);
  font-family: "Courier New", monospace;
  font-size: 10px;
  letter-spacing: .24em;
  text-transform: uppercase;
}

.pmt-seal {
  position: relative;
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  margin: 0 auto 30px;
  border: 1px solid rgba(182, 121, 80, .74);
  border-radius: 50%;
  color: var(--pmt-ivory);
  font-size: 25px;
  letter-spacing: .08em;
  box-shadow: 0 0 55px rgba(116, 19, 29, .24);
}

.pmt-seal::before,
.pmt-seal::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.pmt-seal::before {
  inset: 7px;
  border: 1px solid rgba(238, 228, 212, .22);
}

.pmt-seal::after {
  inset: 20px;
  border: 1px solid var(--pmt-wine-light);
}

.pmt-intro h1,
.pmt-result h1 {
  margin: 16px 0 10px;
  color: var(--pmt-ivory);
  font-size: clamp(42px, 7vw, 76px);
  font-weight: 500;
  letter-spacing: .11em;
  line-height: .98;
  text-transform: uppercase;
}

.pmt-intro h2 {
  margin: 20px 0;
  color: var(--pmt-ivory);
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 400;
  line-height: 1.25;
}

.pmt-intro p {
  max-width: 650px;
  margin: 0 auto;
  color: var(--pmt-muted);
  font-size: 16px;
  line-height: 1.75;
}

.pmt-route-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-width: 620px;
  margin: 40px auto 0;
}

.pmt-btn,
.pmt-route,
.pmt-option {
  appearance: none;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  font: inherit;
}

.pmt-route {
  position: relative;
  min-height: 124px;
  padding: 24px 20px;
  border: 1px solid rgba(238, 228, 212, .16);
  color: var(--pmt-ivory);
  background: rgba(255,255,255,.018);
  text-align: left;
  transition: border-color .25s ease, background .25s ease, transform .25s ease;
}

.pmt-route:hover,
.pmt-route:focus-visible {
  border-color: rgba(182, 121, 80, .72);
  background: rgba(116, 19, 29, .12);
  transform: translateY(-2px);
  outline: 0;
}

.pmt-route span {
  display: block;
  margin-bottom: 9px;
  color: var(--pmt-copper);
  font-family: "Courier New", monospace;
  font-size: 9px;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.pmt-route strong {
  display: block;
  font-size: 24px;
  font-weight: 400;
}

.pmt-route small {
  display: block;
  margin-top: 6px;
  color: var(--pmt-muted);
  font-size: 12px;
  line-height: 1.45;
}

.pmt-test-card {
  padding: 34px clamp(22px, 5vw, 58px) 32px;
}

.pmt-test-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--pmt-line);
}

.pmt-test-head h2 {
  margin: 7px 0 0;
  color: var(--pmt-ivory);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 400;
}

.pmt-progress-wrap {
  width: min(280px, 35%);
  padding-top: 8px;
}

.pmt-progress-copy {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--pmt-muted);
  font-family: "Courier New", monospace;
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.pmt-progress {
  height: 2px;
  overflow: hidden;
  background: rgba(238, 228, 212, .1);
}

.pmt-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--pmt-wine), var(--pmt-copper));
  transition: width .35s ease;
}

.pmt-question-list {
  display: grid;
  gap: 16px;
}

.pmt-question {
  padding: 22px;
  border: 1px solid rgba(238, 228, 212, .11);
  background: rgba(255,255,255,.012);
}

.pmt-question-number {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--pmt-wine-light);
  font-family: "Courier New", monospace;
  font-size: 9px;
  letter-spacing: .14em;
}

.pmt-question h3 {
  margin: 0 0 16px;
  color: var(--pmt-ivory);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.45;
}

.pmt-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.pmt-option {
  position: relative;
  display: flex;
  align-items: flex-start;
  min-height: 62px;
  padding: 13px 14px 13px 43px;
  border: 1px solid rgba(238, 228, 212, .12);
  color: #d8ccbd;
  background: rgba(0,0,0,.16);
  font-size: 13px;
  line-height: 1.42;
  text-align: left;
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}

.pmt-option::before {
  content: attr(data-letter);
  position: absolute;
  top: 13px;
  left: 13px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid rgba(182, 121, 80, .45);
  border-radius: 50%;
  color: var(--pmt-copper);
  font-family: "Courier New", monospace;
  font-size: 9px;
}

.pmt-option:hover,
.pmt-option:focus-visible {
  border-color: rgba(182, 121, 80, .55);
  outline: 0;
}

.pmt-option.is-selected {
  border-color: var(--pmt-wine-light);
  color: var(--pmt-ivory);
  background: rgba(116, 19, 29, .2);
}

.pmt-option.is-selected::before {
  border-color: var(--pmt-wine-light);
  color: var(--pmt-ivory);
  background: var(--pmt-wine);
}

.pmt-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 24px;
}

.pmt-btn {
  min-height: 48px;
  padding: 14px 22px;
  border: 1px solid var(--pmt-copper);
  color: var(--pmt-ivory);
  background: transparent;
  font-family: "Courier New", monospace;
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  transition: background .22s ease, color .22s ease, opacity .22s ease;
}

.pmt-btn:hover,
.pmt-btn:focus-visible {
  color: #fff;
  background: rgba(182, 121, 80, .12);
  outline: 0;
}

.pmt-btn-primary {
  border-color: var(--pmt-wine-light);
  background: var(--pmt-wine);
}

.pmt-btn-primary:hover,
.pmt-btn-primary:focus-visible {
  background: #8b1a24;
}

.pmt-btn:disabled {
  cursor: not-allowed;
  opacity: .28;
}

.pmt-btn-ghost {
  border-color: rgba(238, 228, 212, .16);
  color: var(--pmt-muted);
}

.pmt-save-state {
  color: #776b61;
  font-family: "Courier New", monospace;
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.pmt-identity {
  width: min(760px, 100%);
  padding: clamp(42px, 7vw, 76px);
  text-align: center;
}

.pmt-identity h2 {
  margin: 12px 0;
  color: var(--pmt-ivory);
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 400;
}

.pmt-identity > p {
  max-width: 560px;
  margin: 0 auto 32px;
  color: var(--pmt-muted);
  line-height: 1.65;
}

.pmt-form {
  display: grid;
  gap: 14px;
  max-width: 520px;
  margin: 0 auto;
  text-align: left;
}

.pmt-field label {
  display: block;
  margin-bottom: 7px;
  color: var(--pmt-copper);
  font-family: "Courier New", monospace;
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.pmt-field input {
  width: 100%;
  height: 54px;
  border: 1px solid rgba(238, 228, 212, .17);
  border-radius: 0;
  outline: 0;
  padding: 0 16px;
  color: var(--pmt-ivory);
  background: rgba(255,255,255,.025);
  font-family: inherit;
  font-size: 16px;
}

.pmt-field input:focus {
  border-color: var(--pmt-copper);
}

.pmt-error {
  min-height: 20px;
  margin: 0;
  color: #d77d82;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.pmt-result {
  padding: clamp(32px, 6vw, 68px);
}

.pmt-result-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 34px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--pmt-line);
}

.pmt-result h1 {
  max-width: 760px;
  margin: 12px 0;
  font-size: clamp(34px, 6vw, 64px);
  letter-spacing: .04em;
  text-transform: none;
}

.pmt-result-name {
  color: var(--pmt-copper);
  font-size: 17px;
  font-style: italic;
}

.pmt-result-seal {
  display: grid;
  place-items: center;
  width: 130px;
  height: 130px;
  border: 1px solid var(--pmt-wine-light);
  border-radius: 50%;
  color: var(--pmt-ivory);
  text-align: center;
  box-shadow: inset 0 0 0 8px var(--pmt-black), inset 0 0 0 9px rgba(182,121,80,.35), 0 0 54px rgba(116,19,29,.2);
}

.pmt-result-seal span {
  max-width: 90px;
  font-family: "Courier New", monospace;
  font-size: 9px;
  letter-spacing: .12em;
  line-height: 1.45;
  text-transform: uppercase;
}

.pmt-pronouncement {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(240px, .75fr);
  gap: clamp(28px, 5vw, 64px);
  padding: 38px 0;
}

.pmt-copy p {
  margin: 0 0 18px;
  color: #d7cbbb;
  font-size: 16px;
  line-height: 1.75;
}

.pmt-copy p:first-child::first-letter {
  float: left;
  margin: 5px 7px 0 0;
  color: var(--pmt-wine-light);
  font-size: 52px;
  line-height: .8;
}

.pmt-reading {
  display: grid;
  align-content: start;
  gap: 10px;
}

.pmt-reading-item {
  padding: 16px;
  border: 1px solid rgba(238, 228, 212, .11);
}

.pmt-reading-item span {
  display: block;
  margin-bottom: 6px;
  color: var(--pmt-wine-light);
  font-family: "Courier New", monospace;
  font-size: 8px;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.pmt-reading-item strong {
  color: var(--pmt-ivory);
  font-size: 15px;
  font-weight: 400;
}

.pmt-precepts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.pmt-precept {
  min-height: 140px;
  padding: 20px;
  border-top: 1px solid var(--pmt-wine-light);
  background: rgba(255,255,255,.018);
}

.pmt-precept span {
  display: block;
  margin-bottom: 12px;
  color: var(--pmt-copper);
  font-family: "Courier New", monospace;
  font-size: 9px;
  letter-spacing: .18em;
}

.pmt-precept p {
  margin: 0;
  color: #cfc2b3;
  font-size: 14px;
  line-height: 1.55;
}

.pmt-result-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 26px;
  border-top: 1px solid var(--pmt-line);
}

.pmt-result-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.pmt-signature {
  color: var(--pmt-muted);
  font-size: 12px;
  line-height: 1.5;
}

.pmt-signature strong {
  display: block;
  color: var(--pmt-ivory);
  font-family: "Snell Roundhand", "URW Chancery L", "Brush Script MT", cursive;
  font-size: 22px;
  font-weight: 400;
}

.pmt-locked-wrap {
  display: grid;
  place-items: center;
  min-height: 62vh;
  padding: 30px;
  color: var(--pmt-ivory);
  background: var(--pmt-black);
}

.pmt-locked {
  padding: 52px;
  border: 1px solid rgba(182,121,80,.28);
  color: var(--pmt-muted);
  background: #090506;
  text-align: center;
}

.pmt-locked span {
  color: var(--pmt-copper);
  font-family: "Courier New", monospace;
  font-size: 9px;
  letter-spacing: .2em;
}

.pmt-locked h2 {
  margin: 16px 0 8px;
  color: var(--pmt-ivory);
  font-size: 32px;
  font-weight: 400;
}

@media (max-width: 820px) {
  .pmt-stage {
    width: min(100% - 22px, 720px);
    padding: 22px 0;
  }

  .pmt-test-head,
  .pmt-result-head {
    display: block;
  }

  .pmt-progress-wrap {
    width: 100%;
    margin-top: 18px;
  }

  .pmt-options,
  .pmt-pronouncement {
    grid-template-columns: 1fr;
  }

  .pmt-result-seal {
    width: 106px;
    height: 106px;
    margin-top: 24px;
  }

  .pmt-precepts {
    grid-template-columns: 1fr;
  }

  .pmt-precept {
    min-height: 0;
  }
}

@media (max-width: 560px) {
  .pmt-intro,
  .pmt-identity,
  .pmt-result {
    padding: 42px 22px;
  }

  .pmt-route-grid {
    grid-template-columns: 1fr;
  }

  .pmt-test-card {
    padding: 24px 12px 20px;
  }

  .pmt-question {
    padding: 17px 13px;
  }

  .pmt-question h3 {
    font-size: 16px;
  }

  .pmt-option {
    min-height: 0;
    padding: 12px 11px 12px 39px;
  }

  .pmt-actions {
    align-items: stretch;
  }

  .pmt-actions .pmt-btn {
    flex: 1;
    padding-right: 10px;
    padding-left: 10px;
  }

  .pmt-save-state {
    display: none;
  }

  .pmt-result-actions {
    align-items: stretch;
  }

  .pmt-result-actions .pmt-btn {
    width: 100%;
  }

  .pmt-result-buttons {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pmt-shell *,
  .pmt-shell *::before,
  .pmt-shell *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
