:root {
  color-scheme: light;
  --paper: #f1eadc;
  --paper-bright: #fbf7ef;
  --paper-deep: #e4dbc8;
  --ink: #26362f;
  --ink-soft: #5d625b;
  --carmine: #742f38;
  --carmine-dark: #552229;
  --jade: #526c60;
  --jade-dark: #354b41;
  --gold: #a97839;
  --gold-ink: #6f4b1f;
  --gold-soft: #d9bf8c;
  --line: rgba(70, 57, 44, 0.2);
  --line-strong: rgba(70, 57, 44, 0.38);
  --control-line: rgba(70, 57, 44, 0.65);
  --ink-faint: #555a53;
  --shadow: 0 24px 70px rgba(56, 43, 34, 0.13);
  --serif: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "STSong", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --radius-sm: 10px;
  --radius-md: 20px;
  --radius-lg: 34px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
}

body {
  position: relative;
  isolation: isolate;
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -2;
  width: 38vw;
  height: 38vw;
  border: 1px solid rgba(82, 108, 96, 0.09);
  border-radius: 50%;
  pointer-events: none;
}

body::before {
  top: -22vw;
  right: -12vw;
}

body::after {
  bottom: -26vw;
  left: -17vw;
}

button,
input,
textarea {
  font: inherit;
}

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

button {
  color: inherit;
}

a {
  color: var(--carmine);
  text-underline-offset: 0.22em;
}

img,
svg,
canvas {
  display: block;
  max-width: 100%;
}

/* Decorative characters stay visible without becoming text nodes that automated
   contrast engines must classify as prose. The owning control retains its name. */
.decorative-text::before {
  content: attr(data-decorative-text);
}

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

h1,
h2,
h3 {
  text-wrap: balance;
}

p,
li {
  text-wrap: pretty;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  padding: 11px 16px;
  border-radius: 8px;
  color: #fff;
  background: var(--carmine-dark);
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid #2267a0;
  outline-offset: 4px;
}

.stage h1[tabindex="-1"]:focus-visible,
.stage h2[tabindex="-1"]:focus-visible {
  outline: none;
}

.paper-grain {
  display: none;
  position: fixed;
  z-index: -1;
  inset: 0;
  opacity: 0.22;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 12% 9%, rgba(255, 255, 255, 0.72), transparent 24rem),
    linear-gradient(135deg, rgba(82, 108, 96, 0.045), transparent 40%),
    repeating-linear-gradient(13deg, transparent 0 5px, rgba(79, 63, 46, 0.026) 5px 6px),
    repeating-linear-gradient(96deg, transparent 0 11px, rgba(255, 255, 255, 0.15) 11px 12px);
  mix-blend-mode: multiply;
}

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 10px clamp(18px, 4vw, 64px);
  border-bottom: 1px solid rgba(86, 70, 53, 0.14);
  background: #f4eee1;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 50px;
  padding: 3px 8px 3px 2px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.brand-mirror {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 2px solid var(--carmine);
  border-radius: 50% 50% 48% 52%;
  color: var(--carmine);
  font-size: 22px;
  font-weight: 700;
  box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px rgba(116, 47, 56, 0.45);
}

.brand-copy {
  display: grid;
  line-height: 1.15;
}

.brand-copy strong {
  font-size: 17px;
  letter-spacing: 0.12em;
}

.brand-copy small {
  margin-top: 4px;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.17em;
}

.header-actions {
  display: flex;
  gap: 8px;
}

.quiet-button,
.text-button,
.primary-button,
.secondary-button {
  min-height: 46px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.quiet-button {
  padding: 9px 15px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 14px;
}

.quiet-button:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.36);
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 13px 24px;
  border: 1px solid transparent;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.primary-button {
  color: #fffaf0;
  border-color: var(--carmine);
  background: var(--carmine);
  box-shadow: 0 10px 24px rgba(116, 47, 56, 0.2);
}

.primary-button:hover:not(:disabled) {
  background: var(--carmine-dark);
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(85, 34, 41, 0.24);
}

.secondary-button {
  color: var(--ink);
  border-color: var(--control-line);
  background: #f8f2e7;
}

.secondary-button:hover:not(:disabled) {
  border-color: var(--jade);
  background: rgba(255, 255, 255, 0.7);
  transform: translateY(-1px);
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  box-shadow: none;
}

.text-button {
  padding: 10px 5px;
  border: 0;
  color: var(--carmine);
  background: transparent;
  text-decoration: underline;
  text-decoration-color: rgba(116, 47, 56, 0.3);
  text-underline-offset: 0.3em;
}

.text-button:hover {
  color: var(--carmine-dark);
  text-decoration-color: currentColor;
}

.stage {
  min-height: calc(100vh - 72px);
}

.hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(380px, 0.78fr);
  align-items: center;
  gap: clamp(32px, 6vw, 90px);
  width: min(1320px, calc(100% - 48px));
  min-height: calc(100vh - 72px);
  margin: 0 auto;
  padding: 54px 0 66px;
}

.portal-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-bottom: 18px;
  color: var(--carmine);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-bottom: 30px;
  color: var(--jade-dark);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.13em;
}

.eyebrow span {
  position: relative;
}

.eyebrow span:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -11px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gold);
}

.hero-overline,
.result-overline {
  margin-bottom: 13px;
  color: var(--carmine);
  font-size: 17px;
  letter-spacing: 0.24em;
}

