/* MySaintMatch / TuSanto
   Idea: a missal page and a holy card. Lapis ink on paper, rubrics in red for the small
   lines that guide you, and one recurring object: the saint in an arched niche. */

@font-face { font-family: 'Alegreya'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/alegreya-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Alegreya'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/alegreya-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Alegreya'; font-style: italic; font-weight: 400; font-display: swap; src: url(/fonts/alegreya-latin-400-italic.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F; }
@font-face { font-family: 'Alegreya'; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/alegreya-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F; }
@font-face { font-family: 'Alegreya'; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/alegreya-latin-ext-500-normal.woff2) format('woff2'); unicode-range: U+0100-02AF, U+1E00-1E9F; }
@font-face { font-family: 'Alegreya'; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/alegreya-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F; }
@font-face { font-family: 'Alegreya Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/alegreya-sans-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F; }
@font-face { font-family: 'Alegreya Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/alegreya-sans-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F; }

:root {
  --paper: #FCFBF8;
  --white: #FFFFFF;
  --ink: #1E2A5A;        /* lapis ink: text and actions */
  --ink-deep: #141D42;
  --rubric: #A8321F;     /* vermilion, only for rubric lines */
  --gold: #A7832F;       /* gilt hairlines and the niche frame */
  --stone: #585D6E;      /* secondary text */
  --rule: #DCD6C8;
  --wash: #ECEEF6;       /* chosen answer */
  --serif: 'Alegreya', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --sans: 'Alegreya Sans', 'Gill Sans', 'Segoe UI', system-ui, sans-serif;
  --measure: 36rem;
  --s1: .5rem; --s2: .75rem; --s3: 1rem; --s4: 1.5rem; --s5: 2.25rem; --s6: 3.5rem; --s7: 5rem;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.125rem/1.6 var(--serif); font-kerning: normal; font-variant-ligatures: common-ligatures;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
@media (min-width: 700px) { body { font-size: 1.1875rem; } }
img { max-width: 100%; }
a { color: var(--ink); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink-deep); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3, h4 { font-weight: 500; line-height: 1.2; margin: 0 0 var(--s3); text-wrap: balance; }
p { margin: 0 0 var(--s3); text-wrap: pretty; }
code { font-family: var(--sans); font-weight: 500; letter-spacing: .06em; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--s3); top: var(--s3); background: var(--white); padding: var(--s2) var(--s3); z-index: 10; }
[hidden] { display: none !important; }

/* ---------- frame ---------- */
#app { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; width: 100%; max-width: calc(var(--measure) + 2.5rem); margin: 0 auto; padding: 0 1.25rem var(--s7); }
.masthead { display: flex; align-items: baseline; justify-content: space-between; max-width: calc(var(--measure) + 2.5rem); width: 100%; margin: 0 auto; padding: var(--s4) 1.25rem var(--s5); }
.wordmark { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--serif); font-weight: 500; font-size: 1.3rem; letter-spacing: .01em; text-decoration: none; }
.wordmark-mark { width: 1.05rem; height: 1.4rem; flex: none; }
.masthead { align-items: center; }
.mast-nav a { font-family: var(--sans); font-size: .95rem; color: var(--stone); }
.colophon { border-top: 1px solid var(--rule); padding: var(--s5) 1.25rem var(--s6); font-family: var(--sans); font-size: .95rem; color: var(--stone); }
.colophon nav, .colophon p { max-width: var(--measure); margin: 0 auto; }
.colophon nav { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); margin-bottom: var(--s3); }
.colophon a { color: var(--stone); }

/* ---------- type roles ---------- */
.display { font-size: clamp(2.1rem, 7.2vw, 3.15rem); line-height: 1.08; letter-spacing: -.012em; margin-bottom: var(--s4); }
.sub { font-size: 1.2rem; color: var(--ink); max-width: 33rem; }
.rubric { font-style: italic; color: var(--rubric); font-size: 1.02rem; }
.note { font-family: var(--sans); font-size: .95rem; color: var(--stone); line-height: 1.5; }
.meta { font-family: var(--sans); color: var(--stone); font-size: .98rem; }
.trust { font-family: var(--sans); font-size: 1rem; margin: var(--s3) 0 var(--s1); }

