:root {
  color-scheme: dark;
  --mat: #08271e;
  --mat-deep: #041710;
  --paper: #f1ead8;
  --paper-light: #fffaf0;
  --ink: #101712;
  --muted: #6e7268;
  --red: #bd3025;
  --red-dark: #7f1c17;
  --yellow: #d6bf6d;
  --green: #1d614a;
  --line: rgba(16, 23, 18, .25);
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  --sans: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--paper);
  font-family: var(--sans);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    radial-gradient(circle at 18% 0, rgba(49, 125, 91, .26), transparent 30%),
    var(--mat-deep);
  background-size: 54px 54px, 54px 54px, auto, auto;
}

.site-registration {
  padding: 0 16px 28px;
  color: rgba(241, 234, 216, .72);
  text-align: center;
  font-size: 13px;
  line-height: 1.7;
}

.site-registration a {
  display: inline-block;
  padding: 6px 0;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.site-registration a:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 4px;
}

button,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

.skip-link {
  position: fixed;
  top: 6px;
  left: 6px;
  z-index: 2000;
  padding: 9px 12px;
  color: var(--ink);
  background: var(--paper);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: none;
}

.site-bar {
  position: sticky;
  top: 0;
  z-index: 900;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 66px;
  padding: 8px max(16px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid rgba(241, 234, 216, .2);
  background: rgba(4, 23, 16, .94);
  backdrop-filter: blur(14px);
}

.site-tools {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 10px;
}

.locale-switch {
  display: inline-flex;
  border: 1px solid rgba(241, 234, 216, .34);
}

.locale-switch button {
  min-width: 42px;
  min-height: 36px;
  padding: 0 9px;
  color: var(--paper);
  border: 0;
  background: transparent;
  font-size: 12px;
  font-weight: 900;
}

.locale-switch button + button {
  border-left: 1px solid rgba(241, 234, 216, .34);
}

.locale-switch button[aria-pressed="true"] {
  color: var(--ink);
  background: var(--yellow);
}

html[lang="en"] .intro-copy h1,
html[lang="en"] .result-intro h1,
html[lang="pt"] .intro-copy h1,
html[lang="pt"] .result-intro h1 {
  font-family: var(--sans);
  letter-spacing: -.055em;
}

html[lang="en"] .intro-copy h1 {
  font-size: clamp(48px, 6.8vw, 90px);
  line-height: .98;
}

html[lang="en"] .answer-copy strong,
html[lang="en"] .relationship-card strong,
html[lang="pt"] .answer-copy strong,
html[lang="pt"] .relationship-card strong {
  line-height: 1.15;
}

html[lang="pt"] .intro-copy h1 {
  font-size: clamp(46px, 6.4vw, 84px);
  line-height: .98;
}

.site-return {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 9px;
  color: var(--paper);
  text-decoration: none;
  font-weight: 800;
}

.site-return img {
  border: 1px solid rgba(255, 255, 255, .45);
  padding: 2px;
  background: var(--paper);
  transform: rotate(-3deg);
}

.site-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  letter-spacing: .08em;
}

.site-title strong {
  color: var(--yellow);
  font-size: 18px;
}

.site-title span {
  font-size: 13px;
  font-weight: 800;
}

.quiet-button {
  justify-self: end;
  min-height: 38px;
  padding: 0 13px;
  color: var(--paper);
  border: 1px solid rgba(241, 234, 216, .34);
  background: transparent;
  font-weight: 750;
}

.app-shell {
  width: min(1180px, calc(100% - 30px));
  min-height: calc(100vh - 66px);
  margin: 0 auto;
  padding: 30px 0 56px;
}

.paper {
  position: relative;
  color: var(--ink);
  background:
    repeating-linear-gradient(0deg, rgba(25, 38, 30, .025) 0 1px, transparent 1px 4px),
    radial-gradient(circle at 15% 8%, rgba(255, 255, 255, .74), transparent 24%),
    var(--paper);
  border: 1px solid rgba(255, 255, 255, .42);
  box-shadow: 12px 14px 0 rgba(0, 0, 0, .24), 0 32px 80px rgba(0, 0, 0, .26);
}