.hero-copy h1 {
  margin-bottom: 27px;
  color: var(--ink);
  font-size: clamp(54px, 6.3vw, 98px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.055em;
}

.hero-copy h1 .title-opening,
.hero-copy h1 .book-title {
  color: var(--carmine-dark);
}

.hero-copy h1 .book-title {
  white-space: nowrap;
}

.hero-lead {
  max-width: 630px;
  margin-bottom: 34px;
  color: #4e554e;
  font-size: clamp(18px, 1.65vw, 23px);
  line-height: 1.88;
}

.quiz-mode-picker {
  max-width: 700px;
  margin: -8px 0 28px;
  padding: 16px;
  border: 1px solid rgba(116, 47, 56, 0.2);
  border-radius: 18px;
  background: #f8f1e5;
}

.quiz-mode-picker > p {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 18px;
  margin: 0 0 12px;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.65;
}

.quiz-mode-picker > p strong {
  color: var(--ink);
  font-size: 13px;
}

.quiz-mode-picker > p span {
  max-width: 470px;
}

.quiz-mode-picker > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quiz-mode-picker button {
  display: grid;
  gap: 5px;
  min-height: 68px;
  padding: 12px 14px;
  color: var(--ink);
  border: 1px solid var(--control-line);
  border-radius: 13px;
  background: #fffaf1;
  text-align: left;
}

.quiz-mode-picker button small {
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 10px;
  line-height: 1.5;
}

.quiz-mode-picker button.is-active {
  color: var(--carmine-dark);
  border-color: var(--carmine);
  box-shadow: inset 0 0 0 1px var(--carmine);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}

.story-trial-link {
  text-decoration: none;
}

.trial-note {
  max-width: 700px;
  margin: 18px 0 0;
  padding-left: 14px;
  border-left: 2px solid var(--gold);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.75;
}

.trial-note strong {
  color: var(--gold-ink);
}

.hero-start {
  min-width: 205px;
  min-height: 58px;
  padding-inline: 30px;
  font-size: 18px;
}

.privacy-note {
  margin: 22px 0 0;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.06em;
}

.privacy-note span {
  margin-right: 6px;
  color: var(--gold);
}

.garden-art {
  position: relative;
  width: min(100%, 530px);
  aspect-ratio: 0.815;
  justify-self: center;
  isolation: isolate;
}

.garden-art::before,
.garden-art::after {
  content: "";
  position: absolute;
  z-index: 2;
  pointer-events: none;
}

.garden-art::before {
  inset: 0;
  border: 18px solid #5c302c;
  border-radius: 50% 50% 45% 45% / 43% 43% 56% 56%;
  box-shadow:
    inset 0 0 0 2px #c19557,
    inset 0 0 0 10px #3f2824,
    0 30px 80px rgba(54, 42, 33, 0.2);
}

.garden-art::after {
  inset: 23px;
  border: 2px solid rgba(240, 219, 178, 0.74);
  border-radius: 50% 50% 45% 45% / 43% 43% 56% 56%;
}

.garden-art svg {
  width: 100%;
  height: 100%;
  border-radius: 50% 50% 45% 45% / 43% 43% 56% 56%;
  overflow: hidden;
}

.garden-caption {
  position: absolute;
  z-index: 5;
  right: -18px;
  bottom: 94px;
  display: grid;
  min-width: 150px;
  padding: 15px 19px;
  color: #fdf6e9;
  border-left: 3px solid var(--gold-soft);
  background: #34443b;
  box-shadow: 0 15px 30px rgba(38, 50, 43, 0.2);
}

.garden-caption span {
  font-size: 11px;
  letter-spacing: 0.34em;
  opacity: 0.75;
}

.garden-caption strong {
  margin-top: 5px;
  font-size: 21px;
  letter-spacing: 0.14em;
}

.garden-seal {
  position: absolute;
  z-index: 5;
  top: 68px;
  left: -8px;
  display: grid;
  width: 54px;
  height: 72px;
  place-items: center;
  color: #f8e9d1;
  border: 2px solid #f0c68a;
  background: var(--carmine);
  font-size: 20px;
  line-height: 1.25;
  box-shadow: 0 8px 18px rgba(72, 30, 35, 0.22);
}

.garden-seal.decorative-text::before {
  content: "照\A影";
  white-space: pre;
}

.window-lattice {
  position: absolute;
  z-index: 3;
  inset: 18px;
  overflow: hidden;
  border-radius: 50% 50% 45% 45% / 43% 43% 56% 56%;
  pointer-events: none;
}

.window-lattice i {
  position: absolute;
  top: -20%;
  width: 2px;
  height: 140%;
  background: rgba(74, 41, 36, 0.34);
  transform-origin: center;
}

.window-lattice i:nth-child(1) { left: 28%; transform: rotate(34deg); }
.window-lattice i:nth-child(2) { left: 67%; transform: rotate(34deg); }
.window-lattice i:nth-child(3) { left: 32%; transform: rotate(-34deg); }
.window-lattice i:nth-child(4) { left: 71%; transform: rotate(-34deg); }

.landing-body,
.result-body {
  width: min(1160px, calc(100% - 48px));
  margin: 0 auto;
}

.landing-body {
  padding: 90px 0 110px;
  border-top: 1px solid var(--line);
}

.section-kicker,
.mini-kicker {
  margin-bottom: 10px;
  color: var(--carmine);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 48px;
  margin-bottom: 42px;
}

.section-heading h2,
.how-it-reads > h2,
.result-reading > h2,
.result-prompt h2,
.source-result h2 {
  margin-bottom: 0;
  font-size: clamp(30px, 3.4vw, 48px);
  font-weight: 600;
  line-height: 1.25;
}

.section-heading > p {
  max-width: 390px;
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.78;
}

.figure-preview {
  scroll-margin-top: 100px;
}

.figure-ribbon {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 1px;
  padding: 0;
  margin: 0;
  list-style: none;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.figure-ribbon li {
  position: relative;
  display: grid;
  min-height: 230px;
  align-content: end;
  padding: 22px 14px;
  border-right: 1px solid var(--line);
  overflow: hidden;
}

.figure-ribbon li:last-child {
  border-right: 0;
}

.figure-ribbon li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 76px;
  background: linear-gradient(var(--figure-color), transparent);
  opacity: 0.55;
}

.figure-ribbon li > span {
  position: absolute;
  top: 23px;
  left: 50%;
  color: var(--figure-color);
  font-size: 62px;
  opacity: 0.18;
  transform: translateX(-50%);
}

.figure-ribbon strong {
  position: relative;
  margin-bottom: 8px;
  font-size: 20px;
  writing-mode: vertical-rl;
  letter-spacing: 0.13em;
}

.figure-ribbon small {
  position: relative;
  min-height: 4.6em;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 11px;
  line-height: 1.55;
}

.how-it-reads {
  padding: 120px 0 86px;
}

.reading-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 34px;
  margin-top: 48px;
}

.reading-steps article {
  position: relative;
  padding: 30px 28px 25px 70px;
  border-top: 2px solid var(--jade);
}

.reading-steps article > span {
  position: absolute;
  top: 26px;
  left: 18px;
  color: var(--gold);
  font-size: 25px;
}

.reading-steps h3 {
  margin-bottom: 10px;
  font-size: 21px;
}

.reading-steps p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.75;
}

.boundary-banner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 26px 32px;
  border: 1px solid rgba(116, 47, 56, 0.28);
  background: rgba(255, 251, 243, 0.46);
}

.boundary-glyph,
.prompt-seal {
  display: grid;
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  place-items: center;
  color: #fff8e9;
  background: var(--carmine);
  font-size: 24px;
}

.boundary-banner strong {
  display: block;
  margin-bottom: 7px;
  font-size: 19px;
}

.boundary-banner p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.7;
}

.bottom-start {
  display: flex;
  justify-content: center;
  padding-top: 54px;
}

.bottom-start .primary-button {
  min-height: 56px;
  padding-inline: 34px;
  font-size: 17px;
}

/* Quiz */
.quiz-stage {
  padding: 58px 24px 90px;
}

.quiz-layout {
  display: grid;
  grid-template-columns: 245px minmax(0, 780px);
  justify-content: center;
  gap: clamp(38px, 7vw, 104px);
  width: min(1160px, 100%);
  margin: 0 auto;
}

.chapter-rail {
  position: sticky;
  top: 110px;
  align-self: start;
  min-height: 560px;
  padding-right: 30px;
  border-right: 1px solid var(--line);
}

.rail-kicker {
  margin-bottom: 25px;
  color: var(--carmine);
  font-size: 13px;
  letter-spacing: 0.28em;
}

.chapter-rail ol {
  display: grid;
  gap: 25px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.chapter-rail li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 52px;
  color: var(--ink-soft);
}

.chapter-rail li::before {
  content: "";
  position: absolute;
  top: 51px;
  left: 20px;
  width: 1px;
  height: 25px;
  background: var(--line);
}

.chapter-rail li:last-child::before {
  display: none;
}

