/* Would You Ship It? — built from the approved picture V2 (docs/nadya/toggle-wars-2026/screens-2026-11-21/V2.png).
   Mobile-first at 390 px; desktop = centered column up to 440 px. */

:root {
  /* The page background is this ONE property. Options are rendered in shots/bg-options.png. */
  --bg: #FEFAF5;          /* V2 cream, sampled from the picture */
  --card: #FFFFFF;

  --ink: #111111;
  --muted: #55575C;       /* secondary text; >= 4.5:1 on every --bg option */
  --hint: #55595D;
  --line: #141414;        /* outline buttons */
  --seg: rgba(40, 50, 75, 0.17);   /* idle progress segment: tinted by --bg, stays visible on any of them */
  --accent: #B35A3A;      /* terracotta: active segment + Share button (white text 4.7:1) */
  --accent-hover: #A14F32;
  --on-accent: #FFFFFF;

  --serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --gutter: 23px;
  --radius-btn: 12px;
  --radius-card: 14px;
  /* the upward part of each shadow shades the strip of the card behind it, as in the picture */
  --shadow-card: 0 14px 30px -10px rgba(70, 45, 20, 0.22), 0 2px 7px rgba(70, 45, 20, 0.07), 0 -4px 10px -3px rgba(70, 45, 20, 0.10);
  --shadow-back: 0 -4px 10px -3px rgba(70, 45, 20, 0.09), 0 1px 2px rgba(70, 45, 20, 0.06);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.no-scroll { overflow: hidden; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

button { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}
[tabindex="-1"]:focus { outline: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- layout ---------- */

.app {
  max-width: 440px;
  margin: 0 auto;
}

.screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 0 var(--gutter);
}
.screen[hidden] { display: none; }

/* ---------- type ---------- */

.title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 640;
  font-variation-settings: "opsz" 60;
  font-size: min(65.5px, 16.8vw);
  line-height: 1;
  letter-spacing: -0.01em;
}

/* ---------- buttons ---------- */

.btn {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  background: transparent;
  border: 2px solid var(--line);
  border-radius: var(--radius-btn);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 650;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.btn:hover { background: rgba(17, 17, 17, 0.045); }
.btn:active { transform: scale(0.985); }
.btn.is-picked { background: var(--ink); color: var(--bg); }

.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* ---------- 1. start ---------- */

.screen--start {
  text-align: center;
  padding-top: 111px;
  padding-bottom: 40px;
}
.screen--start .title { max-width: 344px; margin: 0 auto; }

.lead {
  max-width: 310px;          /* breaks after "Can you", as in the picture */
  margin: 32px auto 0;
  font-size: 22.75px;
  line-height: 30.5px;
}

.note {
  margin: 29px 0 0;
  font-size: 19px;
  line-height: 25.6px;
  color: var(--muted);
}

.ask {
  margin: 60px 0 0;
  font-size: 23.5px;
  font-weight: 700;
  line-height: 1.2;
}

.screen--start .pair {
  gap: 16px;
  margin-top: 39px;
}
.btn--start {
  height: 62px;
  font-size: 22.5px;
}

/* ---------- 2. card ---------- */

.screen--card { padding: 0; }

.progress {
  display: flex;
  align-items: center;
  padding: 31px var(--gutter) 0;
  min-height: 56px;
}
.segs {
  display: flex;
  gap: 4.5px;
  flex: 0 1 276px;
}
.seg {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--seg);
  transition: background-color 0.25s ease;
}
.seg.is-on { background: var(--accent); }
.count {
  margin: 0 0 0 auto;
  padding-left: 16px;
  font-family: var(--serif);
  font-variation-settings: "opsz" 32;
  font-weight: 500;
  font-size: 23px;
  line-height: 1;
  white-space: nowrap;
  word-spacing: -0.12em;
}

.middle {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 22px 0 28px;
}
/* The real screenshot is landscape, so the card is shorter than in the picture.
   Free height is split 1:2 above/below the card group; the part above is capped so the
   card stays close to the progress bar, as in the picture. */
.middle::before { content: ""; flex: 1 1 0; max-height: 64px; }
.middle::after { content: ""; flex: 2 1 0; }

.stack {
  position: relative;
  margin: 0 12px;
  padding-top: 25.5px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.stack::before,
.stack::after {
  content: "";
  position: absolute;
  height: 80px;
  background: var(--card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-back);
}
.stack::before { top: 0; left: 26px; right: 26px; }
.stack::after { top: 12.75px; left: 13px; right: 13px; }
.stack.is-leaving { opacity: 0; transform: translateY(-6px); }

.card {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  margin: 0;
  padding: 8px;               /* the screenshot has its own ~4 px white margin */
  background: var(--card);
  border: 0;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  cursor: zoom-in;
}
.card picture { display: block; }
.card img {
  display: block;
  width: 100%;
  height: auto;
}

.zoom-hint {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 17px 0 0;
  padding: 4px 8px;
  background: none;
  border: 0;
  border-radius: 8px;
  color: var(--hint);
  font-size: 16px;
  cursor: zoom-in;
}
.zoom-hint svg { flex: none; }

.call {
  margin: 23px var(--gutter) 0;
  text-align: center;
  font-family: var(--serif);
  font-variation-settings: "opsz" 32;
  font-weight: 600;
  font-size: min(24.5px, 6.3vw);
  line-height: 1.17;
  letter-spacing: -0.005em;
}

.answers {
  gap: 12px;
  padding: 0 11px calc(36px + env(safe-area-inset-bottom, 0px));
}
.btn--answer {
  min-height: 47.5px;
  padding: 6px 8px;
  font-size: min(18px, 4.7vw);
  line-height: 1.15;
}

/* Phone: the narrow capture is taller than the screen. The page scrolls naturally;
   question and answer buttons follow the card (not pinned), the progress stays at the top. */
@media (max-width: 699.98px) {
  .middle { flex: none; padding-bottom: 0; }
  .middle::before,
  .middle::after { display: none; }
  .answers { margin-top: 28px; }
}

/* ---------- 3. score ---------- */

.screen--score { text-align: center; }

.score-main {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 109px 0 48px;
}

.title--score {
  font-size: min(60.5px, 15.5vw);
  line-height: 1.04;          /* keeps the "g" of "got" clear of "right." */
}

.avg {
  margin: 23.5px 0 0;
  font-family: var(--serif);
  font-variation-settings: "opsz" 32;
  font-weight: 400;
  font-size: min(29px, 7.4vw);
  line-height: 1.2;
}

.explain {
  margin: 22px 0 0;
  font-size: 18.25px;
  line-height: 26px;
}
/* line break after "of the", as in the picture; only where the next line fits */
.brk { display: none; }
@media (min-width: 384px) {
  .brk { display: block; }
}

.share {
  display: block;
  width: calc(100% - 17px);
  min-height: 55.5px;
  margin: 52px auto 0;
  padding: 8px 16px;
  appearance: none;
  -webkit-appearance: none;
  background: var(--accent);
  color: var(--on-accent);
  border: 0;
  border-radius: 13px;
  font-family: var(--sans);
  font-size: 23px;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 0.15s ease, transform 0.1s ease;
}
.share:hover { background: var(--accent-hover); }
.share:active { transform: scale(0.99); }
.share[hidden] { display: none; } /* only when the score could not be loaded */

.share-fallback {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.4;
  color: var(--muted);
  word-break: break-word;
  user-select: all;
  -webkit-user-select: all;
}

.how-link {
  display: inline-block;
  margin-top: 24.5px;
  color: var(--ink);
  font-size: 18.25px;
  line-height: 1.3;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 5px;
  border-radius: 4px;
}

.how {
  text-align: left;
  padding: 40px 0 64px;
  border-top: 1px solid rgba(17, 17, 17, 0.12);
  scroll-margin-top: 16px;
}
.how-title {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-variation-settings: "opsz" 32;
  font-weight: 600;
  font-size: 26px;
  line-height: 1.2;
}
.how p {
  margin: 0 0 14px;
  font-size: 17px;
  line-height: 1.5;
}

/* ---------- zoom overlay ---------- */

.zoom {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(22, 20, 18, 0.94);
}
.zoom[hidden] { display: none; }

.zoom-scroll {
  position: absolute;
  inset: 0;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y pinch-zoom;
  padding: calc(72px + env(safe-area-inset-top, 0px)) 16px 32px;
}
.zoom-scroll img {
  display: block;
  width: max(880px, 100%);
  max-width: 2216px;
  height: auto;
  background: #fff;
  border-radius: 10px;
  cursor: zoom-out;
}
/* narrow capture: open at Flagsmith's own size (584 css px wide) */
.zoom.is-narrow .zoom-scroll img { width: max(584px, 100%); max-width: 1168px; }
.zoom.is-fit .zoom-scroll img { width: 100%; cursor: zoom-in; }
.zoom :focus-visible { outline-color: #fff; }

.zoom-close {
  position: fixed;
  top: calc(14px + env(safe-area-inset-top, 0px));
  right: 14px;
  z-index: 51;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  background: #fff;
  color: var(--ink);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  .stack, .seg, .btn, .share { transition: none; }
}