.paper::before {
  position: absolute;
  top: -13px;
  left: 10%;
  width: 128px;
  height: 35px;
  content: "";
  background: rgba(212, 196, 151, .72);
  transform: rotate(-2deg);
  mix-blend-mode: multiply;
}

.loading-card {
  min-height: 420px;
  padding: 90px 7vw;
  color: var(--ink);
  background: var(--paper);
}

.loading-card p,
.eyebrow,
.case-id,
.section-label {
  margin: 0;
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .17em;
  text-transform: uppercase;
}

.loading-card h1 {
  margin: 18px 0 0;
  font-family: var(--serif);
  font-size: clamp(38px, 7vw, 76px);
}

.intro-paper {
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(380px, .86fr);
  min-height: 680px;
  overflow: hidden;
}

.intro-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(48px, 7vw, 92px);
}

.intro-copy h1 {
  max-width: 700px;
  margin: 20px 0 24px;
  font-family: var(--serif);
  font-size: clamp(56px, 8.2vw, 108px);
  line-height: .96;
  letter-spacing: -.06em;
}

.intro-copy h1 span {
  color: var(--red);
}

.intro-lead {
  max-width: 600px;
  margin: 0;
  color: #4f554c;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.82;
}

.intro-facts {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 1px;
  margin: 36px 0;
  border: 1px solid var(--line);
  background: var(--line);
}

.intro-facts div {
  min-width: 112px;
  padding: 14px 17px;
  background: rgba(255, 250, 240, .84);
}

.intro-facts strong,
.intro-facts small {
  display: block;
}

.intro-facts strong {
  font-size: 20px;
}

.intro-facts small {
  margin-top: 3px;
  color: var(--muted);
}

.primary-action,
.secondary-action,
.answer-option,
.result-action {
  border-radius: 0;
}

.primary-action {
  min-height: 54px;
  padding: 0 24px;
  color: var(--paper-light);
  border: 0;
  background: var(--red);
  box-shadow: 5px 5px 0 var(--ink);
  font-weight: 900;
  transition: transform .16s ease, box-shadow .16s ease;
}

.primary-action:hover {
  transform: translate(2px, 2px);
  box-shadow: 3px 3px 0 var(--ink);
}

.privacy-note {
  margin: auto 0 0;
  padding-top: 38px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.intro-collage {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: center;
  gap: 22px 18px;
  min-height: 680px;
  padding: 58px 34px;
  background:
    linear-gradient(135deg, transparent 0 39%, rgba(189, 48, 37, .88) 39% 40.5%, transparent 40.5%),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    var(--green);
  background-size: auto, 34px 34px, 34px 34px, auto;
}

.intro-collage img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  border: 6px solid var(--paper-light);
  background: #fff;
  box-shadow: 6px 8px 0 rgba(0, 0, 0, .25);
}

.intro-collage img:nth-child(1) {
  transform: rotate(-3deg);
}

.intro-collage img:nth-child(2) {
  transform: rotate(3deg);
}

.intro-collage img:nth-child(3) {
  grid-column: 1 / -1;
  justify-self: center;
  width: 52%;
  transform: rotate(-2deg);
}

.intro-stamp,
.result-stamp {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  min-width: 116px;
  min-height: 58px;
  padding: 7px 13px;
  color: var(--paper);
  border: 4px solid currentColor;
  font-weight: 950;
  line-height: 1.05;
  text-align: center;
  text-transform: uppercase;
  transform: rotate(-7deg);
}

.intro-stamp {
  right: 8%;
  bottom: 8%;
  background: var(--red);
}

.quiz-paper {
  min-height: 700px;
  padding: clamp(28px, 5vw, 66px);
}

.evidence-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  padding-bottom: 22px;
  border-bottom: 2px solid var(--ink);
}

.evidence-count {
  font-weight: 900;
}