.chapter-rail li > span {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.chapter-rail li div {
  display: grid;
  gap: 3px;
}

.chapter-rail li strong {
  font-size: 15px;
}

.chapter-rail li small {
  font-family: var(--sans);
  font-size: 10px;
}

.chapter-rail li.is-current {
  color: var(--ink);
}

.chapter-rail li.is-current > span {
  color: #fff8e9;
  border-color: var(--carmine);
  background: var(--carmine);
  box-shadow: 0 6px 16px rgba(116, 47, 56, 0.2);
}

.chapter-rail li.is-complete > span {
  color: #fff;
  border-color: var(--jade);
  background: var(--jade);
}

.rail-boundary {
  margin: 48px 0 0;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 11px;
  line-height: 1.7;
}

.question-panel {
  min-width: 0;
}

.question-meta {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.question-meta > div:first-child {
  display: flex;
  align-items: center;
  gap: 12px;
}

.question-meta > div:first-child span {
  display: grid;
  width: 33px;
  height: 33px;
  place-items: center;
  color: #fff7e8;
  background: var(--jade);
  font-size: 14px;
}

.question-meta strong {
  font-size: 16px;
  letter-spacing: 0.08em;
}

.progress-copy {
  display: flex;
  align-items: baseline;
  gap: 13px;
  font-family: var(--sans);
}

.progress-copy > span {
  color: var(--carmine);
  font-size: 15px;
  font-weight: 700;
}

.progress-copy small {
  color: var(--ink-soft);
  font-size: 11px;
}

.progress-track {
  position: relative;
  height: 3px;
  margin-top: 16px;
  background: rgba(72, 57, 44, 0.14);
  overflow: hidden;
}

.progress-track span {
  display: block;
  width: 8.33%;
  height: 100%;
  background: linear-gradient(90deg, var(--carmine), var(--gold));
  transition: width 260ms ease;
}

.origin-ticket {
  position: relative;
  margin-top: 24px;
  padding: 18px 21px 17px 24px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--jade);
  background: #f4f0e6;
}

.origin-ticket::after {
  content: "";
  position: absolute;
  top: 12px;
  right: 15px;
  width: 34px;
  height: 34px;
  border: 1px solid color-mix(in srgb, var(--jade) 42%, transparent);
  border-radius: 50%;
  opacity: 0.5;
}

.origin-ticket.is-same-scene {
  border-left-color: var(--carmine);
  background: #f7ece7;
}

.origin-ticket.is-same-episode {
  border-left-color: var(--jade);
  background: #edf1e9;
}

.origin-ticket.is-modern-bridge {
  border-left-color: var(--gold);
  background: #f7efe0;
}

.origin-ticket > div {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-right: 40px;
}

.origin-ticket > div > span {
  color: var(--carmine);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.origin-ticket > div > small {
  color: var(--ink-faint);
  font-family: var(--sans);
  font-size: 10px;
}

.origin-ticket > p {
  max-width: 760px;
  margin: 9px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.68;
}

.origin-ticket .origin-seal-note {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-faint);
  font-family: var(--sans);
  font-size: 10px;
}

.origin-seal-note > span:first-child {
  display: grid;
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--carmine);
  border: 1px solid currentColor;
  font-family: var(--serif);
}

.question-copy {
  padding: clamp(34px, 5.5vh, 62px) 0 35px;
}

.question-label {
  margin-bottom: 12px;
  color: var(--carmine);
  font-size: 14px;
  letter-spacing: 0.28em;
}

.question-copy h1 {
  max-width: 740px;
  margin-bottom: 19px;
  font-size: clamp(32px, 4vw, 50px);
  font-weight: 600;
  line-height: 1.3;
}

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

fieldset {
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
}

.option-list {
  display: grid;
  gap: 12px;
}

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

.choice-family-list button {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 4px 13px;
  min-height: 94px;
  padding: 17px;
  color: var(--ink);
  border: 1px solid var(--control-line);
  border-radius: var(--radius-sm);
  background: #fffaf2;
  text-align: left;
}

.choice-family-list button:hover {
  border-color: var(--jade);
  background: #fffdf8;
}

.choice-family-list button > span {
  grid-row: 1 / span 2;
  color: var(--carmine);
  font-family: var(--sans);
  font-size: 11px;
}

.choice-family-list button strong {
  font-size: 17px;
  line-height: 1.45;
}

.choice-family-list button small {
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 11px;
  line-height: 1.55;
}

.choice-family-selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  padding: 12px 16px;
  border-left: 3px solid var(--carmine);
  background: #eee5d8;
}

.choice-family-selected div {
  display: grid;
  gap: 3px;
}

.choice-family-selected span,
.choice-family-selected button {
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 11px;
}

.choice-family-selected button {
  min-height: 44px;
  padding: 8px 12px;
  color: var(--carmine);
  border: 1px solid var(--carmine);
  border-radius: 999px;
  background: #fffaf2;
}

.choice-detail-list {
  display: grid;
  gap: 12px;
}

.answer-option {
  position: relative;
}

.answer-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.answer-option label {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 78px;
  padding: 14px 22px 14px 17px;
  border: 1px solid var(--control-line);
  border-radius: var(--radius-sm);
  background: rgba(255, 252, 246, 0.46);
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.answer-option label:hover {
  border-color: rgba(82, 108, 96, 0.65);
  background: rgba(255, 253, 248, 0.78);
  transform: translateX(3px);
}

.answer-option input:focus-visible + label {
  outline: 3px solid #2267a0;
  outline-offset: 3px;
}

.answer-option.is-selected label {
  border-color: var(--carmine);
  background: rgba(255, 251, 243, 0.92);
  box-shadow: 0 9px 24px rgba(74, 51, 41, 0.08);
}

.option-number {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--ink-soft);
  border: 1px solid var(--control-line);
  border-radius: 50%;
  font-family: var(--sans);
  font-size: 12px;
}

.is-selected .option-number {
  color: #fff;
  border-color: var(--carmine);
  background: var(--carmine);
}

.option-text {
  font-size: 16px;
  line-height: 1.65;
}

.option-mark {
  color: var(--carmine);
  font-size: 12px;
  letter-spacing: 0.13em;
  opacity: 0;
  transform: translateX(-5px);
  transition: opacity 150ms ease, transform 150ms ease;
}

.is-selected .option-mark {
  opacity: 1;
  transform: translateX(0);
}

.question-status {
  min-height: 1.6em;
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 12px;
}

.quiz-controls {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
}

.keyboard-hint {
  justify-self: center;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.06em;
}

/* Result */
.result-stage {
  padding-bottom: 120px;
}

.result-masthead {
  --result-color: var(--carmine);
  --result-soft: var(--gold-soft);
  position: relative;
  display: grid;
  min-height: 620px;
  place-items: center;
  align-content: center;
  padding: 80px 24px 120px;
  text-align: center;
  overflow: hidden;
  background: #f3eadc;
}

.result-masthead::before {
  content: "";
  position: absolute;
  bottom: -370px;
  left: 50%;
  width: min(940px, 92vw);
  height: 940px;
  border: 2px solid color-mix(in srgb, var(--result-color) 50%, transparent);
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: inset 0 0 0 14px rgba(255, 255, 255, 0.16), inset 0 0 0 16px color-mix(in srgb, var(--result-color) 18%, transparent);
}