/* ---------- actions ---------- */
.btn {
  display: inline-block; font: 500 1.08rem/1.2 var(--sans); letter-spacing: .01em;
  background: var(--ink); color: var(--white); border: 0; border-radius: 3px;
  padding: 1rem 1.5rem; cursor: pointer; text-decoration: none; text-align: center;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--ink-deep); color: var(--white); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-wide { width: 100%; max-width: 26rem; }
.btn-quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.btn-quiet:hover { background: var(--wash); color: var(--ink); }
.btn-small { padding: .55rem .9rem; font-size: .95rem; }
.link-btn { background: none; border: 0; padding: 0; font: 400 1rem var(--sans); color: var(--stone); text-decoration: underline; text-underline-offset: .18em; cursor: pointer; }

/* ---------- the niche: one object, used everywhere a saint appears ---------- */
.niche { margin: 0; aspect-ratio: 3 / 4; padding: 5px; border: 1px solid var(--gold); border-radius: 50% 50% 2px 2px / 37.5% 37.5% 2px 2px; background: var(--white); }
.niche img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; border-radius: inherit; background: var(--white); }
.niche-lg { width: min(15rem, 62vw); margin: 0 auto var(--s4); }
.niche-md { width: 9rem; }
.niche-sm { width: 4.6rem; padding: 3px; }

/* ---------- landing ---------- */
.hero { padding-top: var(--s3); }
.hero .note { margin-top: var(--s2); }
.resume { font-family: var(--sans); margin-top: var(--s4); }
.reredos { margin: var(--s6) -1.25rem var(--s5); padding: var(--s4) 1.25rem; border-block: 1px solid var(--rule); }
.reredos ul { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 4.6rem; gap: var(--s3); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; padding-bottom: var(--s1); }
.reredos li { scroll-snap-align: start; }
.reredos a { text-decoration: none; display: block; }
.reredos span { display: block; font-family: var(--sans); font-size: .8rem; line-height: 1.25; color: var(--stone); margin-top: .4rem; text-align: center; }
@media (min-width: 760px) { .reredos ul { grid-auto-flow: row; grid-template-columns: repeat(8, 1fr); grid-auto-columns: auto; overflow: visible; } }
.how ol { padding-left: 1.4rem; margin: 0; }
.how li { margin-bottom: var(--s3); padding-left: .3rem; }
.how li::marker { font-family: var(--sans); color: var(--rubric); }
.how, .honest, .faq { margin-top: var(--s6); }
.faq details { border-top: 1px solid var(--rule); padding: var(--s3) 0; }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; font-weight: 500; list-style-position: outside; }
.faq details p { margin: var(--s2) 0 0; }
.end-cta { margin-top: var(--s6); }

/* ---------- quiz ---------- */
.quiz { padding-top: var(--s4); }
.quiz-head { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--sans); color: var(--stone); font-size: .95rem; margin-bottom: var(--s2); }
.quiz-head .back { text-decoration: none; }
.quiz-head .back::before { content: '‹ '; }
.progress { height: 2px; background: var(--rule); margin-bottom: var(--s5); }
.progress span { display: block; height: 100%; background: var(--gold); transition: width .3s ease; }
.prompt { font-size: clamp(1.55rem, 5.4vw, 2rem); line-height: 1.2; margin-bottom: var(--s2); outline: none; }
.question .rubric, .about .rubric, .checkpoint > .rubric { margin-bottom: var(--s4); }
.options { display: grid; gap: var(--s2); }
.option {
  display: grid; grid-template-columns: 1.6rem 1fr; gap: var(--s2); align-items: baseline; text-align: left;
  font: 400 1.08rem/1.45 var(--serif); color: var(--ink); background: var(--white);
  border: 1px solid var(--rule); border-radius: 3px; padding: .95rem 1rem; cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: border-color .15s, background-color .15s;
}
.option .key { font-family: var(--sans); font-size: .9rem; color: var(--stone); }
@media (hover: hover) { .option:hover { border-color: var(--stone); } }
.option[aria-pressed="true"] { border-color: var(--ink); background: var(--wash); box-shadow: inset 0 0 0 1px var(--ink); }
.option[aria-pressed="true"] .key { color: var(--ink); }
.skip-q20 { margin-top: var(--s4); }
.checkpoint { padding-top: var(--s2); }
.checkpoint-body { margin: var(--s3) 0; }
.checkpoint .note { margin-bottom: var(--s5); }

