/* suggest.dad-look.com - What should you read next? */
body { margin: 0; background: #f6f0e4; }
[hidden] { display: none !important; }
a { color: #b8403c; }
a:hover { color: #1c1c1c; }
button:focus-visible, a:focus-visible, .sg-answer input:focus-visible + span { outline: 3px solid #2f6fb8; outline-offset: 2px; }

.sg-page { box-sizing: border-box; min-height: 100vh; color: #1c1c1c; font-family: Helvetica, Arial, sans-serif; padding: 24px 24px 64px; }
.sg-wrap { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.sg-page h2 { margin: 0; font-size: 14px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: #6b6358; }
.sg-card { background: #ffffff; border: 1px solid #e3d9c6; border-radius: 14px; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.sg-small { margin: 0; font-size: 14px; color: #6b6358; }
.sg-error { margin: 0; background: #ffffff; border: 2px solid #d95450; color: #b8403c; font-weight: 700; padding: 12px 14px; border-radius: 10px; }

/* Header */
.sg-kicker { font-size: 13px; font-weight: 700; letter-spacing: 0.12em; color: #6b6358; text-decoration: none; }
.sg-kicker:hover { color: #1c1c1c; }
.sg-intro { display: flex; flex-direction: column; gap: 10px; }
.sg-title { margin: 0; font-size: 52px; line-height: 1; font-weight: 800; letter-spacing: -0.02em; }
.sg-intro p { margin: 0; font-size: 19px; color: #4a443c; }

/* Buttons */
.sg-button { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; align-self: flex-start; background: #d95450; color: #ffffff; border: 0; border-radius: 999px; font: inherit; font-size: 16px; font-weight: 800; text-decoration: none; padding: 14px 24px; min-height: 50px; cursor: pointer; }
.sg-button:hover { background: #b8403c; color: #ffffff; }
.sg-button-dark { background: #1c1c1c; }
.sg-button-dark:hover { background: #000000; }
.sg-button-ghost { background: transparent; color: #1c1c1c; box-shadow: inset 0 0 0 2px #1c1c1c; }
.sg-button-ghost:hover { background: #1c1c1c; color: #ffffff; }

/* Quiz */
.sg-quiz { display: flex; flex-direction: column; gap: 28px; }
.sg-progress { display: none; height: 6px; border-radius: 999px; background: #e3d9c6; overflow: hidden; }
.sg-progress span { display: block; height: 100%; width: 0; background: #d95450; transition: width 0.4s ease; }
.sg-question { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.sg-question legend { padding: 0; margin-bottom: 14px; display: flex; flex-direction: column; gap: 6px; }
.sg-step { font-size: 13px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: #d95450; }
.sg-question-text { font-size: 30px; line-height: 1.15; font-weight: 800; }
.sg-answers { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.sg-answer { position: relative; display: block; cursor: pointer; }
.sg-answer input { position: absolute; opacity: 0; pointer-events: none; }
.sg-answer span { display: flex; align-items: center; min-height: 64px; box-sizing: border-box; padding: 16px 18px; background: #ffffff; border: 2px solid #e3d9c6; border-radius: 12px; font-size: 17px; font-weight: 700; }
.sg-answer:hover span { border-color: #1c1c1c; }
.sg-answer input:checked + span { background: #1c1c1c; border-color: #1c1c1c; color: #ffffff; }
.sg-back { align-self: flex-start; background: none; border: 0; padding: 8px 0; font: inherit; font-size: 15px; font-weight: 700; color: #6b6358; cursor: pointer; display: none; }
.sg-back:hover { color: #1c1c1c; }

/* One question at a time when JavaScript runs */
.js .sg-progress { display: block; }
.js .sg-question { display: none; }
.js .sg-question.is-active { display: flex; }
.js .sg-back { display: inline-block; }
.js .sg-submit { display: none; }

/* Fake loading screen */
.sg-loading { display: flex; flex-direction: column; align-items: center; gap: 24px; padding: 40px 0; text-align: center; }
.sg-loading[hidden] { display: none; }
.sg-loading-book { position: relative; width: 90px; height: 64px; perspective: 400px; }
.sg-loading-book span { position: absolute; top: 0; left: 45px; width: 45px; height: 64px; background: #1c1c1c; border-radius: 0 4px 4px 0; transform-origin: left center; }
.sg-loading-book span:nth-child(2) { background: #e0b03a; }
.sg-loading-book span:nth-child(3) { background: #d95450; }
.sg-loading-steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; min-height: 240px; }
.sg-loading-steps li { font-size: 19px; font-weight: 700; color: #4a443c; opacity: 0; transform: translateY(8px); transition: opacity 0.3s ease, transform 0.3s ease; }
.sg-loading-steps li.is-shown { opacity: 1; transform: none; }
.sg-loading-steps li.is-done { color: #9a917f; text-decoration: line-through; text-decoration-thickness: 2px; }
.sg-loading-steps li.is-final { color: #d95450; font-size: 24px; font-weight: 800; }
.sg-loading-bar { width: 100%; max-width: 420px; height: 10px; border-radius: 999px; background: #e3d9c6; overflow: hidden; }
.sg-loading-bar span { display: block; height: 100%; width: 0; background: #1c1c1c; transition: width 0.6s ease; }

/* Result */
.sg-result { display: flex; flex-direction: column; gap: 18px; }
.sg-result-label { margin: 0; font-size: 15px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: #d95450; }
.sg-result-book { display: flex; flex-wrap: wrap; align-items: center; gap: 32px; }
.sg-result-text { flex: 1 1 280px; display: flex; flex-direction: column; gap: 10px; }
.sg-book-title { margin: 0; font-size: 44px; line-height: 1.02; font-weight: 800; letter-spacing: -0.02em; }
.sg-match { margin: 4px 0; font-size: 22px; font-weight: 800; text-transform: uppercase; color: #6b6358; }
.sg-match-value { font-size: 64px; color: #d95450; letter-spacing: -0.02em; margin-right: 6px; }

/* The cover, rebuilt from the real book */
.sg-cover { position: relative; flex: 0 0 auto; width: 220px; aspect-ratio: 2 / 2.9; box-sizing: border-box; padding: 34% 12% 0 20%; background: #161616; border-radius: 3px 8px 8px 3px; box-shadow: inset 8px 0 0 #0b0b0b, inset 10px 0 0 #2a2a2a, 14px 18px 30px rgba(0, 0, 0, 0.28); }
.sg-cover-title { display: block; color: #e0b03a; font-size: 21px; line-height: 1.12; font-weight: 800; letter-spacing: 0.01em; }
.sg-cover-author { position: absolute; right: 8%; bottom: 5%; color: #f2f2f2; font-size: 8px; }

/* Reasons */
.sg-reasons { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; counter-reset: reason; }
.sg-reasons li { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 14px 52px; position: relative; background: #f6f0e4; border-radius: 10px; }
.sg-reasons li::before { counter-increment: reason; content: counter(reason); position: absolute; left: 16px; top: 14px; width: 24px; height: 24px; border-radius: 50%; background: #1c1c1c; color: #ffffff; font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.sg-said { font-size: 13px; color: #6b6358; }
.sg-reasons strong { font-size: 18px; line-height: 1.35; }

/* Share */
.sg-share-grid { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.sg-share-image { flex: 1 1 220px; max-width: 300px; width: 100%; height: auto; display: block; border-radius: 6px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18); }
.sg-share-actions { flex: 1 1 240px; display: flex; flex-direction: column; gap: 10px; }
.sg-share-actions p { margin: 0; font-size: 15px; color: #4a443c; }
.sg-share-actions .sg-button { align-self: stretch; }
.sg-status { min-height: 1.2em; font-weight: 700; color: #2f6f3a; }

/* Stats */
.sg-stat { display: flex; flex-direction: column; gap: 8px; }
.sg-stat h3 { margin: 6px 0 0; font-size: 16px; }
.sg-stat-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(60px, 1fr) 44px; align-items: center; gap: 12px; font-size: 14px; }
.sg-stat-label { color: #4a443c; }
.sg-stat-label em { font-style: normal; font-weight: 800; color: #d95450; }
.sg-stat-bar { height: 10px; border-radius: 999px; background: #f0e8d8; overflow: hidden; }
.sg-stat-bar span { display: block; height: 100%; background: #9a917f; border-radius: 999px; }
.sg-stat-row.is-yours .sg-stat-bar span { background: #d95450; }
.sg-stat-percent { text-align: right; font-weight: 800; }

/* Call to action */
.sg-cta { background: #1c1c1c; color: #f6f0e4; border-radius: 18px; padding: 44px 24px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.sg-page .sg-cta h2 { font-size: 30px; line-height: 1.1; letter-spacing: 0; text-transform: none; color: #ffffff; }
.sg-cta p { margin: 0; font-size: 17px; font-weight: 700; color: #e0d6c2; }
.sg-cta-button { display: inline-flex; align-items: center; justify-content: center; gap: 14px; box-sizing: border-box; width: 100%; max-width: 560px; min-height: 80px; padding: 20px 28px; border-radius: 999px; background: #e0b03a; color: #1c1c1c; font-size: 24px; font-weight: 800; text-transform: uppercase; text-decoration: none; }
.sg-cta-button:hover { background: #f0c75a; color: #1c1c1c; }
.sg-cta-button:focus-visible { outline-color: #e0b03a; outline-offset: 4px; }
.sg-cta-arrow { display: inline-block; }

/* Footer */
.sg-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 13px; color: #6b6358; }

@media (max-width: 600px) {
	.sg-page { padding: 18px 16px 48px; }
	.sg-title { font-size: 38px; }
	.sg-question-text { font-size: 25px; }
	.sg-result-book { gap: 20px; }
	.sg-cover { width: 170px; }
	.sg-cover-title { font-size: 16px; }
	.sg-cover-author { font-size: 6px; }
	.sg-book-title { font-size: 34px; }
	.sg-match-value { font-size: 52px; }
	.sg-share-image { max-width: none; }
	.sg-stat-row { grid-template-columns: minmax(0, 1fr) 60px 40px; }
	.sg-page .sg-cta h2 { font-size: 24px; }
	.sg-cta-button { font-size: 19px; min-height: 70px; }
}

/* Animations - only with JavaScript and when the visitor allows motion */
@media (prefers-reduced-motion: no-preference) {
	.js .sg-intro > *, .js .sg-header { animation: sg-rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
	.js .sg-intro > *:nth-child(2) { animation-delay: 0.1s; }
	.js .sg-question.is-active { animation: sg-slide 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
	.js .sg-question.is-active.is-back { animation-name: sg-slide-back; }
	.js .sg-question.is-active .sg-answer { animation: sg-rise 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
	.js .sg-question.is-active .sg-answer:nth-child(2) { animation-delay: 0.05s; }
	.js .sg-question.is-active .sg-answer:nth-child(3) { animation-delay: 0.1s; }
	.js .sg-question.is-active .sg-answer:nth-child(4) { animation-delay: 0.15s; }
	.sg-answer span { transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease; }
	.sg-answer:hover span { transform: translateY(-2px); }
	.sg-answer input:checked + span { animation: sg-pick 0.3s ease; }

	.sg-loading-book span { animation: sg-flip 1.2s ease-in-out infinite; }
	.sg-loading-book span:nth-child(2) { animation-delay: 0.2s; }
	.sg-loading-book span:nth-child(3) { animation-delay: 0.4s; }
	.sg-loading-steps li.is-final.is-shown { animation: sg-stamp 0.5s cubic-bezier(0.2, 0.8, 0.2, 1.6); }

	.js .sg-result-label, .js .sg-result-text > * { animation: sg-rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
	.js .sg-result-text > *:nth-child(1) { animation-delay: 0.5s; }
	.js .sg-result-text > *:nth-child(2) { animation-delay: 0.7s; }
	.js .sg-result-text > *:nth-child(n+3) { animation-delay: 1s; }
	.js .sg-cover { animation: sg-drop 0.9s cubic-bezier(0.2, 0.8, 0.2, 1.2) both; }
	.sg-cover { transition: transform 0.4s ease; }
	.sg-cover:hover { transform: perspective(800px) rotateY(-14deg) rotateX(4deg); }

	.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
	.js .reveal.is-in { opacity: 1; transform: none; }
	.js .sg-reasons li { opacity: 0; transform: translateX(-16px); transition: opacity 0.45s ease, transform 0.45s ease; transition-delay: calc(0.15s + var(--d, 0) * 150ms); }
	.js .is-in .sg-reasons li { opacity: 1; transform: none; }
	.js .sg-stat-bar span { transform: scaleX(0); transform-origin: left; transition: transform 1s 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
	.js .is-in .sg-stat-bar span { transform: scaleX(1); }

	.sg-button { transition: transform 0.12s ease, background-color 0.2s ease, color 0.2s ease; }
	.sg-button:active { transform: scale(0.96); }
	.sg-cta-button { animation: sg-glow 2.2s ease-in-out infinite; transition: transform 0.15s ease; }
	.sg-cta-button:hover { transform: scale(1.03); }
	.sg-cta-arrow { animation: sg-nudge 1.1s ease-in-out infinite; }
}

@keyframes sg-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes sg-slide { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes sg-slide-back { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: none; } }
@keyframes sg-pick { 0% { transform: scale(1); } 40% { transform: scale(1.04); } 100% { transform: scale(1); } }
@keyframes sg-flip { 0%, 15% { transform: rotateY(0); } 50%, 65% { transform: rotateY(-180deg); } 100% { transform: rotateY(-180deg); } }
@keyframes sg-stamp { 0% { transform: scale(1.6); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes sg-drop { 0% { opacity: 0; transform: translateY(-60px) rotate(-8deg); } 70% { transform: translateY(6px) rotate(1deg); } 100% { opacity: 1; transform: none; } }
@keyframes sg-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(224, 176, 58, 0.5); } 50% { box-shadow: 0 0 0 12px rgba(224, 176, 58, 0); } }
@keyframes sg-nudge { 0%, 100% { transform: none; } 50% { transform: translateX(8px); } }