.evidence-status {
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.progress-track {
  position: relative;
  height: 10px;
  margin: 26px 0 50px;
  overflow: hidden;
  border: 1px solid var(--ink);
  background: rgba(16, 23, 18, .08);
}

.progress-track i {
  display: block;
  height: 100%;
  background: var(--red);
  transition: width .25s ease;
}

.progress-track.is-investigating i {
  background: repeating-linear-gradient(135deg, var(--red) 0 10px, var(--red-dark) 10px 20px);
  background-size: 28px 28px;
  animation: evidence-stripe .8s linear infinite;
}

@keyframes evidence-stripe {
  to { background-position: 28px 0; }
}

.question-wrap {
  max-width: 940px;
  margin: 0 auto;
  scroll-margin-top: 80px;
}

.question-wrap h1 {
  max-width: 880px;
  margin: 14px 0 36px;
  font-family: var(--serif);
  font-size: clamp(36px, 5.7vw, 67px);
  line-height: 1.16;
  letter-spacing: -.04em;
}

.answer-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.answer-option {
  position: relative;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 15px;
  min-height: 132px;
  padding: 20px;
  color: var(--ink);
  text-align: left;
  border: 2px solid var(--ink);
  background: rgba(255, 250, 240, .48);
  transition: transform .15s ease, background .15s ease, color .15s ease;
}

.answer-option:hover,
.answer-option.is-selected {
  color: var(--paper-light);
  background: var(--green);
  transform: translateY(-2px);
}

.answer-letter {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 2px solid currentColor;
  font-size: 19px;
  font-weight: 950;
}

.answer-copy strong,
.answer-copy small {
  display: block;
}

.answer-copy strong {
  margin: 1px 0 7px;
  font-size: 18px;
}

.answer-copy small {
  color: inherit;
  opacity: .72;
  font-size: 14px;
  line-height: 1.6;
}

.quiz-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.secondary-action,
.result-action {
  min-height: 44px;
  padding: 0 16px;
  color: var(--ink);
  border: 1px solid var(--ink);
  background: transparent;
  font-weight: 800;
}

.secondary-action:disabled {
  cursor: not-allowed;
  opacity: .35;
}

.quiz-foot span {
  color: var(--muted);
  font-size: 12px;
}

.result-paper {
  overflow: hidden;
}

.result-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(320px, .88fr) minmax(0, 1.12fr);
  align-items: start;
  border-bottom: 2px solid var(--ink);
}

.result-image {
  display: grid;
  place-items: center;
  align-self: start;
  background: #fff;
}

.result-image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
}

.result-intro {
  position: relative;
  padding: clamp(42px, 6vw, 78px);
}

.result-intro h1 {
  margin: 18px 0 4px;
  font-family: var(--serif);
  font-size: clamp(52px, 7vw, 88px);
  line-height: 1;
  letter-spacing: -.055em;
}

.result-code {
  margin: 0;
  color: var(--green);
  font-size: 18px;
  font-weight: 950;
  letter-spacing: .17em;
}

.result-punch {
  margin: 34px 0 26px;
  padding: 22px 0;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  font-family: var(--serif);
  font-size: clamp(23px, 3vw, 36px);
  font-weight: 800;
  line-height: 1.45;
}

.result-intro-copy {
  color: #4d534b;
  font-size: 16px;
  line-height: 1.9;
}

.result-stamp {
  top: 38px;
  right: 34px;
  min-width: 104px;
  min-height: 50px;
  color: var(--red);
  background: transparent;
}

.result-body {
  padding: clamp(34px, 5vw, 68px);
}

.result-section {
  margin-top: 50px;
}

.result-section:first-child {
  margin-top: 0;
}

.result-section h2 {
  margin: 10px 0 22px;
  font-family: var(--serif);
  font-size: clamp(30px, 4vw, 48px);
}

.symptom-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.symptom-list li {
  min-height: 170px;
  padding: 23px;
  border: 2px solid var(--ink);
  background: rgba(255, 250, 240, .43);
  line-height: 1.75;
}

