/* The attachment test (/attachment/) and its result page (/attachment/result/). Colours from style.css. */
.quiz-intro { text-align: center; color: var(--muted); margin: -6px auto 20px; max-width: 540px; line-height: 1.5; }
.quiz-note { font-size: 0.82rem; color: var(--muted); margin-top: 26px; line-height: 1.5; max-width: 44em; }
.ar-hero { text-align: center; padding-top: 28px; }
.ar-hero h1 { margin: .3em 0 0; }
.ar-lean { color: var(--muted); font-style: italic; }
.ar-map { max-width: 360px; margin: 20px auto 8px; }
.ar-map svg { width: 100%; height: auto; display: block; }
.ar-map rect { stroke: var(--line); stroke-width: 1; }
.ar-map .q-secure { fill: #eef6ee; } .ar-map .q-anxious { fill: #fbf1e6; }
.ar-map .q-avoidant { fill: #eaf1f8; } .ar-map .q-fearful { fill: #f3ecf8; }
.ar-map text { font-size: 13px; text-anchor: middle; fill: var(--ink); font-weight: 600; }
.ar-map .q-name { font-size: 12px; fill: var(--muted); letter-spacing: .02em; }
.ar-map .ar-axis { font-size: 11px; font-weight: 400; fill: var(--muted); }
.ar-map circle { fill: var(--accent); stroke: #fff; stroke-width: 3; }
.ar-map .dot-you { fill: var(--accent); } .ar-map .dot-parent { fill: var(--gold); } .ar-map .dot-partner { fill: var(--angel); }
.ar-map .ar-dot-label { font-size: 12px; font-weight: 700; paint-order: stroke; stroke: #fff; stroke-width: 3px; }
.ar-map .dot-you-t { fill: var(--accent-deep); } .ar-map .dot-parent-t { fill: #8a6526; } .ar-map .dot-partner-t { fill: #23775a; }
@media (min-width: 900px) { .ar-map { max-width: 420px; } }
.ar-map figcaption { font-size: 0.88rem; color: var(--muted); margin-top: 6px; }
.ar-report, .ar-next { max-width: 680px; }
.ar-report p { line-height: 1.65; }
.ar-k { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.72rem; font-weight: 600; color: var(--accent-deep); margin-bottom: 6px; }
.ar-line { font-family: "Fraunces", Georgia, serif; font-size: 1.2rem; }
.ar-try { border-left: 3px solid var(--accent); padding: 4px 0 4px 16px; margin: 22px 0; }
.ar-other { margin: 30px 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.ar-other h2 { margin-top: 0; }
.ar-science { font-size: 0.82rem; color: var(--muted); line-height: 1.5; max-width: 44em; }
/* The paid reports (/attachment/report/, /attachment/couples/) and their offer box on the result page. */
.ar-offer { max-width: 680px; }
.ar-offers { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.ar-buy { display: block; padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); text-decoration: none; }
.ar-buy:hover { border-color: var(--accent); }
.ar-buy span { display: block; color: var(--muted); font-size: 0.92rem; margin: 6px 0 10px; line-height: 1.45; }
.ar-buy em { font-style: normal; font-weight: 700; color: var(--accent-deep); }
.ar-pair { margin: 0 0 24px; padding: 16px 20px; border-left: 3px solid var(--accent); background: var(--card); }
.ap-inside { text-align: left; max-width: 480px; margin: 18px auto; line-height: 1.55; }
.ap-you { color: var(--muted); }
.ap-price { font-size: 1.6rem; font-weight: 700; margin: 18px 0 10px; }
.ap-partner { text-align: left; max-width: 520px; margin: 20px auto; padding: 16px 20px; border: 1px solid var(--line); border-radius: 14px; }
.ap-row { display: flex; gap: 8px; }
.ap-row input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 16px; }
.ap-mini { padding: 10px 14px; border: 1px solid var(--accent); border-radius: 10px; background: none; color: var(--accent-deep); font-weight: 600; cursor: pointer; }
.ap-mail { margin: 14px 0; padding-top: 12px; border-top: 1px dashed var(--line); }
.ap-mail label { display: block; margin: 0 0 10px; font-size: .92rem; font-weight: 600; }
.ap-mail input { display: block; width: 100%; box-sizing: border-box; margin-top: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 16px; }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.ap-report h1 { margin-top: .2em; }
.ap-list, .ap-steps { line-height: 1.6; }
.ap-steps li { margin-bottom: 12px; }
.ap-steps p { margin: 4px 0 0; }
.ap-pair h3 { margin-bottom: 4px; }
/* The parent and partner versions: the box under the result and the side-by-side lines. */
.ar-rel { max-width: 680px; }
.ar-rel-box { margin: 30px 0; padding: 20px 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.ar-rel-box h2 { margin-top: 0; }
.ar-rel-links { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-ghost { background: none; color: var(--accent-deep); border: 2px solid var(--accent); }
.btn-ghost:hover { background: var(--accent); color: #fff; }
.ar-compare { margin: 10px 0 0; }
.ar-compare ul { padding-left: 1.1em; line-height: 1.6; }
.ar-compare li { margin-bottom: 10px; }
.ap-map-wrap { max-width: 680px; }
.ar-other + .rec { max-width: none; margin: 22px 0; }
/* The /go/ test's intro card (the intro arm of the start split). */
.quiz-start h2 { margin: .2em 0 .5em; }
.quiz-start p, .quiz-start li { line-height: 1.55; }
.quiz-start ul { padding-left: 1.2em; margin: 14px 0 22px; }
.quiz-start-small { font-size: 0.85rem; color: var(--muted); text-align: center; margin: 12px 0 0; }

/* The /go/ engage layer (js/attach_engage.js): time left, answer notes, fact cards, scoring step, the free levels. */
.eta { text-align: center; font-size: 0.8rem; color: var(--muted); margin: -4px 0 10px; min-height: 1em; }
.q-note { background: #efeaff; color: var(--accent-deep); border-radius: 12px; padding: 10px 14px; font-size: 0.92rem; margin: 0 0 14px; animation: q-in 0.35s ease-out; }
.q-mid { background: #fff4d6; color: var(--ink); border-radius: 12px; padding: 10px 14px; font-size: 0.92rem; margin: 0 0 14px; animation: q-in 0.35s ease-out; }
.q-fact { text-align: center; animation: q-in 0.35s ease-out; }
.q-fact h2 { font-size: 1.3rem; margin: 4px 0 10px; }
.q-fact p:not(.ar-k) { color: var(--ink); line-height: 1.55; margin-bottom: 18px; }
.q-analyze { text-align: center; }
.q-analyze ul { list-style: none; padding: 0; margin: 16px auto 0; text-align: left; max-width: 320px; }
.q-analyze li { padding: 8px 0 8px 30px; position: relative; color: var(--muted); transition: color 0.3s; }
.q-analyze li::before { content: ""; position: absolute; left: 0; top: 9px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); }
.q-analyze li.done { color: var(--ink); }
.q-analyze li.done::before { content: "\2713"; background: var(--angel); border-color: var(--angel); color: #fff; font-size: 12px; line-height: 18px; text-align: center; }
.q-spin { width: 38px; height: 38px; margin: 0 auto; border: 4px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: q-spin 0.9s linear infinite; }
.sample { display: flex; gap: 14px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin-bottom: 16px; text-align: left; }
.sample .sample-map { flex: 0 0 46%; max-width: 220px; margin: 0; }
.sample > div:last-child { flex: 1; min-width: 0; }
.sample-k { font-size: 0.72rem; letter-spacing: .08em; text-transform: uppercase; color: #8a6420; font-weight: 600; margin: 0 0 6px; }
.sample-cap { font-size: 0.86rem; line-height: 1.4; margin: 0; }
.sample-dot text { fill: #fff; font-size: 16px; font-weight: 700; }
.sample-dot.ask circle { fill: #8a6420; }
.skip-free { display: block; text-align: center; margin: 12px 0 0; font-size: 0.9rem; color: var(--muted); text-decoration: underline; }
.gate-get { text-align: left; margin: 14px 0 0; font-size: 0.9rem; }
.gate-get p { font-weight: 700; margin: 0 0 4px; }
.gate-get ul { margin: 0; padding-left: 1.2em; }
.gate-get li { margin: 2px 0; }
@media (max-width: 380px) { .sample-cap { font-size: 0.8rem; } }
@keyframes q-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes q-spin { to { transform: rotate(360deg); } }
/* The /go/ first screen (templates/go-attachment.html): no count or time left until the first answer, then the small line goes. */
.quiz-k { text-align: center; margin: 0 0 4px; }
.quiz.fresh .progress-label, .quiz.fresh .eta { display: none; }
.quiz-first { text-align: center; font-size: 0.85rem; color: var(--muted); margin: 12px 0 0; line-height: 1.45; }
.quiz:not(.fresh) .quiz-first, .quiz-first:empty { display: none; }
/* The opening question: big full-width buttons, so the first tap needs no reading. */
.quiz:has(#qualify) .progress { display: none; }
.qualify { padding: 22px 20px 16px; }
.qualify .q-text { text-align: center; margin-bottom: 16px; }
.qualify .opt { justify-content: center; min-height: 52px; font-weight: 600; font-size: 1.05rem; }
.qual-small { margin-top: 14px; text-align: center; font-size: 0.8rem; color: var(--muted); line-height: 1.4; }
.qual-small p { margin: 0 0 3px; }
/* What the test brings, below the opening question on /go/attachment/ (go.toml benefits): action before pitch. */
.benefits { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.benefits ul { list-style: none; margin: 0; padding: 0; }
.benefits li { position: relative; padding-left: 26px; margin: 0 0 7px; font-size: 0.98rem; line-height: 1.35; }
.benefits li::before { content: "\2713"; position: absolute; left: 0; color: var(--accent-deep); font-weight: 700; }
.benefit-proof { margin: 10px 0 0; font-size: 0.8rem; color: var(--muted); line-height: 1.4; }
/* Safari on an iPhone leaves 390x664: smaller lines and picture keep the three answers in sight. Under 600px tall (an old
   small iPhone, an in-app browser) the list goes, so the first tap stays above the fold (bud 2026-11-23). */
@media (max-width: 560px) and (max-height: 760px) {
  .quiz.fresh:has(.benefits) .quiz-hero { height: clamp(112px, 18svh, 240px); }
  .benefits { margin-top: 10px; padding-top: 10px; }
  .benefits li { font-size: 0.9rem; line-height: 1.3; margin-bottom: 4px; }
  .benefit-proof { margin-top: 6px; font-size: 0.75rem; }
}
@media (max-width: 560px) and (max-height: 600px) { .benefits { display: none; } }
/* A phone keeps :hover on whatever sits under the finger: after the opening tap that is a statement 1 button, which then looks picked. */
@media (hover: none) { #stage .opt:not(.selected):hover { border-color: var(--line); } }
/* Mobile: prompt above the first statement card to signal interactivity. Removed when .fresh is stripped on first tap. */
@media (hover: none) { .quiz.fresh #stage .q-card:first-child::before { content: "Tap any answer to begin"; display: block; text-align: center; color: var(--text-soft, #888); font-size: 0.82rem; letter-spacing: 0.03em; margin-bottom: 10px; } }
@media (max-width: 380px) { .qualify { padding: 16px 14px 12px; } .qualify .q-text { font-size: 1.25rem; margin-bottom: 12px; } .qualify .opt { min-height: 48px; padding: 10px 12px; } }
/* The /go/ hero (templates/go-attachment.html, js/attach_quiz.js): a wide picture in the cover look on every screen. The
   words sit on its dark top; the bar runs along its bottom edge. Short enough that the statement, all 7 answers and Back
   stay on an iPhone SE screen. The dark fill behind it shows until the picture lands. */
.quiz-hero { position: relative; margin: 0 0 14px; height: 180px; height: clamp(130px, 27svh, 240px); border-radius: 18px; overflow: hidden; background: #1d1226; box-shadow: var(--shadow); }
.quiz-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 68%; animation: hero-pop 0.9s ease-out; }
.quiz-hero img.pop { animation: hero-pop 0.6s ease-out; }
.hero-words { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0 12px; padding: 14px 18px 30px; background: linear-gradient(rgba(18, 10, 26, 0.5), rgba(18, 10, 26, 0)); color: #fff; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.8); animation: q-in 0.6s 0.15s ease-out both; }
.hero-words .quiz-k, .hero-words .quiz-h1 { flex-basis: 100%; }
.hero-words .quiz-k { color: #f3d79a; }
.hero-words .quiz-h1 { color: #fff; margin: 0; font-size: 1.55rem; }
.hero-words .progress-label, .hero-words .eta { color: #fff; margin: 0; font-size: 0.85rem; font-weight: 600; }
.quiz:not(.fresh) .quiz-k, .quiz:not(.fresh) .quiz-h1 { display: none; }
/* The first screen's picture is a little shorter, so the opening question and its proof line fit a 320x512 phone. */
.quiz.fresh .quiz-hero { height: clamp(112px, 22svh, 240px); }
.quiz.fresh .quiz-hero img { object-position: 50% 100%; }
.quiz-hero .progress { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; margin: 0; border-radius: 0; background: rgba(255, 255, 255, 0.25); }
.quiz-hero .progress > span { border-radius: 0 99px 99px 0; background: linear-gradient(90deg, var(--accent), #f3d79a); box-shadow: 0 0 10px rgba(243, 215, 154, 0.8); }
/* The tap is felt: the picked answer fills and pops, then the next statement slides in. The words move, not the card:
   a moving card made phone Safari scroll the page on the next tap. */
#hero ~ #stage .q-text { animation: q-next 0.35s ease-out; }
#hero ~ #stage .opt.selected { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; animation: opt-pop 0.28s ease-out; }
@keyframes q-next { from { opacity: 0; transform: translateX(14px); } }
@keyframes opt-pop { 45% { transform: scale(1.14); } }
@keyframes hero-pop { from { opacity: 0; transform: scale(1.08); } to { opacity: 1; transform: none; } }
@media (max-width: 560px) {
  .quiz:has(#hero) { margin-top: 0; }
  .quiz-hero { margin: 0 -18px 8px; border-radius: 0; box-shadow: none; }
  .hero-words .quiz-h1 { font-size: 1.4rem; }
  #hero ~ #stage .q-card { padding: 16px 16px 4px; }
  #hero ~ #stage .q-text { font-size: 1.3rem; margin-bottom: 14px; }
  #hero ~ #stage .q-note { margin-bottom: 10px; }
  #hero ~ #stage .q-nav { margin-top: 6px; }
  #hero ~ #stage .q-fact h2 { font-size: 1.2rem; margin-bottom: 8px; }
  #hero ~ #stage .q-fact p:not(.ar-k) { margin-bottom: 12px; line-height: 1.45; }
  /* A fact card has more words than a statement: its picture shrinks so "Keep going" stays on a short screen. */
  .quiz:has(#stage .q-fact) .quiz-hero { height: clamp(64px, 17svh, 200px); }
}
/* Two statements a page (go.toml per_page): a gap between the cards, and on a short phone a lower picture and smaller
   words, so both cards and Back stay on an iPhone SE screen. */
#stage .q-card + .q-card { margin-top: 10px; }
@media (max-width: 560px) and (max-height: 700px) {
  .quiz:has(#stage .q-card + .q-card) .quiz-hero { height: clamp(64px, 12svh, 200px); }
  #hero ~ #stage .q-card + .q-card, #hero ~ #stage .q-card:has(+ .q-card) { padding-top: 12px; }
  #hero ~ #stage:has(.q-card + .q-card) .q-text { font-size: 1.12rem; margin-bottom: 8px; }
}
@media (max-width: 560px) and (max-height: 520px) { #hero ~ #stage .q-fact p:not(.ar-k) { font-size: 0.94rem; margin-bottom: 8px; } }
@media (prefers-reduced-motion: reduce) { .quiz-hero img, .hero-words, #hero ~ #stage .q-text, #hero ~ #stage .opt.selected { animation: none; } }
