/* Layout: america.gov. Grey rounded stage, serif greeting, picture card with a words-only call bar (green answer, red end). Features: light tile holding one neat example card, beside a short sans heading and two sharp sentences. A closing serif pitch replaces the footer links. Mobile first, light only. */
:root {
  color-scheme: light;
  --paper: #ffffff;
  --stage: #f3f3f2;
  --stage-2: #e8e8e9;
  --tile: #f1f2f4;
  --ink: #000c1f;
  --ink-2: rgba(0, 12, 31, .62);
  --ink-3: rgba(0, 12, 31, .60);
  --line: rgba(0, 12, 31, .10);
  --line-strong: rgba(0, 12, 31, .50);
  --chip: rgba(0, 38, 100, .06);
  --navy: #002664;
  --navy-dark: #00163b;
  --link: #004ac3;
  --red: #d80007;
  --answer: #1f9d55;
  --answer-dark: #178446;
  --decline: #e5352b;
  --decline-dark: #c42820;
  --on-ink: #ffffff;
  --shadow: 0 2px 6px rgba(0, 12, 31, .06), 0 30px 70px rgba(0, 12, 31, .16);
  --card-shadow: 0 1px 2px rgba(0, 12, 31, .05), 0 12px 32px rgba(0, 12, 31, .08);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font-display: "Newsreader", "Iowan Old Style", "Times New Roman", serif;
  --font-body: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  background: var(--paper); color: var(--ink);
  font: 400 16px/1.55 var(--font-body); letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
.gutter { padding-left: max(8px, env(safe-area-inset-left, 0px)); padding-right: max(8px, env(safe-area-inset-right, 0px)); }
.wrap {
  width: 100%; max-width: 1200px; margin: 0 auto;
  padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px));
}
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: var(--ink); }
:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; border-radius: 10px; }
.serif { font-family: var(--font-display); font-weight: 400; letter-spacing: -.04em; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes popIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }

/* Notice line */
.notice { text-align: center; font-size: 12px; color: var(--ink-2); padding: 12px 16px; }
.notice span { display: inline-flex; align-items: center; gap: 6px; }
.notice svg { width: 14px; height: 14px; }

/* Stage */
.stage {
  position: relative; max-width: 1440px; margin: 0 auto; border-radius: 40px; overflow: hidden;
  background: radial-gradient(120% 70% at 50% 0%, var(--stage) 50%, var(--stage-2) 100%);
  padding: 20px 0 32px;
}
.top { display: flex; align-items: center; justify-content: space-between; padding: 8px 16px 0 20px; }
.mark { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font-family: var(--font-display); font-size: 25px; font-weight: 500; letter-spacing: -.035em; }

.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px;
  background: var(--navy); color: var(--on-ink); font: 600 15px var(--font-body); text-decoration: none; border: 0; cursor: pointer;
}
.pill:hover { background: var(--navy-dark); }
.greet { text-align: center; padding: 72px 24px 44px; display: grid; gap: 16px; justify-items: center; }
.greet h1 { font-size: clamp(46px, 7.4vw, 96px); line-height: 1; }
.greet p { font-size: clamp(18px, 1.5vw, 20px); color: var(--ink-2); letter-spacing: -.015em; max-width: 17em; }