.symptom-list b {
  display: block;
  margin-bottom: 15px;
  color: var(--red);
  font-size: 13px;
  letter-spacing: .14em;
}

.advantage-box {
  padding: clamp(24px, 4vw, 38px);
  border-left: 9px solid var(--green);
  background: rgba(29, 97, 74, .11);
  font-size: 18px;
  line-height: 1.9;
}

.relationship-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.relationship-card {
  width: 100%;
  padding: 25px;
  color: var(--paper);
  text-align: left;
  background: var(--mat);
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  border-radius: 0;
  font: inherit;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease;
}

.relationship-card:hover,
.relationship-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 7px 7px 0 rgba(16, 23, 18, .2);
}

.relationship-card.is-enemy {
  border-top: 8px solid var(--red);
}

.relationship-card.is-partner {
  border-top: 8px solid var(--yellow);
}

.relationship-card small,
.relationship-card strong,
.relationship-card span {
  display: block;
}

.relationship-card small {
  color: rgba(241, 234, 216, .56);
  font-weight: 800;
  letter-spacing: .14em;
}

.relationship-card strong {
  margin: 12px 0;
  font-family: var(--serif);
  font-size: 29px;
}

.relationship-card span {
  color: rgba(241, 234, 216, .76);
  line-height: 1.75;
}

.co-conspirator,
.hidden-detection {
  position: relative;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  margin-top: 56px;
  padding: 24px;
  border: 3px solid var(--ink);
  background: var(--paper-light);
}

.co-conspirator img,
.hidden-detection img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
}

.co-conspirator h2,
.hidden-detection h2 {
  margin: 10px 0 5px;
  font-family: var(--serif);
  font-size: clamp(32px, 4vw, 52px);
}

.co-conspirator p,
.hidden-detection p {
  color: #4d534b;
  line-height: 1.75;
}

.co-score {
  color: var(--green);
  font-weight: 900;
}

.hidden-detection {
  border-color: var(--red);
  box-shadow: 9px 9px 0 rgba(189, 48, 37, .18);
}

.hidden-detection::after {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 7px 10px;
  content: attr(data-label);
  color: var(--red);
  border: 3px solid var(--red);
  font-weight: 950;
  transform: rotate(6deg);
}

.hidden-details {
  grid-column: 1 / -1;
}

.hidden-details p {
  margin: 0 0 18px;
}

.hidden-symptoms {
  margin: 0;
  padding-left: 1.25em;
  color: #4d534b;
  line-height: 1.85;
}

.hidden-share-action {
  min-height: 44px;
  margin-top: 20px;
  padding: 0 16px;
  color: var(--paper-light);
  border: 2px solid var(--red);
  background: var(--red);
  box-shadow: 4px 4px 0 var(--ink);
  font-weight: 900;
}

.hidden-share-action:hover {
  color: var(--paper-light);
  background: var(--green);
}

.ranking-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 48px;
  border: 1px solid var(--line);
  background: var(--line);
}

.ranking-strip button {
  width: 100%;
  padding: 18px;
  color: var(--ink);
  text-align: left;
  border: 0;
  border-radius: 0;
  background: rgba(255, 250, 240, .62);
  cursor: pointer;
  transition: background .16s ease, color .16s ease;
}

.ranking-strip button:hover,
.ranking-strip button:focus-visible {
  color: var(--paper-light);
  background: var(--green);
}

.ranking-strip small,
.ranking-strip strong {
  display: block;
}

.ranking-strip small {
  color: var(--muted);
}

.ranking-strip strong {
  margin-top: 7px;
  font-size: 18px;
}

.ranking-strip b {
  float: right;
  color: var(--green);
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 46px;
  padding-top: 28px;
  border-top: 2px solid var(--ink);
}

.result-quick-actions {
  margin: 0;
  padding: 20px clamp(24px, 5vw, 68px);
  border-top: 0;
  border-bottom: 2px solid var(--ink);
  background: rgba(29, 97, 74, .08);
}

.result-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.result-action.is-primary {
  color: var(--paper-light);
  border-color: var(--red);
  background: var(--red);
}