.result-orbit {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.result-orbit i {
  position: absolute;
  border: 1px solid color-mix(in srgb, var(--result-color) 22%, transparent);
  border-radius: 50%;
}

.result-orbit i:nth-child(1) { width: 190px; height: 190px; top: 50px; left: -60px; }
.result-orbit i:nth-child(2) { width: 310px; height: 310px; right: -130px; bottom: 20px; }
.result-orbit i:nth-child(3) { width: 74px; height: 74px; top: 100px; right: 18%; background: color-mix(in srgb, var(--result-soft) 28%, transparent); }

.result-overline {
  position: relative;
  z-index: 2;
}

.result-glyph {
  position: relative;
  z-index: 2;
  display: grid;
  width: 68px;
  height: 68px;
  margin: 8px 0 24px;
  place-items: center;
  color: #fff8eb;
  border: 2px solid #f0d5a3;
  background: var(--result-color);
  font-size: 28px;
  box-shadow: 0 12px 26px color-mix(in srgb, var(--result-color) 25%, transparent);
}

.result-masthead h1 {
  position: relative;
  z-index: 2;
  max-width: 980px;
  margin-bottom: 18px;
  color: var(--result-color);
  font-size: clamp(52px, 7vw, 94px);
  font-weight: 600;
  line-height: 1.12;
}

.result-archetype {
  position: relative;
  z-index: 2;
  margin-bottom: 14px;
  color: var(--ink);
  font-size: clamp(20px, 2.5vw, 31px);
  letter-spacing: 0.09em;
}

.result-tagline {
  position: relative;
  z-index: 2;
  margin-bottom: 28px;
  color: var(--ink-soft);
  font-size: 17px;
}

.result-basis {
  position: relative;
  z-index: 2;
  max-width: 720px;
  padding: 10px 18px;
  border-top: 1px solid color-mix(in srgb, var(--result-color) 35%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--result-color) 35%, transparent);
  color: #4f554f;
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.7;
}

.result-quick-actions {
  position: static;
  display: flex;
  justify-content: center;
  gap: 10px;
  width: min(760px, calc(100% - 32px));
  margin: 24px auto 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f9f5ec;
  box-shadow: 0 14px 36px rgba(59, 47, 36, 0.14);
}

.result-quick-actions > * {
  min-width: 150px;
}

.result-body {
  padding-top: 100px;
}

.result-reading,
.evidence-section,
.axis-section,
.echo-section,
.share-card-section {
  padding: 82px 0;
  border-bottom: 1px solid var(--line);
}

.result-reading {
  padding-top: 40px;
}

.result-summary {
  max-width: 950px;
  margin: 28px 0 52px;
  color: #465048;
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.92;
}

.strength-watch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line-strong);
  background: var(--line);
}

.strength-watch article {
  padding: 34px 38px;
  background: rgba(250, 246, 237, 0.86);
}

.strength-watch article:last-child {
  background: rgba(236, 228, 213, 0.82);
}

.strength-watch h3 {
  margin-bottom: 22px;
  font-size: 22px;
}

.strength-watch ul {
  display: grid;
  gap: 14px;
  padding-left: 1.25em;
  margin: 0;
}

.strength-watch li {
  color: #4f554e;
  line-height: 1.72;
}

.result-reading blockquote {
  position: relative;
  max-width: 920px;
  margin: 48px 0 0;
  padding: 3px 0 3px 34px;
  color: #55564f;
  border-left: 3px solid var(--gold);
  font-size: 17px;
  line-height: 1.85;
}

.section-heading.compact {
  align-items: start;
  margin-bottom: 34px;
}

.section-heading.compact h2 {
  font-size: clamp(28px, 3vw, 40px);
}

.section-heading.compact > p {
  font-size: 14px;
}

.evidence-list {
  padding: 0;
  margin: 0;
  list-style: none;
  border-top: 1px solid var(--line-strong);
}

.evidence-list li {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 22px;
  padding: 24px 12px;
  border-bottom: 1px solid var(--line);
}

.evidence-index {
  color: var(--gold-ink);
  font-family: var(--sans);
  font-size: 13px;
}

.evidence-list p {
  margin-bottom: 7px;
  color: var(--carmine);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.evidence-list strong {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.7;
}

.axis-list {
  display: grid;
  gap: 27px;
}

.axis-item {
  padding: 25px 28px;
  border: 1px solid var(--line);
  background: rgba(255, 252, 246, 0.38);
}

.axis-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 30px;
}

.axis-heading > div {
  display: grid;
  gap: 5px;
}

.axis-heading span {
  color: var(--carmine);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.axis-heading strong {
  font-size: 18px;
}

.axis-heading small {
  max-width: 390px;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 11px;
  line-height: 1.55;
}

.axis-meter {
  position: relative;
  display: grid;
  grid-template-columns: var(--left-width) 1fr;
  height: 8px;
  margin: 21px 0 10px;
  border-radius: 99px;
  background: #d6c9b4;
  overflow: hidden;
}

.axis-meter i {
  background: var(--jade);
}

.axis-meter b {
  background: var(--carmine);
}

.axis-meter::after {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  width: 2px;
  height: 18px;
  background: var(--paper-bright);
}

.axis-labels {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 11px;
}

.echo-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.echo-list article {
  position: relative;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 15px;
  min-height: 145px;
  padding: 25px 22px;
  border-top: 3px solid var(--echo-color);
  background: rgba(255, 252, 246, 0.45);
}

.echo-list article > span {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  color: var(--echo-color);
  border: 1px solid color-mix(in srgb, var(--echo-color) 60%, transparent);
  border-radius: 50%;
  font-size: 23px;
}

.echo-list p {
  margin-bottom: 5px;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 10px;
}

.echo-list h3 {
  margin-bottom: 5px;
  font-size: 20px;
}

.echo-list small {
  color: var(--ink-soft);
  line-height: 1.5;
}

.result-prompt {
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 90px 0;
  padding: 42px 46px;
  color: #fdf7ea;
  background: var(--jade-dark);
}

.prompt-seal {
  color: var(--jade-dark);
  border: 2px solid #ebd5a9;
  background: #f1dcae;
}

.result-prompt .section-kicker {
  color: #e6c68c;
}

.result-prompt h2 {
  margin-bottom: 13px;
  font-size: clamp(26px, 3vw, 38px);
}

.result-prompt p:last-child {
  margin: 0;
  color: rgba(255, 250, 240, 0.84);
  font-size: 17px;
  line-height: 1.8;
}

.share-card-section {
  padding-top: 20px;
}

#share-canvas {
  width: min(100%, 594px);
  height: auto;
  margin: 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: var(--paper-bright);
  box-shadow: var(--shadow);
}

.source-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 44px;
  padding: 72px 0;
  border-bottom: 1px solid var(--line);
}

.source-result h2 {
  margin-bottom: 14px;
  font-size: clamp(26px, 3vw, 38px);
}

.source-result p:last-child {
  max-width: 790px;
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.76;
}

.result-boundary {
  margin: 72px 0 0;
}

.next-stage-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 38px;
  align-items: center;
  margin-top: 72px;
  padding: clamp(28px, 5vw, 48px);
  border: 1px solid rgba(116, 47, 56, 0.4);
  border-radius: var(--radius-lg);
  background: rgba(116, 47, 56, 0.055);
}

.next-stage-panel h2 {
  margin-bottom: 14px;
  font-size: clamp(28px, 4vw, 42px);
}

.next-stage-panel p:last-child {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.8;
}

.result-actions {
  display: flex;
  justify-content: center;
  gap: 13px;
  padding: 55px 0 0;
}

.review-panel {
  scroll-margin-top: 150px;
  margin-top: 70px;
  padding-top: 35px;
  border-top: 2px solid var(--jade);
}

.review-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 25px;
}

.review-heading h2 {
  margin: 0;
  font-size: 32px;
}

.review-panel ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.review-panel li {
  display: grid;
  align-content: start;
  min-height: 225px;
  padding: 23px;
  border: 1px solid var(--line);
  background: rgba(255, 252, 246, 0.38);
}

