:root {
  --navy: #12314C;
  --navy-deep: #0B1E31;
  --blue: #22598C;
  --silver: #A8B2BE;
  --silver-light: #C9D2DB;
  --paper: #F2F5F8;
  --hairline: #DCE3EA;
  --text: #14202E;
  --muted: #4A5868;
  --white: #FFFFFF;
  --good: #22598C;
  --radius: 16px;
  --serif: 'Merriweather', Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.55;
  overflow-x: hidden;
}
img, video { max-width: 100%; display: block; }
button, a.btn { font: inherit; }
[hidden] { display: none !important; }
[tabindex="-1"]:focus { outline: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.app { max-width: 560px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  background: var(--navy); color: var(--white);
}
.topbar img { width: 34px; height: 34px; object-fit: contain; filter: brightness(0) invert(1); }
.topbar .brand { font-family: var(--serif); font-size: 17px; flex: 1; white-space: nowrap; }
.topbar .progress { font-size: 14px; color: var(--silver-light); white-space: nowrap; }
.icon-btn {
  min-width: 44px; height: 44px; border-radius: 22px; border: 1px solid rgba(255,255,255,.35);
  background: transparent; color: var(--white); cursor: pointer; padding: 0 12px; font-size: 14px;
}
.icon-btn:focus-visible, .btn:focus-visible, .choice:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.progress-bar { height: 4px; background: var(--hairline); }
.progress-bar span { display: block; height: 100%; background: var(--blue); width: 0; transition: width .4s ease; }

main { flex: 1; padding: 0 0 32px; }
.screen { display: none; animation: fade .45s ease; }
.screen.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .screen { animation: none; } .progress-bar span { transition: none; } }

.pad { padding: 0 16px; }

/* Image frames: show a soft branded panel when an image is missing */
.frame {
  position: relative; width: 100%; aspect-ratio: 4 / 5; max-height: 52vh;
  background: linear-gradient(160deg, var(--silver-light), var(--paper) 55%, var(--hairline));
  overflow: hidden;
}
.frame img { width: 100%; height: 100%; object-fit: cover; transition: opacity .6s ease; }
.frame.missing img { opacity: 0; }
.frame.missing::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 72px; height: 72px; opacity: .22;
  background: url(../img/logo.png) center / contain no-repeat;
}
.frame.wide { aspect-ratio: 16 / 9; max-height: none; }
@media (max-width: 520px) { .frame.wide { aspect-ratio: 4 / 3; } }

/* Type */
h1, h2, h3 { font-family: var(--serif); color: var(--navy); font-weight: 700; line-height: 1.25; }
h1 { font-size: 30px; margin: 22px 0 8px; }
h2 { font-size: 24px; margin: 18px 0 6px; }
h3 { font-size: 19px; margin: 20px 0 8px; }
.eyebrow { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); margin: 18px 0 0; font-weight: 700; }
.lede { font-size: 19px; color: var(--muted); margin: 0 0 16px; }
.tagline { font-family: var(--serif); font-style: italic; color: var(--blue); font-size: 15px; }
.fine { font-size: 14px; color: var(--muted); }

.setup { font-size: 18px; margin: 10px 0 14px; }
.elder {
  border-left: 3px solid var(--silver); background: var(--white);
  padding: 12px 14px; border-radius: 0 12px 12px 0; margin: 0 0 18px;
}
.elder .who { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; display: block; margin-bottom: 4px; }
.elder p { margin: 4px 0; font-family: var(--serif); font-style: italic; color: var(--navy); font-size: 17px; }

.replay {
  background: none; border: none; color: var(--blue); cursor: pointer; padding: 10px 0; font-size: 15px;
  text-decoration: underline; text-underline-offset: 3px; min-height: 44px;
}

