/* afford.dad-look.com - How long until you can afford the book? */
body { margin: 0; background: #1c1c1c; }
a { color: #ec6e6a; }
a:hover { color: #f39a96; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #6e9cf4; outline-offset: 2px; }

.af-page { box-sizing: border-box; background: #1c1c1c; color: #ffffff; font-family: Helvetica, Arial, sans-serif; padding: 32px 24px 64px; }
.af-wrap { max-width: 960px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.af-page h2 { margin: 0; font-size: 18px; font-weight: 800; text-transform: uppercase; }
.af-card { background: #2c2c2c; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.af-small { margin: 0; font-size: 13px; color: #b5b5b5; }
.af-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; }
.af-error { margin: 0; background: #1c1c1c; border: 2px solid #ec6e6a; color: #ec6e6a; font-weight: 700; padding: 12px 14px; }

/* Header */
.af-header { display: flex; flex-direction: column; gap: 10px; padding: 8px 0 8px; }
.af-kicker { font-size: 13px; font-weight: 700; letter-spacing: 0.12em; color: #b5b5b5; text-decoration: none; }
.af-kicker:hover { color: #ffffff; }
.af-title { margin: 0; font-size: 56px; line-height: 0.98; font-weight: 800; color: #ec6e6a; text-transform: uppercase; max-width: 820px; }
.af-intro { margin: 0; font-size: 19px; line-height: 1.45; color: #d0d0d0; max-width: 640px; }
.af-intro strong { color: #ffffff; }
.af-lead { margin: 0; font-size: 26px; line-height: 1.25; font-weight: 700; max-width: 760px; }
.af-big { margin: 0; font-size: 104px; line-height: 1; font-weight: 800; color: #ec6e6a; overflow-wrap: anywhere; }
.af-rest { margin: 0; font-size: 34px; font-weight: 800; color: #ec6e6a; }
.af-ending { margin: 0; font-size: 26px; font-weight: 700; }

/* Calculator */
.af-form { display: flex; flex-direction: column; gap: 14px; }
.af-input-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0 12px; background: #1c1c1c; padding: 8px 8px 8px 18px; }
.af-dollar { font-size: 30px; font-weight: 800; color: #b5b5b5; }
.af-input { flex: 1 1 140px; min-width: 0; background: transparent; border: 0; color: #ffffff; font: inherit; font-size: 32px; font-weight: 800; padding: 10px 0; }
.af-input::placeholder { color: #5a5a5a; }
.af-input:focus { outline: none; }
.af-input-row:focus-within { box-shadow: 0 0 0 3px #6e9cf4; }
.af-per { font-size: 18px; color: #b5b5b5; }
.af-button { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; background: #ec6e6a; color: #1c1c1c; border: 0; font: inherit; font-size: 17px; font-weight: 800; text-transform: uppercase; text-decoration: none; padding: 14px 22px; min-height: 52px; cursor: pointer; }
.af-button:hover { background: #f39a96; color: #1c1c1c; }
.af-button-dark { background: #ffffff; }
.af-button-dark:hover { background: #e6e6e6; }
.af-button-ghost { background: transparent; color: #ffffff; box-shadow: inset 0 0 0 2px #5a5a5a; }
.af-button-ghost:hover { background: #3a3a3a; color: #ffffff; }
.af-presets-label { margin: 6px 0 0; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; color: #b5b5b5; text-transform: uppercase; }
.af-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.af-preset { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; background: #1c1c1c; color: #ffffff; border: 0; box-shadow: inset 0 0 0 1px #444444; font: inherit; text-align: left; padding: 12px 14px; min-height: 64px; cursor: pointer; }
.af-preset strong { font-size: 16px; }
.af-preset span { font-size: 13px; color: #b5b5b5; }
.af-preset:hover { box-shadow: inset 0 0 0 2px #ec6e6a; }

/* Share */
.af-share-grid { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.af-share-image { flex: 1 1 260px; max-width: 360px; width: 100%; height: auto; display: block; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5); }
.af-share-actions { flex: 1 1 260px; display: flex; flex-direction: column; gap: 10px; }
.af-share-actions p { margin: 0; color: #d0d0d0; font-size: 15px; line-height: 1.45; }
.af-copied { min-height: 1.2em; color: #9dffb5; font-weight: 700; }

/* Hall of shame */
.af-shame-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.af-shame-list li { display: flex; align-items: center; gap: 14px; background: #1c1c1c; padding: 12px 14px; }
.af-shame-rank { flex: 0 0 auto; width: 28px; font-size: 18px; font-weight: 800; color: #5a5a5a; }
.af-shame-list li:first-child .af-shame-rank { color: #ec6e6a; }
.af-shame-list a { flex: 1 1 auto; min-width: 0; color: #ffffff; font-weight: 700; text-decoration: none; }
.af-shame-list a:hover { color: #ec6e6a; }
.af-shame-time { flex: 0 0 auto; font-weight: 800; color: #ec6e6a; text-align: right; }

/* Call to action */
.af-cta { background: #ec6e6a; color: #1c1c1c; padding: 48px 24px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.af-page .af-cta h2 { font-size: 34px; line-height: 1.05; }
.af-cta p { margin: 0; font-size: 17px; font-weight: 700; }
.af-cta-button { display: inline-flex; align-items: center; justify-content: center; gap: 14px; box-sizing: border-box; width: 100%; max-width: 640px; min-height: 84px; padding: 22px 32px; background: #1c1c1c; color: #ffffff; font-size: 26px; font-weight: 800; text-transform: uppercase; text-decoration: none; }
.af-cta-button:hover { color: #ffffff; background: #000000; }
.af-cta-button:focus-visible { outline-color: #1c1c1c; outline-offset: 4px; }
.af-cta-arrow { display: inline-block; }

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

@media (max-width: 600px) {
	.af-page { padding: 24px 16px 48px; }
	.af-title { font-size: 38px; }
	.af-lead, .af-ending { font-size: 20px; }
	.af-big { font-size: 64px; }
	.af-rest { font-size: 24px; }
	.af-input-row .af-button { width: 100%; margin-top: 8px; }
	.af-share-image { max-width: none; }
	.af-cta { padding: 36px 16px; }
	.af-page .af-cta h2 { font-size: 26px; }
	.af-cta-button { font-size: 19px; min-height: 72px; padding: 18px 20px; }
}

/* Animations - only with JavaScript and when the visitor allows motion */
@media (prefers-reduced-motion: no-preference) {
	.js .af-header > * { animation: af-rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
	.js .af-header > *:nth-child(2) { animation-delay: 0.1s; }
	.js .af-header > *:nth-child(3) { animation-delay: 0.25s; }
	.js .af-header > *:nth-child(4) { animation-delay: 0.45s; }
	.js .af-header > *:nth-child(5) { animation-delay: 0.65s; }
	.js .af-big { animation: af-slam 0.7s 0.25s cubic-bezier(0.2, 0.8, 0.2, 1.4) both; }

	.js .reveal { opacity: 0; transform: translateY(28px); 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 .af-shame-list li { opacity: 0; transform: translateX(-16px); transition: opacity 0.4s ease, transform 0.4s ease; transition-delay: calc(0.15s + var(--d, 0) * 70ms); }
	.js .is-in .af-shame-list li { opacity: 1; transform: none; }

	.af-preset { transition: transform 0.15s ease, box-shadow 0.15s ease; }
	.af-preset:hover { transform: translateY(-3px); }
	.af-button, .af-preset { transition: transform 0.12s ease, background-color 0.2s ease; }
	.af-button:active, .af-preset:active { transform: scale(0.97); }
	.af-button.is-calculating { animation: af-pulse 0.6s ease-in-out infinite; }
	.af-share-image { animation: af-tilt-in 0.8s 0.3s cubic-bezier(0.2, 0.8, 0.2, 1.2) both; }

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

@keyframes af-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes af-slam { from { opacity: 0; transform: scale(1.6); } to { opacity: 1; transform: none; } }
@keyframes af-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
@keyframes af-tilt-in { from { opacity: 0; transform: rotate(-6deg) translateY(24px); } to { opacity: 1; transform: rotate(-1.5deg); } }
@keyframes af-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(28, 28, 28, 0.45); } 50% { box-shadow: 0 0 0 12px rgba(28, 28, 28, 0); } }
@keyframes af-nudge { 0%, 100% { transform: none; } 50% { transform: translateX(8px); } }