.review-panel li > div {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.review-panel li > div span {
  color: var(--gold-ink);
  font-family: var(--sans);
  font-size: 11px;
}

.review-panel li > div p {
  margin: 0;
  color: var(--carmine);
  font-size: 13px;
}

.review-panel li > div em {
  margin-left: auto;
  color: var(--ink-faint);
  font-family: var(--sans);
  font-size: 9px;
  font-style: normal;
  letter-spacing: 0.06em;
}

.review-panel li > strong {
  margin-bottom: 15px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.62;
}

.review-panel li > small {
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 10px;
  line-height: 1.55;
}

.review-panel li > button {
  align-self: end;
  justify-self: start;
  margin-top: 18px;
  padding: 7px 0;
  border: 0;
  color: var(--carmine);
  background: transparent;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

/* Dialogs and global */
dialog {
  width: min(720px, calc(100% - 32px));
  max-height: min(82vh, 820px);
  padding: 0;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--paper-bright);
  box-shadow: 0 36px 100px rgba(42, 32, 27, 0.26);
  overflow: hidden;
}

dialog::backdrop {
  background: rgba(30, 39, 34, 0.56);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.dialog-header {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  padding: 26px 30px 21px;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 247, 239, 0.95);
}

.dialog-header h2 {
  margin: 0;
  font-size: 27px;
}

.dialog-close {
  display: grid;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 25px;
}

.dialog-body {
  max-height: calc(82vh - 100px);
  padding: 30px;
  overflow: auto;
}

.dialog-body > p,
.dialog-body li {
  color: #4f554f;
  line-height: 1.82;
}

.dialog-body h3 {
  margin: 34px 0 10px;
  font-size: 19px;
}

.method-list {
  display: grid;
  gap: 15px;
  padding-left: 1.4em;
}

.source-list {
  margin-top: 28px;
  border-top: 1px solid var(--line);
}

.source-list article {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.source-list h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.source-list p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.7;
}

.toast {
  position: fixed;
  z-index: 200;
  bottom: max(24px, env(safe-area-inset-bottom));
  left: 50%;
  max-width: calc(100% - 32px);
  padding: 13px 20px;
  color: #fff9ed;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: #26362f;
  box-shadow: 0 12px 35px rgba(25, 34, 29, 0.25);
  font-family: var(--sans);
  font-size: 13px;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 20px);
  transition: transform 160ms ease;
}

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

.fatal-error {
  width: min(720px, calc(100% - 40px));
  margin: 90px auto;
  padding: 45px;
  border: 2px solid var(--carmine);
  background: var(--paper-bright);
}

.fatal-error h1 {
  font-size: 36px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding: 28px clamp(18px, 4vw, 64px);
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 11px;
}

.site-footer p {
  margin: 0;
}

.site-footer strong {
  color: var(--ink);
}

.footer-links,
.filing-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.site-footer a {
  min-height: 44px;
  padding: 11px 2px;
}

