@font-face {
  font-family: 'Instrument Sans';
  src: url('/fonts/InstrumentSans-400.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Instrument Sans';
  src: url('/fonts/InstrumentSans-500.ttf') format('truetype');
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: 'Instrument Sans';
  src: url('/fonts/InstrumentSans-600.ttf') format('truetype');
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: 'Instrument Serif';
  src: url('/fonts/InstrumentSerif-400-italic.ttf') format('truetype');
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #0c0709;
  --moment: #2a0810;
  --action: #6e1423;
  --gold: #b08d57;
  --beige: #e8d9c4;
  --text: #f0e7dd;
  --muted: rgba(240, 231, 221, 0.55);
  --faint: rgba(240, 231, 221, 0.62);
  --line: rgba(240, 231, 221, 0.1);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 400;
  line-height: 1.55;
}

body {
  min-height: 100vh;
}

a {
  color: var(--gold);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

main p a,
main li a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.shell {
  width: min(680px, calc(100% - 40px));
  margin: 0 auto;
  padding: 48px 0 80px;
}

header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  font-size: 22px;
  letter-spacing: -0.04em;
  color: var(--text);
  text-decoration: none;
}

.wordmark:hover {
  text-decoration: none;
}

.wordmark em {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 400;
  color: var(--gold);
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
}

nav a {
  color: var(--faint);
}

nav a[aria-current='page'] {
  color: var(--beige);
}

.kicker {
  margin: 40px 0 10px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--gold);
}

h1 {
  margin: 0 0 16px;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.4px;
  line-height: 1.15;
}

h2 {
  margin: 32px 0 8px;
  font-size: 15px;
  font-weight: 600;
}

p,
li {
  color: var(--muted);
  font-size: 16px;
}

ul {
  padding-left: 1.15em;
}

.lead {
  color: var(--beige);
}

.card {
  margin-top: 28px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--moment);
}

.card p:last-child {
  margin-bottom: 0;
}

.links {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}

.links a {
  display: block;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  text-decoration: none;
}

.links a:hover {
  border-color: rgba(176, 141, 87, 0.45);
  text-decoration: none;
}

.links small {
  display: block;
  margin-top: 4px;
  color: var(--faint);
  font-size: 13px;
}

footer {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--faint);
}

footer p {
  color: var(--faint);
  font-size: 12px;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

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

.quiz-shell {
  width: min(760px, calc(100% - 40px));
}

.quiz-main {
  min-height: 620px;
}

.quiz-view[hidden] {
  display: none;
}

.quiz-view {
  padding: 12px 0;
}

.trust-list {
  display: grid;
  gap: 10px;
  margin: 0 0 28px;
  padding-left: 20px;
}

.trust-list li {
  padding: 12px 14px 12px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--beige);
  font-size: 14px;
}

.trust-list li::marker {
  color: var(--gold);
}

.primary-button,
.secondary-button,
.text-button {
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: 13px 20px;
}

.primary-button {
  width: 100%;
  background: var(--action);
  color: var(--text);
}

.primary-button:hover {
  background: #841a2c;
  text-decoration: none;
}

.secondary-button {
  border: 1px solid rgba(240, 231, 221, 0.16);
  background: rgba(240, 231, 221, 0.05);
  color: var(--beige);
}

.secondary-button:hover {
  border-color: rgba(176, 141, 87, 0.5);
}

.text-button {
  padding: 8px;
  background: transparent;
  color: var(--faint);
  font-size: 13px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.button-link {
  margin-top: 24px;
  text-decoration: none;
}

.app-handoff {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}

.app-handoff .button-link,
.app-handoff .primary-button {
  margin-top: 0;
}

.app-open-help {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid rgba(176, 141, 87, 0.28);
  border-radius: 12px;
  background: rgba(176, 141, 87, 0.08);
  color: var(--beige);
  font-size: 13px;
}

.link-fallback-shell {
  width: min(620px, calc(100% - 40px));
}

.link-code-card .field-label {
  margin-top: 0;
}

.link-code-card input {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

.fine-print,
.status-text {
  font-size: 12px;
}

.fine-print {
  max-width: 520px;
  margin: 14px auto 0;
  text-align: center;
}

.field-label {
  display: block;
  margin: 28px 0 8px;
  color: var(--beige);
  font-size: 13px;
}

.copy-field {
  display: flex;
  gap: 8px;
}

.copy-field input {
  min-width: 0;
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(240, 231, 221, 0.04);
  color: var(--beige);
  padding: 12px 14px;
}

.status-text {
  min-height: 20px;
  margin: 7px 0 20px;
  color: var(--gold);
}

.consent-card,
.privacy-note,
.empty-result {
  margin: 28px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--moment);
}

.consent-card strong,
.empty-result strong {
  color: var(--beige);
}

.consent-card p,
.empty-result p {
  margin-bottom: 0;
  font-size: 14px;
}

.quiz-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 28px;
}