.result-action:hover,
.xhs-action {
  color: var(--paper-light);
  background: var(--green);
}

.xhs-action:hover {
  background: var(--red);
}

.persona-preview {
  width: min(920px, calc(100% - 28px));
  max-width: none;
  padding: 0;
  overflow: visible;
  color: var(--ink);
  border: 0;
  background: transparent;
}

.persona-preview::backdrop {
  background: rgba(3, 18, 13, .82);
  backdrop-filter: blur(5px);
}

.persona-preview-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(300px, .95fr) minmax(0, 1.05fr);
  overflow: hidden;
  border: 4px solid var(--ink);
  background:
    repeating-linear-gradient(0deg, rgba(25, 38, 30, .025) 0 1px, transparent 1px 4px),
    var(--paper);
  box-shadow: 13px 15px 0 rgba(189, 48, 37, .72);
}

.persona-preview-image {
  display: grid;
  place-items: center;
  background: #fff;
  border-right: 3px solid var(--ink);
}

.persona-preview-image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
}

.persona-preview-copy {
  align-self: center;
  padding: clamp(34px, 6vw, 68px);
}

.persona-preview-copy h2 {
  margin: 15px 0 3px;
  font-family: var(--serif);
  font-size: clamp(48px, 7vw, 82px);
  line-height: 1;
  letter-spacing: -.05em;
}

.persona-preview-code {
  color: var(--green);
  font-size: 19px;
  letter-spacing: .17em;
}

.persona-preview-punch {
  margin: 30px 0;
  padding: 22px 0;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  font-family: var(--serif);
  font-size: clamp(23px, 3vw, 34px);
  font-weight: 800;
  line-height: 1.5;
}

.persona-preview-copy small {
  color: var(--muted);
}

.persona-preview-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 44px;
  height: 44px;
  color: var(--paper-light);
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--red);
  box-shadow: 3px 3px 0 var(--ink);
  font-size: 27px;
  font-weight: 900;
  line-height: 1;
}

body.has-persona-preview {
  overflow: hidden;
}

.result-disclaimer {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.debug-lab {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 1200;
  width: min(370px, calc(100% - 24px));
  padding: 18px;
  color: var(--paper);
  border: 2px solid var(--yellow);
  background: rgba(4, 23, 16, .97);
  box-shadow: 9px 9px 0 rgba(0, 0, 0, .35);
}

.debug-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.debug-lab h2 {
  margin: 0;
  color: var(--yellow);
  font-size: 14px;
  letter-spacing: .12em;
}

.debug-heading button {
  min-height: 30px;
  padding: 0 9px;
  color: var(--paper);
  border: 1px solid rgba(241, 234, 216, .35);
  background: transparent;
  font-size: 11px;
  font-weight: 800;
}

.debug-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 13px;
}

.debug-lab.is-collapsed {
  width: auto;
  padding: 11px 13px;
}

.debug-lab.is-collapsed .debug-grid,
.debug-lab.is-collapsed .debug-actions {
  display: none;
}

.debug-grid label {
  display: grid;
  gap: 4px;
  color: rgba(241, 234, 216, .65);
  font-size: 11px;
}

.debug-grid select {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 7px;
  color: var(--paper);
  border: 1px solid rgba(241, 234, 216, .3);
  background: #09241c;
}