@media (max-width: 1050px) {
  .hero-shell {
    grid-template-columns: minmax(0, 1fr) minmax(330px, 0.72fr);
    gap: 35px;
  }

  .figure-ribbon {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .figure-ribbon li {
    min-height: 180px;
    border-bottom: 1px solid var(--line);
  }

  .figure-ribbon strong {
    writing-mode: horizontal-tb;
  }

  .quiz-layout {
    grid-template-columns: 190px minmax(0, 720px);
    gap: 38px;
  }

  .chapter-rail {
    padding-right: 18px;
  }
}

@media (max-width: 780px) {
  .quiz-mode-picker > div,
  .choice-family-list {
    grid-template-columns: 1fr;
  }

  .choice-family-selected {
    align-items: flex-start;
  }
  .next-stage-panel {
    grid-template-columns: 1fr;
  }

  .next-stage-panel .primary-button {
    justify-self: start;
  }

  .site-header {
    min-height: 64px;
    padding-inline: 14px;
  }

  .brand-mirror {
    width: 40px;
    height: 40px;
  }

  .brand-copy small {
    display: none;
  }

  .header-actions {
    gap: 1px;
  }

  .quiet-button {
    min-height: 44px;
    padding-inline: 11px;
  }

  .stage {
    min-height: calc(100vh - 64px);
  }

  .hero-shell {
    grid-template-columns: 1fr;
    width: min(100% - 32px, 620px);
    min-height: 0;
    padding: 48px 0 62px;
  }

  .hero-copy h1 {
    font-size: clamp(48px, 15vw, 72px);
    letter-spacing: -0.07em;
  }

  .hero-lead {
    font-size: 17px;
  }

  .garden-art {
    width: min(88vw, 450px);
    margin-top: 18px;
  }

  .garden-caption {
    right: -2px;
    bottom: 58px;
  }

  .landing-body,
  .result-body {
    width: min(100% - 32px, 680px);
  }

  .landing-body {
    padding: 64px 0 80px;
  }

  .section-heading,
  .section-heading.compact {
    display: grid;
    gap: 16px;
    margin-bottom: 30px;
  }

  .section-heading > p {
    max-width: none;
  }

  .figure-ribbon {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .figure-ribbon li {
    min-height: 165px;
  }

  .how-it-reads {
    padding: 76px 0 54px;
  }

  .reading-steps {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 30px;
  }

  .boundary-banner {
    align-items: start;
    padding: 22px 20px;
  }

  .quiz-stage {
    padding: 28px 16px 125px;
  }

  .quiz-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .chapter-rail {
    position: static;
    min-height: 0;
    padding: 0 0 19px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .rail-kicker,
  .rail-boundary,
  .chapter-rail li div {
    display: none;
  }

  .chapter-rail ol {
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
  }

  .chapter-rail li {
    justify-content: center;
    min-height: 42px;
  }

  .chapter-rail li::before {
    top: 20px;
    left: calc(50% + 22px);
    width: calc(100% - 34px);
    height: 1px;
  }

  .chapter-rail li > span {
    position: relative;
    z-index: 2;
  }

  .question-copy {
    padding-top: 38px;
  }

  .question-copy h1 {
    font-size: clamp(29px, 8vw, 39px);
  }

  .question-context {
    font-size: 15px;
  }

  .answer-option label {
    grid-template-columns: 38px minmax(0, 1fr);
    min-height: 82px;
    padding: 13px 15px;
  }

  .option-mark {
    display: none;
  }

  .option-text {
    font-size: 15px;
  }

  .quiz-controls {
    position: fixed;
    z-index: 30;
    right: 0;
    bottom: 0;
    left: 0;
    grid-template-columns: 0.86fr 1.14fr;
    gap: 9px;
    margin: 0;
    padding: 11px 14px max(11px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: #f7f2e8;
  }

  .quiz-controls button {
    min-width: 0;
    min-height: 50px;
    padding-inline: 15px;
  }

  .keyboard-hint {
    display: none;
  }

  .result-masthead {
    min-height: 570px;
    padding: 72px 20px 110px;
  }

  .result-masthead h1 {
    font-size: clamp(48px, 13vw, 72px);
  }

  .result-quick-actions {
    width: calc(100% - 20px);
    padding: 9px;
    border-radius: 20px;
  }

  .result-quick-actions > * {
    min-width: 0;
    min-height: 47px;
    padding: 10px 13px;
    font-size: 12px;
  }

  .result-body {
    padding-top: 72px;
  }

  .result-reading,
  .evidence-section,
  .axis-section,
  .echo-section,
  .share-card-section {
    padding: 58px 0;
  }

  .strength-watch {
    grid-template-columns: 1fr;
  }

  .strength-watch article {
    padding: 28px 24px;
  }

  .axis-heading {
    display: grid;
    gap: 10px;
  }

  .axis-heading small {
    max-width: none;
  }

  .echo-list {
    grid-template-columns: 1fr;
  }

  .result-prompt {
    align-items: start;
    margin: 60px 0;
    padding: 30px 24px;
  }

  .source-result {
    display: grid;
    gap: 25px;
    padding: 55px 0;
  }

  .source-result .secondary-button {
    justify-self: start;
  }

  .review-panel ol {
    grid-template-columns: 1fr;
  }

  .site-footer {
    display: grid;
    gap: 8px;
  }
}

@media (max-width: 450px) {
  .brand-copy strong {
    font-size: 15px;
  }

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

  .hero-actions {
    display: grid;
    justify-items: start;
    gap: 12px;
  }

  .hero-start {
    width: 100%;
  }

  .garden-art {
    width: min(92vw, 410px);
  }

  .garden-seal {
    top: 46px;
    left: 0;
  }

  .garden-caption {
    min-width: 126px;
    padding: 12px 15px;
  }

  .garden-caption strong {
    font-size: 17px;
  }

  .boundary-glyph,
  .prompt-seal {
    width: 44px;
    height: 44px;
  }

  .question-meta strong {
    font-size: 14px;
  }

  .progress-copy small {
    display: none;
  }

  .evidence-list li {
    grid-template-columns: 35px minmax(0, 1fr);
    gap: 10px;
    padding-inline: 3px;
  }

  .axis-item {
    padding: 22px 18px;
  }

  .result-prompt {
    display: grid;
  }

  .result-actions {
    display: grid;
  }

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

  .dialog-header,
  .dialog-body {
    padding-inline: 20px;
  }
}

/* Character dossier and evidence surfaces */
.figure-ribbon li {
  padding: 0;
}

.figure-ribbon li::before {
  z-index: 1;
}

.figure-ribbon li > button {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: 230px;
  width: 100%;
  align-content: end;
  padding: 22px 14px;
  color: inherit;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.figure-ribbon li > button:hover,
.figure-ribbon li > button:focus-visible {
  background: rgba(255, 252, 246, 0.62);
}

.figure-ribbon li > button > span {
  position: absolute;
  top: 23px;
  left: 50%;
  color: var(--figure-color);
  font-size: 62px;
  opacity: 0.18;
  transform: translateX(-50%);
}

.figure-ribbon li > button > em {
  margin-top: 12px;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 10px;
  font-style: normal;
  letter-spacing: 0.08em;
}

.catalog-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 28px;
}

.catalog-cta p {
  max-width: 540px;
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.7;
}

.profiles-stage {
  min-height: 100vh;
  padding: 42px 24px 120px;
  background: var(--paper);
}

.profiles-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.profiles-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 58px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.profiles-topbar p {
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.profiles-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 46px 80px;
  align-items: end;
  padding: 58px 60px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 252, 246, 0.55);
  box-shadow: 0 20px 60px rgba(63, 49, 37, 0.07);
}

.profiles-hero .section-kicker,
.profiles-hero h1,
.profiles-hero > p {
  grid-column: 1;
}

.profiles-hero h1 {
  max-width: 780px;
  margin-bottom: 22px;
  font-size: clamp(38px, 5vw, 68px);
  font-weight: 600;
  line-height: 1.15;
}

.profiles-hero > p:last-of-type {
  max-width: 760px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.9;
}

.profiles-hero-actions {
  grid-column: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.profiles-hero-actions small {
  max-width: 540px;
  color: var(--ink-soft);
  line-height: 1.7;
}

.coverage-summary {
  grid-column: 2;
  grid-row: 1 / span 3;
  display: grid;
  align-self: stretch;
  border-left: 1px solid var(--line);
}

.coverage-summary article {
  display: grid;
  grid-template-columns: 84px 1fr;
  align-items: center;
  gap: 18px;
  padding: 15px 0 15px 34px;
  border-bottom: 1px solid var(--line);
}

.coverage-summary article:last-child {
  border-bottom: 0;
}

.coverage-summary strong {
  color: var(--carmine);
  font-size: 44px;
  font-weight: 500;
}

.coverage-summary span {
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.55;
}

.catalog-census-boundary {
  display: grid;
  grid-template-columns: minmax(210px, .7fr) minmax(0, 1.3fr);
  gap: 22px;
  margin: 18px 0 0;
  padding: 20px 24px;
  border: 1px solid rgba(116, 47, 56, .22);
  border-left: 4px solid var(--carmine);
  background: rgba(116, 47, 56, .045);
}

.catalog-census-boundary > strong {
  color: var(--carmine);
  font-size: 15px;
  line-height: 1.7;
}

.catalog-census-boundary p {
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.75;
}

.catalog-controls {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-top: 44px;
  padding: 24px 28px;
  border: 1px solid var(--line);
  background: rgba(247, 242, 232, 0.88);
}

.catalog-controls label {
  display: grid;
  gap: 8px;
  width: min(430px, 100%);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 11px;
}

.catalog-controls input {
  min-height: 50px;
  width: 100%;
  padding: 10px 15px;
  color: var(--ink);
  border: 1px solid var(--control-line);
  border-radius: 0;
  background: var(--paper-bright);
  font: 15px var(--sans);
}

.catalog-controls input::placeholder {
  color: var(--ink-soft);
  opacity: 1;
}

.catalog-filters {
  display: flex;
  gap: 8px;
}

.catalog-filters button {
  min-height: 43px;
  padding: 9px 15px;
  color: var(--ink-soft);
  border: 1px solid var(--control-line);
  background: transparent;
  font: 12px var(--sans);
  cursor: pointer;
}

.catalog-filters button.is-active {
  color: #fffaf0;
  border-color: var(--jade-dark);
  background: var(--jade-dark);
}

.catalog-status {
  min-height: 24px;
  margin: 18px 0;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 12px;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.profile-card {
  min-width: 0;
  border: 1px solid var(--line);
  background: rgba(255, 252, 246, 0.43);
}

.profile-card.is-playable {
  border-top: 3px solid var(--carmine);
  background: rgba(255, 251, 242, 0.72);
}

.profile-card.is-index-only {
  border-top: 3px solid rgba(54, 73, 63, .5);
  background: rgba(239, 241, 234, .5);
}

.profile-card.is-index-only > button {
  min-height: 290px;
}

.profile-card.is-index-only .profile-glyph {
  color: var(--jade-dark);
}

.profile-card > button {
  position: relative;
  display: grid;
  align-content: start;
  width: 100%;
  min-height: 330px;
  padding: 30px 28px 26px;
  color: inherit;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.profile-card > button:hover,
.profile-card > button:focus-visible {
  background: rgba(224, 213, 193, 0.25);
}

.profile-glyph {
  position: absolute;
  top: 22px;
  right: 24px;
  color: var(--carmine);
  font-size: 70px;
  opacity: 0.1;
}

.coverage-badge {
  display: inline-flex;
  justify-self: start;
  margin-bottom: 28px;
  padding: 5px 8px;
  color: var(--jade-dark);
  border: 1px solid rgba(54, 73, 63, 0.28);
  background: rgba(180, 198, 184, 0.18);
  font-family: var(--sans);
  font-size: 10px;
  font-style: normal;
  line-height: 1.4;
}

.profile-card h2 {
  margin-bottom: 7px;
  font-size: 28px;
}

.profile-card .profile-role {
  min-height: 3em;
  margin-bottom: 16px;
  color: var(--carmine);
  font-family: var(--sans);
  font-size: 11px;
  line-height: 1.5;
}

.profile-card p:not(.profile-role) {
  margin-bottom: 18px;
  color: var(--ink-soft);
  line-height: 1.75;
}

.profile-card small {
  margin-top: auto;
  color: var(--ink-faint);
  font-family: var(--sans);
  font-size: 10px;
  line-height: 1.55;
}

.profile-card em {
  margin-top: 16px;
  color: var(--carmine);
  font-family: var(--sans);
  font-size: 12px;
  font-style: normal;
}

.profile-detail-back {
  margin-bottom: 28px;
}

.profile-detail-hero {
  position: relative;
  display: flex;
  align-items: center;
  gap: 38px;
  min-height: 300px;
  padding: 54px 64px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--detail-color) 35%, var(--line));
  background: #f8f3ea;
}

.profile-detail-hero.is-scene-profile {
  --detail-color: var(--jade-dark);
  --detail-soft: #b9c4b8;
}

.profile-detail-hero.is-index-only {
  --detail-color: #4f6257;
  --detail-soft: #c8d1c6;
  min-height: 250px;
}

.profile-detail-glyph {
  display: grid;
  flex: 0 0 auto;
  width: 132px;
  height: 132px;
  place-items: center;
  color: var(--detail-color);
  border: 1px solid color-mix(in srgb, var(--detail-color) 45%, transparent);
  border-radius: 50%;
  background: rgba(255,255,255,.35);
  font-size: 58px;
}

.profile-detail-hero h1 {
  margin-bottom: 9px;
  color: var(--detail-color);
  font-size: clamp(50px, 8vw, 94px);
  font-weight: 500;
}

.profile-detail-hero .coverage-badge {
  margin-bottom: 14px;
}

.profile-detail-archetype {
  margin: 0;
  color: var(--ink-soft);
  font-size: 19px;
}

.profile-detail-lead,
.scene-profile-copy {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
  gap: 40px;
  padding: 64px 20px;
  border-bottom: 1px solid var(--line);
}

.profile-detail-lead > p,
.scene-profile-copy > p {
  margin: 0;
  font-size: clamp(19px, 2.1vw, 26px);
  line-height: 1.9;
}

.profile-detail-lead aside,
.scene-profile-copy aside {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 24px 26px;
  border-left: 3px solid var(--gold);
  background: rgba(255,252,246,.45);
}

.profile-detail-lead aside strong,
.scene-profile-copy aside strong {
  color: var(--carmine);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .08em;
}

.profile-detail-lead aside span,
.scene-profile-copy aside span {
  color: var(--ink-soft);
  line-height: 1.75;
}

.profile-detail section {
  padding: 72px 20px;
  border-bottom: 1px solid var(--line);
}

.profile-detail section > h2 {
  margin-bottom: 34px;
  font-size: clamp(30px, 3.6vw, 46px);
}

.index-only-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.index-only-facts > div {
  min-width: 0;
  padding: 24px 26px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 252, 246, .5);
}

.index-only-facts dt {
  margin-bottom: 9px;
  color: var(--carmine);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .06em;
}

.index-only-facts dd {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.index-only-boundary {
  margin: 44px 20px 0;
  padding: 25px 28px;
  border: 1px solid rgba(54, 73, 63, .28);
  border-left: 4px solid var(--jade-dark);
  background: rgba(180, 198, 184, .13);
}

.index-only-boundary strong {
  display: block;
  margin-bottom: 8px;
  color: var(--jade-dark);
}

.index-only-boundary p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.75;
}

.facet-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.facet-grid article {
  min-height: 250px;
  padding: 26px 22px;
  background: rgba(255,252,246,.88);
}

.facet-grid span {
  color: var(--carmine);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
}

.facet-grid p {
  margin: 17px 0;
  line-height: 1.75;
}

.facet-grid small {
  display: block;
  padding-top: 14px;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 10px;
  line-height: 1.65;
}

.strength-cost-section > div,
.profile-contradictions > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.strength-cost-section article {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
}

.strength-cost-section article p {
  margin: 0;
  padding: 25px;
  line-height: 1.75;
}

.strength-cost-section article p + p {
  border-left: 1px solid var(--line);
  background: rgba(231,221,202,.38);
}

.strength-cost-section strong {
  display: block;
  margin-bottom: 8px;
  color: var(--carmine);
  font-family: var(--sans);
  font-size: 10px;
}

.profile-contradictions article {
  padding: 28px 30px;
  border-top: 3px solid var(--jade);
  background: rgba(255,252,246,.45);
}

.profile-contradictions h3 {
  margin-bottom: 18px;
  font-size: 22px;
}

.profile-contradictions ul {
  display: grid;
  gap: 13px;
  padding-left: 1.2em;
  margin: 0;
}

.profile-contradictions li {
  color: var(--ink-soft);
  line-height: 1.75;
}

.scene-ledger > ol {
  display: grid;
  gap: 18px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.scene-ledger > ol > li {
  border: 1px solid var(--line);
  background: rgba(255,252,246,.48);
}

.scene-ledger > ol > li > article {
  padding: 30px 32px;
}

.scene-heading {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.scene-heading > span {
  color: var(--carmine);
  font-family: var(--sans);
  font-size: 12px;
}

.scene-heading h3 {
  margin: 0;
  font-size: 22px;
}

.scene-source-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 14px;
}

.scene-heading a,
.evidence-chain a,
.candidate-chapters a {
  color: var(--carmine);
  font-family: var(--sans);
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.scene-ledger dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
}

.scene-ledger dl > div {
  padding: 22px 20px 10px 0;
}

.scene-ledger dt {
  margin-bottom: 7px;
  color: var(--ink-faint);
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: .08em;
}

.scene-ledger dd {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.75;
}

.scene-ledger .counter-reading dd {
  color: #6f3d3f;
}

.profile-review-note {
  margin: 44px 20px 0;
  padding: 25px 28px;
  border: 1px solid rgba(116,47,56,.24);
  background: rgba(116,47,56,.05);
}

.profile-review-note strong {
  display: block;
  margin-bottom: 8px;
  color: var(--carmine);
}

.profile-review-note p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.7;
}

.candidate-chapters > div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.candidate-chapters a {
  padding: 12px 15px;
  border: 1px solid var(--line-strong);
  background: rgba(255,252,246,.5);
}

.result-reading-intro {
  max-width: 820px;
  margin: 22px 0 40px;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.8;
}

.primary-portrait-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr));
  gap: 18px;
}