/* ---------- forms ---------- */
.form { display: grid; gap: var(--s4); max-width: 28rem; }
.field { display: grid; gap: .35rem; }
.field span { font-family: var(--sans); font-weight: 500; font-size: 1rem; }
.field small { font-family: var(--sans); color: var(--stone); font-size: .9rem; }
.field input {
  font: 400 1.1rem var(--serif); color: var(--ink); background: var(--white);
  border: 1px solid var(--stone); border-radius: 3px; padding: .8rem .85rem; width: 100%;
}
.field input:focus { outline: 3px solid var(--gold); outline-offset: 1px; }
.form-error { color: var(--rubric); font-family: var(--sans); margin: 0; }
.inline-form { display: grid; gap: var(--s2); margin-top: var(--s3); max-width: 24rem; }

/* ---------- share your saint ---------- */
.share { display: grid; grid-template-columns: 6.25rem 1fr; gap: var(--s3); align-items: start; margin: var(--s5) 0 0; padding: var(--s3); background: var(--white); border: 1px solid var(--rule); border-radius: 3px; }
.share-card { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; border: 1px solid var(--rule); border-radius: 2px; }
.share h2 { font-size: 1.3rem; margin-bottom: var(--s1); }
.share-body > p { margin: 0 0 var(--s2); font-size: 1rem; line-height: 1.5; }
.share-actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
.share-actions .btn { padding: .6rem 1.1rem; font-size: 1rem; }
.report .share { margin-top: var(--s6); }
.shared-by { display: grid; grid-template-columns: 3.4rem 1fr; gap: var(--s3); align-items: center; margin: 0 0 var(--s4); padding-bottom: var(--s3); border-bottom: 1px solid var(--rule); }
.shared-by .niche-sm { width: 3.4rem; }
.shared-by p { margin: 0; font-size: 1rem; line-height: 1.45; }
.shared-by .rubric { display: block; font-style: italic; font-size: .95rem; }
.shared-name { display: block; font-weight: 500; font-size: 1.2rem; line-height: 1.25; margin-bottom: .15rem; }