.debug-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.debug-actions button {
  min-height: 34px;
  padding: 0 10px;
  color: var(--paper);
  border: 1px solid rgba(241, 234, 216, .35);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

.debug-actions button:first-child {
  color: var(--ink);
  background: var(--yellow);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 1500;
  max-width: min(90vw, 560px);
  padding: 12px 18px;
  color: var(--paper);
  background: var(--red-dark);
  box-shadow: 5px 5px 0 rgba(0, 0, 0, .3);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 20px);
  transition: opacity .2s ease, transform .2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.load-error {
  padding: 80px 7vw;
  color: var(--ink);
  background: var(--paper);
}

.load-error code {
  display: block;
  margin-top: 20px;
  padding: 14px;
  overflow-wrap: anywhere;
  background: rgba(16, 23, 18, .08);
}

button:focus-visible,
a:focus-visible,
select:focus-visible {
  outline: 4px solid var(--yellow);
  outline-offset: 3px;
}

@media (max-width: 820px) {
  .site-bar {
    grid-template-columns: 1fr auto;
  }

  .site-title {
    display: none;
  }

  .app-shell {
    width: min(100% - 18px, 1180px);
    padding-top: 18px;
  }

  .intro-paper,
  .result-hero {
    grid-template-columns: 1fr;
  }

  .intro-copy {
    min-height: auto;
    padding: 54px 28px 38px;
  }

  .intro-collage {
    min-height: auto;
    padding: 36px 28px 48px;
  }

  .intro-facts {
    width: 100%;
  }

  .intro-facts div {
    min-width: 0;
    padding: 12px 10px;
  }

  .quiz-paper {
    padding: 30px 20px;
  }

  .evidence-head {
    grid-template-columns: 1fr auto;
    gap: 8px;
  }

  .evidence-head .case-id {
    grid-column: 1 / -1;
  }

  .answer-list,
  .symptom-list,
  .relationship-grid {
    grid-template-columns: 1fr;
  }

  .answer-option {
    min-height: 116px;
  }

  .result-image img {
    min-height: auto;
    aspect-ratio: 1;
  }

  .result-intro {
    padding: 108px 24px 42px;
  }

  .result-stamp {
    top: 24px;
    right: 20px;
  }

  .result-body {
    padding: 36px 20px 44px;
  }

  .symptom-list li {
    min-height: 0;
  }

  .co-conspirator,
  .hidden-detection {
    grid-template-columns: 116px 1fr;
    gap: 16px;
    padding: 15px;
  }

  .hidden-detection::after {
    top: -15px;
    right: 10px;
    background: var(--paper-light);
  }

  .ranking-strip {
    grid-template-columns: 1fr;
  }

  .persona-preview {
    max-height: calc(100dvh - 28px);
    overflow: auto;
  }

  .persona-preview-card {
    grid-template-columns: 1fr;
  }

  .persona-preview-image {
    border-right: 0;
    border-bottom: 3px solid var(--ink);
  }

  .persona-preview-copy {
    padding: 34px 24px 38px;
  }
}

@media (max-width: 520px) {
  .site-return span {
    display: none;
  }

  .quiet-button {
    font-size: 12px;
  }

  .locale-switch button {
    min-width: 34px;
    padding-inline: 7px;
  }

  .intro-copy h1 {
    font-size: 52px;
  }

  .intro-lead {
    font-size: 16px;
  }

  .intro-facts strong {
    font-size: 17px;
  }

  .intro-collage {
    gap: 17px 13px;
    padding: 30px 18px 44px;
  }

  .intro-collage img {
    border-width: 4px;
    box-shadow: 4px 5px 0 rgba(0, 0, 0, .24);
  }

  .intro-collage img:nth-child(3) {
    width: 54%;
  }

  .intro-stamp {
    right: 5%;
    bottom: 5%;
    min-width: 96px;
    min-height: 48px;
    font-size: 12px;
  }

  .question-wrap h1 {
    font-size: 36px;
  }

  .answer-option {
    grid-template-columns: 38px 1fr;
    gap: 12px;
    padding: 16px 14px;
  }

  .answer-letter {
    width: 38px;
    height: 38px;
  }

  .quiz-foot {
    align-items: flex-start;
    flex-direction: column-reverse;
  }

  .result-intro h1 {
    max-width: 70%;
    font-size: 52px;
  }

  .result-punch {
    font-size: 24px;
  }

  .co-conspirator,
  .hidden-detection {
    grid-template-columns: 1fr;
  }

  .co-conspirator img,
  .hidden-detection img {
    width: 150px;
  }

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

  .result-actions button {
    width: 100%;
  }

  .debug-lab {
    max-height: 55vh;
    overflow: auto;
  }
}

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