.primary-portrait-card {
  padding: 34px;
  border-top: 4px solid var(--portrait-color);
  background: rgba(255,252,246,.56);
}

.primary-portrait-card > header {
  display: flex;
  align-items: center;
  gap: 17px;
  margin-bottom: 24px;
}

.primary-portrait-card > header > span {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  color: var(--portrait-color);
  border: 1px solid color-mix(in srgb, var(--portrait-color) 50%, transparent);
  border-radius: 50%;
  font-size: 24px;
}

.primary-portrait-card header p {
  margin: 0 0 4px;
  color: var(--carmine);
  font-family: var(--sans);
  font-size: 10px;
}

.primary-portrait-card h3 {
  margin: 0;
  font-size: 30px;
}

.portrait-summary {
  color: #465048;
  font-size: 18px;
  line-height: 1.85;
}

.portrait-position {
  margin: 24px 0;
  padding: 20px 22px;
  color: var(--ink-soft);
  background: rgba(225,216,199,.34);
  line-height: 1.75;
}

.portrait-position strong {
  display: block;
  margin-bottom: 7px;
  color: var(--carmine);
  font-family: var(--sans);
  font-size: 10px;
}

.portrait-pairs {
  display: grid;
  gap: 10px;
}

.portrait-pairs article {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
}