/* Picture card */
.cardwrap { padding: 0 4px; }
.card {
  position: relative; margin: 0 auto; max-width: 690px; border-radius: 36px; overflow: hidden;
  box-shadow: var(--shadow); background: #cfd6dc; aspect-ratio: 3 / 4;
}
.card canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* Call bar: words and one button. Used in the card and in the floating dock. */
.callbar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 10px 10px 24px; background: var(--paper);
  border: 1.5px solid var(--line-strong); border-radius: 999px;
  transition: border-color .35s var(--ease);
}
.callbar[data-state="live"] { border-color: var(--decline); }
.words { flex: 1; min-width: 0; display: grid; gap: 1px; }
.words.swap { animation: fadeUp .35s var(--ease); }
.l1 { font-weight: 600; font-size: 16px; letter-spacing: -.02em; display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.l1 .pip { width: 7px; height: 7px; border-radius: 50%; background: var(--decline); animation: blink 1.4s ease-in-out infinite; }
.l2 { font-size: 14px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cbtn {
  flex: none; height: 54px; padding: 0 22px 0 18px; gap: 8px; border-radius: 999px; font: 600 16px var(--font-body); white-space: nowrap; border: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  color: #fff; background: var(--answer); touch-action: manipulation;
  transition: background-color .35s var(--ease);
}
.cbtn:hover { background: var(--answer-dark); }
.cbtn svg { width: 24px; height: 24px; transition: transform .35s var(--ease); }
.cbtn.end { background: var(--decline); }
.cbtn.end:hover { background: var(--decline-dark); }
.cbtn.end svg { transform: rotate(135deg); }

.caption {
  position: absolute; left: 10px; right: 10px; bottom: 10px; padding: 14px 18px; border-radius: 22px;
  background: rgba(255, 255, 255, .95); backdrop-filter: blur(8px); font-size: 16px; line-height: 1.4; display: grid; gap: 3px;
  opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.caption.on { opacity: 1; transform: none; }
.caption .who { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
#cap-text.swap { animation: fadeUp .3s var(--ease); }
.hint { text-align: center; font-size: 13px; color: var(--ink-2); padding: 20px 24px 0; display: flex; gap: 8px; justify-content: center; align-items: center; }
.hint svg { width: 16px; height: 16px; flex: none; }

/* Rating sheet: sits in the card, or slides up from the bottom when the card is off screen */
.sheet {
  background: var(--paper); border-radius: 28px; padding: 26px 22px 22px; box-shadow: var(--card-shadow);
  display: flex; flex-direction: column; gap: 16px; overflow: auto; animation: popIn .4s var(--ease);
}
.card .sheet { position: absolute; left: 10px; right: 10px; top: 10px; bottom: 10px; }
.sheet h2 { font-family: var(--font-display); font-weight: 400; font-size: 30px; line-height: 1.05; letter-spacing: -.035em; }
.sheet .sub { font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; margin-top: 6px; }
.seven { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.seven input { position: absolute; opacity: 0; pointer-events: none; }
.seven label { height: 46px; display: grid; place-items: center; border-radius: 12px; background: var(--chip); cursor: pointer; font-size: 16px; font-variant-numeric: tabular-nums; transition: background-color .15s, color .15s; }
.seven label:hover { background: rgba(0, 38, 100, .11); }
.seven input:checked + label { background: var(--navy); color: var(--on-ink); }
.seven input:focus-visible + label { outline: 3px solid var(--link); outline-offset: 2px; }
@media (max-width: 639px) { .seven { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); margin-top: -8px; }
.sheet textarea { flex: 1; min-height: 64px; width: 100%; padding: 14px 16px; border: 0; border-radius: 16px; font: inherit; font-size: 16px; color: var(--ink); background: var(--chip); resize: none; }
.sheet textarea::placeholder { color: var(--ink-3); }
.acts { display: flex; gap: 10px; align-items: center; justify-content: flex-end; }
.acts .pill { min-width: 120px; }
.acts.center { justify-content: center; }
.quiet { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink-2); font: 500 15px var(--font-body); cursor: pointer; }
.quiet:hover { color: var(--ink); border-color: var(--line-strong); }
.err { font-size: 13px; color: var(--red); min-height: 1.2em; margin-top: -8px; }
.sheet.done { justify-content: center; align-items: center; text-align: center; }
.sheet.done h2 { font-size: 40px; }
.host {
  position: fixed; z-index: 11; left: 50%; transform: translateX(-50%);
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  width: min(480px, calc(100% - 20px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
}
.host .sheet { box-shadow: 0 10px 50px rgba(0, 12, 31, .22); max-height: calc(100vh - 40px); }
.host textarea { flex: none; }

/* Floating call dock, shown once the card scrolls away */
.dock {
  position: fixed; z-index: 10; left: 50%; transform: translate(-50%, 0);
  bottom: calc(40px + env(safe-area-inset-bottom, 0px));
  width: min(560px, calc(100% - 32px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
  padding: 8px 8px 8px 28px;
  box-shadow: 0 10px 40px rgba(0, 12, 31, .16);
  transition: transform .4s var(--ease), opacity .3s var(--ease), border-color .35s var(--ease);
}
.dock.away { transform: translate(-50%, 160%); opacity: 0; pointer-events: none; }
.dock .l2 { display: none; }
.dock .l1 { display: block; font-weight: 500; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock .l1 .pip { display: inline-block; margin-right: 8px; vertical-align: 1px; }
.dock .cbtn { height: 48px; padding: 0 18px 0 14px; font-size: 15px; }
.dock .cbtn svg { width: 22px; height: 22px; }

/* Features */
.features { padding-top: 56px; }
.feature { display: grid; gap: 28px; padding-block: 56px; max-width: 440px; margin: 0 auto; }
.feature .txt { display: grid; gap: 16px; align-content: center; }
.feature h2 { font: 500 30px/1.12 var(--font-body); letter-spacing: -.035em; }
.feature .txt p { color: var(--ink-2); font-size: 17px; line-height: 1.55; letter-spacing: -.01em; max-width: 21em; }

.tile { position: relative; aspect-ratio: 1; border-radius: 36px; width: 100%; background: var(--tile); container-type: inline-size; display: grid; place-items: center; padding: 8%; }
.c { width: 100%; background: var(--paper); border-radius: 5cqw; box-shadow: var(--card-shadow); padding: 5cqw; font-size: 3.8cqw; line-height: 1.35; }
.c h4 { margin: 0 0 3cqw; font-size: 3.4cqw; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.c .sub { color: var(--ink-2); font-size: 3.3cqw; }
.stackc { display: grid; gap: 3.4cqw; width: 100%; }

.leads > div { display: flex; align-items: center; justify-content: space-between; gap: 3cqw; padding: 2.9cqw 0; border-top: 1px solid var(--line); }
.leads > div:first-of-type { border-top: 0; padding-top: 0; }
.leads > div:last-child { padding-bottom: 0; }
.leads b { display: block; font-size: 4cqw; font-weight: 600; letter-spacing: -.02em; }
.badge { font-weight: 600; font-size: 3.2cqw; padding: 1.5cqw 3cqw; border-radius: 99px; background: var(--chip); white-space: nowrap; }
.badge.hot { background: rgba(31, 157, 85, .12); color: var(--answer-dark); }
.badge.ok { background: rgba(0, 74, 195, .10); color: var(--link); }

.price { font-size: 8.6cqw; font-weight: 500; letter-spacing: -.04em; line-height: 1.05; font-variant-numeric: tabular-nums; margin: 1cqw 0 1.4cqw; }
.kind { display: flex; justify-content: space-between; align-items: baseline; gap: 2cqw; }
.kind .tag { font-size: 3cqw; font-weight: 600; color: var(--link); background: rgba(0, 74, 195, .08); padding: 1cqw 2.4cqw; border-radius: 99px; }

.toggle { display: grid; gap: 3cqw; width: 100%; }
.opt { display: flex; align-items: center; gap: 3.6cqw; padding: 5cqw; border-radius: 5cqw; background: var(--paper); box-shadow: var(--card-shadow); font-size: 4.4cqw; font-weight: 500; }
.opt.on { box-shadow: inset 0 0 0 .6cqw var(--navy), var(--card-shadow); font-weight: 600; }
.opt .dot { width: 5cqw; height: 5cqw; border-radius: 50%; border: .4cqw solid var(--line-strong); flex: none; }
.opt.on .dot { border: 1.5cqw solid var(--navy); }
.opt .wave { margin-left: auto; display: flex; align-items: center; gap: 1cqw; height: 7cqw; }
.opt .wave i { width: .9cqw; border-radius: 1cqw; background: var(--ink-3); }
.opt.on .wave i { background: var(--navy); }

.bars > div { display: grid; grid-template-columns: 22cqw minmax(0, 1fr) 6cqw; align-items: center; gap: 3cqw; padding: 2.2cqw 0; }
.bars .b { height: 4.4cqw; border-radius: 2cqw; background: var(--navy); }
.bars .n { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.bars span:first-child { color: var(--ink-2); }
.learned { display: flex; gap: 2.4cqw; align-items: baseline; margin-top: 3cqw; padding-top: 3cqw; border-top: 1px solid var(--line); }
.learned b { color: var(--answer-dark); }

/* How it works */
.how { padding-block: 64px 24px; display: grid; gap: 28px; max-width: 560px; margin: 0 auto; }
.how h2 { text-align: center; font-size: clamp(44px, 10vw, 72px); line-height: 1; }
.how ol { margin: 0; padding: 0; }
.how li { list-style: none; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 2px 12px; padding: 18px 0; border-top: 1px solid var(--line); }
.how li .n { grid-row: span 2; font-family: var(--font-display); font-size: 26px; line-height: 1; color: var(--navy); }
.how li b { font-weight: 600; }
.how li span:last-child { color: var(--ink-2); font-size: 15px; }

/* Closing pitch */
.pitch { padding-block: 120px 40px; }
.pitch p.big {
  max-width: 15em; margin: 0 auto; text-align: center;
  font-family: var(--font-display); font-size: clamp(32px, 5.4vw, 64px); line-height: 1.18; letter-spacing: -.035em;
}
footer { padding: 24px 24px calc(160px + env(safe-area-inset-bottom, 0px)); text-align: center; font-size: 12px; color: var(--ink-2); display: grid; gap: 6px; }

@media (min-width: 640px) {
  .gutter { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .stage { border-radius: 56px; padding: 24px 0 40px; }
  .top { padding: 14px 28px 0 36px; }
  .greet { padding: 64px 24px 48px; }
  .cardwrap { padding: 0 24px; }
  .card { aspect-ratio: 3 / 2; border-radius: 44px; }
  .card .stack { left: 14px; right: 14px; top: 14px; }
  .card .callbar { padding: 12px 12px 12px 30px; }
  .l1 { font-size: 17px; }
  .l2 { font-size: 16px; }
  .caption { left: 14px; right: 14px; bottom: 14px; font-size: 17px; }
  .card .sheet { left: 50%; right: auto; width: min(480px, calc(100% - 28px)); transform: translateX(-50%); top: 14px; bottom: 14px; padding: 30px 28px 24px; border-radius: 32px; animation: none; }
  .seven label { height: 48px; }
}
@media (min-width: 960px) {
  .greet p { max-width: none; }
  .features { padding-top: 200px; }
  .feature { max-width: none; grid-template-columns: 440px 380px; justify-content: center; gap: 150px; padding-block: 0 200px; align-items: center; }
  .feature h2 { font-size: 40px; }
  .feature .txt p { font-size: 19px; }
  .pitch { padding-top: 160px; }
}

/* ---- Pilot additions (not in design v13) ---- */
/* Two cards: the segmented control picks which one is on screen; the card on screen when Answer is pressed picks the campaign */
.picker { display: flex; justify-content: center; padding: 0 16px 20px; }
.picker .seg { display: inline-grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 999px; background: var(--chip); }
.picker button { min-height: 44px; min-width: 124px; padding: 0 22px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); font: 600 15px var(--font-body); cursor: pointer; transition: background-color .2s, color .2s; }
.picker button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 12, 31, .14); }
.picker button:disabled { cursor: default; opacity: .6; }

/* Answer is grey until the recording box is ticked, and for good when the link is refused */
.cbtn[aria-disabled="true"] { background: #b9bcc2; cursor: default; }
.cbtn[aria-disabled="true"]:hover { background: #b9bcc2; }
.callbar[data-state="refused"] { border-color: var(--line); }
.callbar .l2.note { color: var(--ink); white-space: normal; }
.callbar[data-state="refused"] .l1 { font-weight: 500; line-height: 1.3; display: block; }

.card .stack { position: absolute; left: 10px; right: 10px; top: 10px; display: grid; gap: 8px; justify-items: start; }
.stack .callbar { width: 100%; }
.consent { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; padding: 6px 18px 6px 14px; border-radius: 22px; background: rgba(255, 255, 255, .95); backdrop-filter: blur(8px); font-size: 14px; line-height: 1.35; color: var(--ink); cursor: pointer; text-align: left; }
.consent input { width: 24px; height: 24px; flex: none; margin: 0; accent-color: var(--navy); cursor: pointer; }
.consent input:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; }
.consent .need { display: none; color: var(--ink-2); }
.consent.need .need { display: block; }

/* Rating card: the extra question */
.would { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 8px; }
.would legend { padding: 0; font-size: 15px; font-weight: 600; letter-spacing: -.01em; margin-bottom: 8px; }
.would .row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.would input { position: absolute; opacity: 0; pointer-events: none; }
.would label { height: 46px; display: grid; place-items: center; border-radius: 12px; background: var(--chip); cursor: pointer; font-size: 16px; transition: background-color .15s, color .15s; }
.would label:hover { background: rgba(0, 38, 100, .11); }
.would input:checked + label { background: var(--navy); color: var(--on-ink); }
.would input:focus-visible + label { outline: 3px solid var(--link); outline-offset: 2px; }
.acts .pill:disabled { background: #b9bcc2; cursor: default; }
@media (max-width: 639px) { .card.rating { aspect-ratio: auto; min-height: 640px; } }

/* "Example" labels on the price rows and "Coming later" on feature tiles */
.ex { font-size: 3.1cqw; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); background: var(--paper); border: 1px solid var(--line); padding: 1cqw 2.6cqw; border-radius: 99px; }
.ex.in { justify-self: end; }
.opt.soon { opacity: .55; }
.opt .later { margin-left: auto; font-size: 3.3cqw; font-weight: 600; color: var(--ink-2); background: var(--chip); padding: 1cqw 2.6cqw; border-radius: 99px; }