/* Choices */
.ask { font-family: var(--serif); color: var(--navy); font-size: 20px; margin: 6px 0 12px; }
.choices { display: grid; gap: 12px; }
.choice {
  display: flex; gap: 12px; align-items: flex-start; text-align: left; width: 100%;
  min-height: 64px; padding: 14px 16px; border-radius: var(--radius);
  background: var(--white); color: var(--text); border: 2px solid var(--hairline);
  cursor: pointer; font-size: 17px; line-height: 1.45;
  transition: border-color .2s, background .2s, transform .1s;
}
.choice:hover:not([disabled]) { border-color: var(--silver); }
.choice:active:not([disabled]) { transform: scale(.99); }
.choice .letter {
  flex: 0 0 32px; height: 32px; border-radius: 16px; display: grid; place-items: center;
  background: var(--paper); color: var(--navy); font-weight: 700; font-size: 15px; border: 1px solid var(--hairline);
}
.choice[disabled] { cursor: default; opacity: .6; }
.choice.picked { opacity: 1; border-color: var(--navy); }
.choice.best { opacity: 1; border-color: var(--blue); background: #EAF1F8; }
.choice.best .letter { background: var(--blue); color: var(--white); border-color: var(--blue); }
.badge { display: block; margin-top: 6px; font-size: 13px; font-weight: 700; color: var(--blue); letter-spacing: .04em; }

/* Feedback */
.feedback { scroll-margin-top: 72px; margin-top: 18px; background: var(--white); border-radius: var(--radius); padding: 16px; border: 1px solid var(--hairline); }
.feedback h3 { margin-top: 0; }
.feedback p { margin: 6px 0 12px; }
.feedback .gentler { border-top: 1px solid var(--hairline); padding-top: 12px; margin-top: 4px; }
.feedback .gentler strong { color: var(--blue); }

/* Buttons */
.btn {
  display: flex; align-items: center; justify-content: center; text-align: center;
  width: 100%; min-height: 56px; padding: 14px 20px; border-radius: 28px;
  background: var(--navy); color: var(--white); border: 2px solid var(--navy);
  font-size: 18px; font-weight: 700; cursor: pointer; text-decoration: none; margin: 18px 0 0;
}
.btn:hover { background: var(--navy-deep); }
.btn.secondary { background: var(--white); color: var(--navy); }
.btn.secondary:hover { background: var(--paper); }
.btn-row { display: grid; gap: 10px; }

/* Wrap-up and offer */
.ways { list-style: none; padding: 0; margin: 10px 0 0; counter-reset: w; }
.ways li { counter-increment: w; display: flex; gap: 12px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--hairline); font-size: 17px; }
.ways li::before { content: counter(w, decimal-leading-zero); font-family: var(--serif); color: var(--blue); font-weight: 700; min-width: 28px; }

.video-wrap { margin: 14px auto 0; max-width: 340px; border-radius: var(--radius); overflow: hidden; background: var(--navy-deep); aspect-ratio: 9 / 16; }
.video-wrap video { width: 100%; height: 100%; object-fit: contain; }

.offer-hero { background: var(--navy); color: var(--white); padding: 28px 16px 26px; text-align: center; }
.offer-hero img { width: 84px; height: 84px; object-fit: contain; margin: 0 auto 8px; filter: brightness(0) invert(1); }
.offer-hero h2 { color: var(--white); margin: 6px 0 6px; }
.offer-hero .tagline { color: var(--silver-light); margin: 0; }
.gift {
  margin: 20px 0 6px; padding: 18px 16px; border-radius: var(--radius);
  background: var(--white); border: 2px solid var(--silver-light);
}
.gift h3 { margin-top: 0; }
.gift .code { display: inline-block; font-weight: 700; letter-spacing: .06em; color: var(--navy); background: var(--paper); border: 1px dashed var(--silver); padding: 2px 10px; border-radius: 8px; }
.gift ul { padding-left: 20px; margin: 10px 0 0; }
.contact { text-align: center; margin-top: 14px; font-size: 17px; }
.contact a { color: var(--navy); font-weight: 700; text-decoration: none; display: block; padding: 8px 4px; min-height: 44px; }
.contact a:hover { text-decoration: underline; }

details.sources { margin-top: 22px; font-size: 14px; color: var(--muted); }
details.sources summary { cursor: pointer; padding: 10px 0; min-height: 44px; }
details.sources a { color: var(--blue); word-break: break-word; }
details.sources li { margin: 6px 0; }

footer.disclaimer { text-align: center; padding: 18px 16px 26px; font-size: 13px; color: var(--muted); }

.offer-body { margin-top: 20px; }
.more-games { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--hairline); }
.more-games h3 { margin-top: 0; }
.more-games ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.more-games a { color: var(--navy); font-weight: 700; }