.portrait-pairs p {
  margin: 0;
  padding: 16px;
  color: var(--ink-soft);
  line-height: 1.65;
}

.portrait-pairs p + p {
  border-left: 1px solid var(--line);
}

.portrait-pairs strong {
  display: block;
  margin-bottom: 5px;
  color: var(--carmine);
  font-family: var(--sans);
  font-size: 9px;
}

.primary-portrait-card blockquote {
  margin: 24px 0;
  padding-left: 20px;
  color: var(--ink-soft);
  border-left: 3px solid var(--gold);
  line-height: 1.75;
}

.evidence-list li {
  padding: 30px 4px;
}

.evidence-list li > article {
  min-width: 0;
}

.evidence-list .evidence-question {
  margin-bottom: 6px;
}

.evidence-list h3 {
  margin-bottom: 22px;
  font-size: 21px;
  font-weight: 500;
  line-height: 1.6;
}

.evidence-origin {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
  padding: 5px 9px;
  color: var(--jade-dark);
  border: 1px solid color-mix(in srgb, var(--jade) 35%, transparent);
  background: rgba(74, 105, 90, 0.07);
  font-family: var(--sans);
}

.evidence-origin.is-same-scene {
  color: var(--carmine);
  border-color: rgba(125, 46, 56, 0.25);
  background: rgba(125, 46, 56, 0.06);
}

.evidence-origin.is-same-episode {
  color: var(--jade-dark);
  border-color: rgba(74, 105, 90, 0.3);
  background: rgba(74, 105, 90, 0.08);
}

.evidence-origin.is-modern-bridge {
  color: #805c27;
  border-color: rgba(179, 132, 62, 0.35);
  background: rgba(179, 132, 62, 0.08);
}

.evidence-origin span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.evidence-origin small {
  color: inherit;
  font-size: 11px;
}

.evidence-chain {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.evidence-chain > div {
  padding: 22px;
  background: rgba(255,252,246,.86);
}

.evidence-chain > div.evidence-limit {
  background: rgba(233,224,207,.72);
}

.evidence-chain > div.evidence-reveal {
  background: #faf5ec;
}

.evidence-chain span {
  display: block;
  margin-bottom: 9px;
  color: var(--carmine);
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
}

.evidence-chain strong {
  display: block;
  margin-bottom: 10px;
  font-size: 15px;
}

.evidence-chain p {
  margin: 0 0 12px;
  color: #4f554f;
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0;
  line-height: 1.75;
}

.evidence-chain p.role-pressure {
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 11px;
}

.bridge-reason {
  margin: 12px 0 0;
  padding: 12px 15px;
  color: #6d512b;
  border-left: 3px solid var(--gold);
  background: rgba(179, 132, 62, 0.08);
  font-family: var(--sans);
  font-size: 11px;
  line-height: 1.65;
}

.bridge-reason strong {
  color: var(--carmine);
}

.comparison-audit {
  margin-top: 12px;
  border: 1px solid var(--control-line);
  background: rgba(255, 252, 246, 0.72);
  font-family: var(--sans);
}

.comparison-audit summary {
  padding: 12px 15px;
  color: var(--carmine);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.comparison-audit > div {
  padding: 0 15px 12px;
  border-top: 1px solid var(--line);
}

.comparison-audit p {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.7;
}

.comparison-audit strong {
  color: var(--ink);
}

.comparison-option-check {
  margin-top: 14px;
  padding: 12px 14px 14px;
  border-left: 3px solid var(--jade);
  background: rgba(74, 105, 90, 0.07);
}

.comparison-option-check h4 {
  margin: 0;
  color: var(--jade-dark);
  font-family: var(--sans);
  font-size: 12px;
}

.evidence-list li > article > small {
  display: block;
  margin-top: 12px;
  color: var(--ink-faint);
  font-family: var(--sans);
  font-size: 10px;
  line-height: 1.6;
}

@media (max-width: 980px) {
  .profiles-hero {
    grid-template-columns: 1fr;
  }

  .coverage-summary {
    grid-column: 1;
    grid-row: auto;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .coverage-summary article {
    grid-template-columns: 1fr;
    padding: 24px 18px 0;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .coverage-summary article:last-child {
    border-right: 0;
  }

  .profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .catalog-filters {
    flex-wrap: wrap;
  }

  .facet-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .facet-grid article:last-child {
    grid-column: 1 / -1;
    min-height: 0;
  }

  .evidence-chain {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .profiles-stage {
    padding: 28px 16px 90px;
  }

  .profiles-topbar {
    margin-bottom: 30px;
  }

  .profiles-hero {
    padding: 36px 24px;
  }

  .profiles-hero h1 {
    font-size: clamp(36px, 12vw, 54px);
  }

  .profiles-hero > p:last-of-type {
    font-size: 15px;
  }

  .catalog-census-boundary,
  .index-only-facts {
    grid-template-columns: 1fr;
  }

  .coverage-summary strong {
    font-size: 34px;
  }

  .catalog-controls,
  .catalog-cta {
    display: grid;
    align-items: stretch;
  }

  .catalog-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-filters button {
    min-width: 0;
    padding-inline: 8px;
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }

  .profile-card > button {
    min-height: 0;
  }

  .profile-detail-hero {
    display: grid;
    justify-items: start;
    padding: 36px 26px;
  }

  .profile-detail-glyph {
    width: 90px;
    height: 90px;
    font-size: 42px;
  }

  .profile-detail-lead,
  .scene-profile-copy,
  .strength-cost-section > div,
  .profile-contradictions > div {
    grid-template-columns: 1fr;
  }

  .profile-detail section {
    padding: 56px 4px;
  }

  .facet-grid,
  .strength-cost-section article,
  .portrait-pairs article,
  .scene-ledger dl {
    grid-template-columns: 1fr;
  }

  .facet-grid article:last-child {
    grid-column: auto;
  }

  .strength-cost-section article p + p,
  .portrait-pairs p + p {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .scene-heading {
    grid-template-columns: 1fr;
  }

  .scene-source-actions {
    justify-content: flex-start;
  }

  .scene-ledger > ol > li > article {
    padding: 24px 20px;
  }

  .primary-portrait-card {
    padding: 26px 20px;
  }

  .catalog-cta .secondary-button {
    justify-self: start;
  }
}

@media (max-width: 520px) {
  .brand-copy small {
    display: none;
  }

  .header-actions {
    gap: 1px;
  }

  .header-actions .quiet-button {
    padding-inline: 7px;
    font-size: 11px;
  }

  .coverage-summary article {
    padding-inline: 8px;
  }

  .coverage-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .coverage-summary article:nth-child(even) {
    border-right: 0;
  }

  .coverage-summary article:nth-child(-n + 4) {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
  }

  .coverage-summary article:last-child {
    grid-column: 1 / -1;
  }

  .coverage-summary span {
    font-size: 10px;
  }

  .profile-detail-hero h1 {
    font-size: 52px;
  }
}

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

@media print {
  .site-header,
  .site-footer,
  .result-quick-actions,
  .result-actions,
  .source-result button {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .result-stage {
    padding: 0;
  }
}