.quiz-progress-row .kicker {
  margin: 0;
}

.progress-track {
  height: 3px;
  margin: 14px 0 46px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(240, 231, 221, 0.09);
}

.progress-track span {
  display: block;
  width: 10%;
  height: 100%;
  background: var(--gold);
  transition: width 180ms ease;
}

.question-category {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.question-title {
  max-width: 640px;
  font-family: 'Instrument Serif', serif;
  font-size: clamp(31px, 7vw, 44px);
  font-style: italic;
  font-weight: 400;
  line-height: 1.12;
}

.question-help {
  margin: 16px 0 22px;
  font-size: 14px;
}

.answer-options {
  display: grid;
  gap: 10px;
}

.answer-options button {
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(240, 231, 221, 0.035);
  text-align: left;
  cursor: pointer;
}

.answer-options button:hover,
.answer-options button.selected {
  border-color: rgba(176, 141, 87, 0.6);
  background: var(--moment);
}

.answer-options button strong,
.answer-options button span {
  display: block;
}

.answer-options button strong {
  color: var(--text);
  font-size: 15px;
}

.answer-options button span {
  margin-top: 2px;
  color: var(--faint);
  font-size: 12px;
}

.quiz-actions {
  display: grid;
  grid-template-columns: minmax(110px, 0.7fr) minmax(170px, 1.3fr);
  gap: 10px;
  margin-top: 28px;
}

.review-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 28px 0;
}

.review-summary div {
  padding: 18px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-align: center;
}

.review-summary strong,
.review-summary span {
  display: block;
}

.review-summary strong {
  color: var(--gold);
  font-family: 'Instrument Serif', serif;
  font-size: 28px;
  font-style: italic;
  font-weight: 400;
}

.review-summary span {
  color: var(--faint);
  font-size: 12px;
}

.centered-view {
  max-width: 580px;
  margin: 0 auto;
  padding-top: 72px;
  text-align: center;
}

.centered-view .secondary-button {
  margin-top: 16px;
}

.result-list {
  display: grid;
  gap: 10px;
  margin-top: 30px;
}

.result-card {
  padding: 18px;
  border: 1px solid rgba(176, 141, 87, 0.28);
  border-radius: 14px;
  background: var(--moment);
}

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

.result-card span {
  color: var(--gold);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.result-card strong {
  margin-top: 8px;
  color: var(--beige);
  font-family: 'Instrument Serif', serif;
  font-size: 23px;
  font-style: italic;
  font-weight: 400;
  line-height: 1.28;
}

.result-card small {
  margin-top: 10px;
  color: var(--faint);
}

.privacy-note {
  color: var(--faint);
  font-size: 13px;
  line-height: 1.55;
}

.home-main h1 {
  max-width: 620px;
  font-size: clamp(38px, 8vw, 58px);
  letter-spacing: -0.045em;
}

.home-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  max-width: 320px;
  margin-top: 28px;
}

.home-actions .button-link {
  margin-top: 0;
}

.home-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 36px;
}

.home-features article {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.home-features span,
.home-features strong {
  display: block;
}

.home-features span {
  margin-bottom: 14px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 600;
}

.home-features strong {
  color: var(--beige);
  font-size: 14px;
}

.home-features p {
  margin-bottom: 0;
  font-size: 12px;
}

@media (max-width: 520px) {
  .shell,
  .quiz-shell {
    width: min(100% - 28px, 760px);
    padding-top: 28px;
  }

  header {
    align-items: flex-start;
  }

  nav {
    justify-content: flex-end;
    gap: 10px;
  }

  .copy-field {
    display: grid;
  }

  .question-title {
    font-size: 31px;
  }

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

  .quiz-actions .primary-button {
    grid-row: 1;
  }

  .home-actions,
  .home-features {
    grid-template-columns: 1fr;
  }
}

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