/* ---------- result: the holy card ---------- */
.holy-card { text-align: center; padding-top: var(--s2); }
.holy-card .rubric { margin-bottom: var(--s1); }
.saint-name { font-size: clamp(2rem, 7vw, 2.75rem); line-height: 1.1; margin-bottom: var(--s2); }
.tagline { font-size: 1.2rem; font-style: italic; max-width: 26rem; margin: 0 auto var(--s2); }
.showed, .offer { margin-top: var(--s6); }
.showed h2, .offer h2, .report section > h2, .report .pair h2 { font-size: 1.6rem; }
.showed h2::before, .offer h2::before, .report section > h2::before, .report .pair h2::before,
.page > h1::before { content: ''; display: block; width: 3rem; border-top: 2px solid var(--gold); margin-bottom: var(--s3); }
.lines { list-style: none; padding: 0; margin: 0 0 var(--s4); }
.lines li { padding: var(--s2) 0 var(--s2) 1.1rem; border-left: 2px solid var(--rule); margin-bottom: var(--s2); }
.contents { padding-left: 1.2rem; margin: 0 0 var(--s5); }
.contents li { margin-bottom: .35rem; }
.contents li::marker { color: var(--gold); }
.tiers fieldset { border: 0; margin: 0 0 var(--s4); padding: 0; display: grid; gap: var(--s2); }
.tiers legend { font-family: var(--sans); font-weight: 500; margin-bottom: var(--s2); padding: 0; }
.tier {
  position: relative; display: grid; grid-template-columns: 1.4rem 1fr auto; grid-template-areas: 'r name price' '. note note';
  gap: .15rem var(--s2); align-items: baseline; padding: 1rem 1rem 1rem .9rem;
  border: 1px solid var(--rule); border-radius: 3px; background: var(--white); cursor: pointer;
}
.tier input { grid-area: r; accent-color: var(--ink); width: 1.05rem; height: 1.05rem; margin: 0; align-self: center; }
.tier-name { grid-area: name; font-weight: 500; }
.tier-price { grid-area: price; font-family: var(--sans); font-weight: 500; font-size: 1.15rem; }
.tier-note { grid-area: note; font-family: var(--sans); font-size: .95rem; color: var(--stone); }
.tier-flag { position: absolute; top: -.7rem; right: .8rem; background: var(--paper); padding: 0 .4rem; font-style: italic; font-size: .92rem; color: var(--rubric); }
.tier:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.gift-code { margin-top: var(--s5); font-family: var(--sans); }
.gift-code summary { cursor: pointer; color: var(--stone); text-decoration: underline; text-underline-offset: .18em; }
.test-banner { font-family: var(--sans); font-size: .95rem; background: #FFF6DA; border: 1px solid #E6D59A; padding: var(--s2) var(--s3); border-radius: 3px; }
.center-page { padding-top: var(--s6); text-align: center; }

/* the one orchestrated moment: meeting your saint */
@media (prefers-reduced-motion: no-preference) {
  .reveal .holy-card .niche { animation: niche-in 1.1s cubic-bezier(.2,.7,.2,1) both; }
  .reveal .holy-card .rubric { animation: fade-in .6s .55s both; }
  .reveal .holy-card .saint-name { animation: fade-in .7s .75s both; }
  .reveal .holy-card .tagline, .reveal .holy-card .meta { animation: fade-in .7s 1s both; }
  @keyframes niche-in { from { clip-path: inset(100% 0 0 0 round 50% 50% 0 0); opacity: .4; } to { clip-path: inset(0 0 0 0 round 0); opacity: 1; } }
  @keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}

/* ---------- report ---------- */
.report section, .report .quote, .report .gifts { margin-top: var(--s6); }
.report-cover { text-align: center; }
.report-cover .rubric { margin-bottom: var(--s1); }
.aka { font-style: italic; color: var(--stone); max-width: 28rem; margin: 0 auto; }
.actions { margin-top: var(--s4); }
.section-title { font-size: 1.3rem; font-style: italic; font-weight: 400; }
.pair { display: grid; gap: var(--s5); }
@media (min-width: 760px) { .pair { grid-template-columns: 1fr 1fr; } }
.bars { list-style: none; padding: 0; margin: 0 0 var(--s3); display: grid; gap: var(--s3); }
.bar { display: grid; grid-template-columns: 1fr auto; gap: .3rem var(--s2); }
.bar-label em { font-family: var(--sans); font-style: normal; font-size: .9rem; color: var(--rubric); margin-left: .25rem; }
.bar-value { font-family: var(--sans); font-weight: 500; }
.bar-track { grid-column: 1 / -1; height: 6px; background: var(--wash); border-radius: 3px; overflow: hidden; }
.bar-track span { display: block; height: 100%; background: var(--ink); border-radius: 3px; }
.bar-shadow .bar-track span, .bar-blind .bar-track span { background: repeating-linear-gradient(135deg, var(--rubric) 0 3px, #C9705F 3px 6px); }
.story-sub { font-style: italic; }
.scenes { list-style: none; padding: 0; margin: 0; }
.scenes li { padding: var(--s3) 0 var(--s3) var(--s4); border-left: 1px solid var(--gold); position: relative; }
.scenes li::before { content: ''; position: absolute; left: -4px; top: 1.6rem; width: 7px; height: 7px; background: var(--gold); transform: rotate(45deg); }
.dateline { font-family: var(--sans); font-size: .95rem; color: var(--stone); font-variant-caps: all-small-caps; letter-spacing: .06em; margin-bottom: .2rem; }
.scenes h3 { font-size: 1.25rem; margin-bottom: var(--s1); }
.source { font-family: var(--sans); font-size: .88rem; color: var(--stone); font-style: italic; }
.duo { display: grid; gap: var(--s3); margin: 0 0 var(--s4); }
@media (min-width: 640px) { .duo { grid-template-columns: 1fr 1fr; } }
.duo dt, .glance dt, .partner dt { font-family: var(--sans); font-weight: 500; color: var(--stone); font-size: .98rem; }
.duo dd, .glance dd, .partner dd { margin: .2rem 0 0; }
.glance, .partner { margin: 0; display: grid; gap: var(--s3); }
.careers { list-style: none; padding: 0; margin: 0 0 var(--s3); display: grid; gap: var(--s3); }
.careers strong { display: block; font-weight: 500; }
.careers span { color: var(--stone); }
.rules { display: grid; gap: var(--s4); }
@media (min-width: 640px) { .rules { grid-template-columns: 1fr 1fr; } }
.rules h4 { font-family: var(--sans); font-size: 1rem; color: var(--rubric); margin-bottom: var(--s1); }
.rules ul { padding-left: 1.1rem; margin: 0; }
.rules li { margin-bottom: var(--s2); }
.quote { margin: var(--s6) 0 0; padding: var(--s5) 0; border-block: 1px solid var(--rule); text-align: center; }
.quote blockquote { margin: 0; font-size: 1.45rem; line-height: 1.4; font-style: italic; }
.quote figcaption { font-family: var(--sans); color: var(--stone); font-size: .92rem; font-variant-caps: all-small-caps; letter-spacing: .05em; margin-top: var(--s3); }
.also { display: grid; grid-template-columns: auto 1fr; gap: var(--s4); align-items: center; }
.also h2 { font-size: 1.3rem !important; }
.also h2::before { display: none !important; }
.gifts ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s2); }
.gift { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; padding: var(--s2) 0; border-bottom: 1px solid var(--rule); }
.gift code { font-size: 1.1rem; margin-right: auto; }
.gift-redeemed code, .gift-revoked code { color: var(--stone); text-decoration: line-through; }
.report-foot { margin-top: var(--s6); border-top: 1px solid var(--rule); padding-top: var(--s4); }

/* ---------- plain pages ---------- */
.page { padding-top: var(--s3); }
.page > h1 { font-size: clamp(1.9rem, 6vw, 2.4rem); }
.legal h2 { font-size: 1.25rem; margin-top: var(--s5); }
.my-list { list-style: none; padding: 0; display: grid; gap: var(--s4); }
.my-list li { display: grid; grid-template-columns: auto 1fr; gap: var(--s3); align-items: center; }
.my-list .note { display: block; }
.saint-list { list-style: none; padding: 0; margin: var(--s5) 0 0; display: grid; gap: var(--s5); }
.saint-list li { display: grid; grid-template-columns: 7rem 1fr; gap: var(--s4); align-items: start; scroll-margin-top: var(--s4); }
.saint-list .niche-md { width: 7rem; }
.saint-list h2 { font-size: 1.35rem; margin-bottom: .2rem; }

/* ---------- print / PDF ---------- */
@page { size: letter; margin: .65in .7in; }
@media print {
  body { font-size: 11.5pt; background: #fff; }
  .masthead, .colophon, .no-print, .skip { display: none !important; }
  main { max-width: none; padding: 0; }
  .report section, .report .quote { margin-top: 22pt; break-inside: avoid-page; }
  .report section > h2 { break-after: avoid; }
  .report-cover { break-after: page; padding-top: 1.2in; }
  .niche-lg { width: 3in; }
  .scenes li, .bars li, .careers li { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}
.print-route main { max-width: 7.1in; }
