/* PrimeStart lead capture: the sticky offer bar, its sheet and the after-sign-up question
   (engine/static/capture.js). Tokens only (tokens.css). The look follows the homepage's glass bar
   (design/concepts/c4-daylight: .sbar, .sb-sheet) so the two read as one component. */

/* ---------- the bar ---------- */
.ps-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; justify-content: center; pointer-events: none;
  padding: 0 var(--spacing--medium) calc(var(--spacing--small) + env(safe-area-inset-bottom, 0px));
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), opacity .35s; }
.ps-bar.ps-off { transform: translateY(130%); opacity: 0; visibility: hidden; }
.ps-bar-in { pointer-events: auto; position: relative; display: flex; align-items: center; gap: var(--spacing--small); max-width: 100%;
  padding: var(--spacing--xsmall) var(--spacing--xsmall) var(--spacing--xsmall) var(--spacing--large); border-radius: var(--radius--round);
  background: var(--background--glass-fallback); color: var(--text--primary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), inset 0 0 0 1px var(--border--subtle), var(--shadow--lift); }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .ps-bar-in { background: linear-gradient(155deg, rgba(255, 255, 255, .96) 0%, rgba(255, 255, 255, .9) 42%, rgba(255, 255, 255, .94) 100%);   /* tidy patch item 6: more solid, no ghosting */
    -webkit-backdrop-filter: var(--blur--glass); backdrop-filter: var(--blur--glass); }
}
.ps-bar-l { font: var(--font-weight--bold) var(--text--size-base)/1.2 var(--font--heading); letter-spacing: -.01em; white-space: nowrap; }
.ps-bar .btn { white-space: nowrap; }
.ps-bar-f { display: none; align-items: center; gap: var(--spacing--xsmall); margin: 0; }
.ps-bar-f input[type=email], .ps-sheet input[type=email] { height: var(--size--tap-target); border: 0; border-radius: var(--radius--round); padding: 0 var(--spacing--medium);
  font: var(--font-weight--medium) var(--text--size-base) var(--font--body); color: var(--text--primary); background: var(--background--secondary);
  box-shadow: inset 0 0 0 1px var(--border--primary); }
.ps-bar-f input[type=email] { width: 13.75rem; }
.ps-bar-f input[aria-invalid=true], .ps-sheet input[aria-invalid=true] { box-shadow: inset 0 0 0 2px currentColor; }
.ps-opt { display: flex; align-items: center; gap: var(--spacing--xsmall); min-height: var(--size--tap-target); cursor: pointer;
  font: var(--font-weight--medium) var(--text--size-small)/1.3 var(--font--body); color: var(--text--secondary); }
.ps-opt input { flex: none; width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--focus--ring); }
.ps-bar-f .ps-opt { white-space: nowrap; }
.ps-bar-priv { display: none; order: 10; flex: 0 0 100%; font-size: var(--text--size-xsmall); line-height: 1.3; color: var(--text--secondary); padding: 0 var(--spacing--xxsmall) var(--spacing--xxsmall); }
.ps-bar-priv a { color: inherit; }
.ps-bar-talk { font: var(--font-weight--semibold) var(--text--size-small)/1.2 var(--font--body); color: var(--text--primary); white-space: nowrap;
  min-height: var(--size--tap-target); display: none; align-items: center; padding: 0 var(--spacing--xsmall); }
.ps-bar-ok { display: none; }
.ps-x { width: var(--size--tap-target); height: var(--size--tap-target); flex: none; display: grid; place-items: center; border: 0; border-radius: var(--radius--circle);
  background: transparent; color: var(--text--primary); cursor: pointer; }
.ps-x:hover { background: var(--border--subtle); }
.ps-ico { width: 1.125rem; height: 1.125rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ps-long { display: none; }
.ps-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* the bar never covers the end of the page: room is added while it shows */
/* (phone finding 3) reserved once while the bar can appear, with a fixed value, so showing it never restyles the page */
html.ps-bar-room body { padding-bottom: calc(4.5rem + var(--spacing--large) + env(safe-area-inset-bottom, 0px)); }
html.ps-bar-room { scroll-padding-bottom: calc(4.5rem + var(--spacing--large) + env(safe-area-inset-bottom, 0px)); }

@media (max-width: 47.99rem) {
  .ps-bar-l { display: none; }
  .ps-bar-in { width: 100%; padding: var(--spacing--xsmall); border-radius: var(--radius--nested); }
  .ps-bar-open, .ps-bar-go { flex: 1 1 0; min-width: 0; }
  /* phone findings 3 and 4: one slim row (48px, the buttons keep 44px) on a solid fill, no backdrop blur to repaint while scrolling */
  .ps-bar { padding-bottom: calc(.375rem + env(safe-area-inset-bottom, 0px)); padding-inline: .5rem; will-change: transform; }
  .ps-bar-in { padding: 2px; border-radius: 1.5rem; -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
    background: linear-gradient(155deg, #fff 0%, rgba(250, 250, 255, .985) 100%); }
  html.ps-bar-room body { padding-bottom: calc(3.375rem + var(--spacing--large) + env(safe-area-inset-bottom, 0px)); }
  html.ps-bar-room { scroll-padding-bottom: calc(3.375rem + var(--spacing--large) + env(safe-area-inset-bottom, 0px)); }
}
@media (min-width: 26rem) { .ps-long { display: inline; } .ps-long + .ps-short { display: none; } }
@media (min-width: 48rem) { .ps-bar-talk { display: inline-flex; } }
@media (min-width: 73.75rem) {
  .ps-bar-f { display: flex; }
  .ps-bar-open { display: none; }
  .ps-bar-noinline .ps-bar-open { display: inline-flex; }
  .ps-bar-noinline .ps-bar-in { flex-wrap: nowrap; border-radius: var(--radius--round); padding-top: var(--spacing--xsmall); }
  .ps-bar-in { flex-wrap: wrap; row-gap: 0; border-radius: var(--radius--nested); padding-top: var(--spacing--xsmall); }
  .ps-bar-priv { display: block; contain: inline-size; } /* takes its own row without widening the pill */
}

/* ---------- the sheet ---------- */
.ps-scrim { position: fixed; inset: 0; z-index: 65; background: var(--overlay--scrim); }
.ps-scrim[hidden], .ps-sheet[hidden], .ps-sheet [hidden], .ps-bar [hidden] { display: none !important; }
.ps-sheet { position: fixed; z-index: 70; left: var(--spacing--medium); right: var(--spacing--medium); bottom: calc(var(--spacing--small) + env(safe-area-inset-bottom, 0px));
  padding: var(--spacing--large); border-radius: var(--radius--xlarge); background: var(--background--secondary); color: var(--text--primary);
  box-shadow: var(--shadow--lift); max-height: calc(100dvh - 1.5rem); overflow-y: auto; overscroll-behavior: contain; }
@media (min-width: 56.25rem) { .ps-sheet { left: 50%; right: auto; width: 27.5rem; transform: translateX(-50%); } }
.ps-sheet-x { float: right; margin: calc(var(--spacing--xsmall) * -1) calc(var(--spacing--xsmall) * -1) 0 0; }
.ps-sheet-title { font: var(--font-weight--bold) 1.5rem/1.1 var(--font--heading); letter-spacing: -.025em; margin: 0 3.25rem var(--spacing--xsmall) 0; }
.ps-sheet p { margin: 0 0 var(--spacing--small); font-size: var(--text--size-base); color: var(--text--secondary); }
.ps-sheet form { display: flex; flex-direction: column; gap: var(--spacing--small); margin: 0; }
.ps-sheet label { font-size: var(--text--size-compact); font-weight: var(--font-weight--semibold); color: var(--text--secondary); }
.ps-sheet .ps-opt { font-size: var(--text--size-base); font-weight: var(--font-weight--medium); }
.ps-sheet small { font-size: var(--text--size-small); line-height: 1.45; color: var(--text--secondary); }
.ps-sheet small a, .ps-sheet p a { color: inherit; }
.ps-sheet .btn { width: 100%; }
.ps-err { margin: 0 !important; font-weight: var(--font-weight--semibold); color: var(--text--primary) !important; }
/* errors: an icon as well as weight, on a line of their own (the same mark as the Contact form) */
.ps-err, .field-error { display: flex; gap: .375rem; align-items: flex-start; text-align: left; }
.ps-err[hidden] { display: none !important; }
.ps-err:not(:empty)::before, .field-error::before { content: ""; flex: none; width: 1rem; height: 1rem; margin-top: .15em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e8416a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 8v4M12 16h.01'/%3E%3C/svg%3E") center / contain no-repeat; }
/* a tick box and its error: the error always takes the full width under the box and its label, never a column beside them */
.field-check { flex-wrap: wrap; }
.field-check > label { flex: 1 1 0; min-width: 0; }
.field-check > .field-error { flex: 0 0 100%; width: 100%; margin: 0; }
.ps-bar-err { order: 11; flex: 0 0 100%; padding: 0 var(--spacing--xxsmall) var(--spacing--xxsmall); font-size: var(--text--size-small); line-height: 1.35; contain: inline-size; }
.ps-sheet-past { margin: calc(var(--spacing--xsmall) * -1) 0 var(--spacing--small) !important; }
.ps-sheet-past a { display: inline-flex; align-items: center; min-height: var(--size--tap-target); font-weight: var(--font-weight--semibold); color: var(--text--primary) !important; text-decoration: underline; text-decoration-color: var(--link--underline, currentColor); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.ps-sheet-done:focus { outline: 0; }
html.ps-sheet-open { overflow: hidden; }

/* ---------- after a sign-up: the one-tap question ----------
   Also used on the homepage, which has its own stylesheet and not these tokens: every value here
   carries a fallback, and colours are inherited so it reads on light and dark panels alike. */
/* the quiet line under every confirmation: "If you don't hear from us, please email …" */
.ps-hear { margin: var(--spacing--xsmall, 8px) 0 0 !important; font-size: 14.5px !important; line-height: 1.45; font-weight: 400 !important; color: inherit; opacity: .82; }
.ps-hear a { color: inherit; text-decoration: underline; }
.ps-after { margin-top: var(--spacing--small, 12px); }
.ps-after:empty { display: none; }
/* homepage confirmations (.proto) are green on the dark monthly panel and on light panels alike: give the question its own ink */
.proto .ps-after { color: var(--ink, #000041); font-weight: 500; }
.mon .proto .ps-after { color: var(--on-dark, #fff); }
.proto .ps-after p { color: inherit; font-size: 15.5px; }
.ps-ask { display: grid; gap: var(--spacing--xsmall, 8px); padding-top: var(--spacing--small, 12px); border-top: 1px solid currentColor; border-top-color: color-mix(in srgb, currentColor 25%, transparent); }
.ps-ask-q { margin: 0 !important; font-weight: 600; color: inherit; }
.ps-ask-opts { display: flex; flex-wrap: wrap; gap: var(--spacing--xsmall, 8px); }
.ps-chip { min-height: 44px; padding: 0 var(--spacing--medium, 16px); border-radius: 999px; cursor: pointer;
  border: 1px solid currentColor; background: transparent; color: inherit; font: 600 15px/1.2 inherit; font-family: inherit; }
.ps-chip:hover:not(:disabled), .ps-chip[aria-pressed=true] { box-shadow: inset 0 0 0 1px currentColor; }
.ps-chip:disabled { opacity: .55; cursor: default; }
.ps-chip-go { background: linear-gradient(var(--background--accent-light, #7dffc1), var(--background--accent-dark, #1fe08a)); color: var(--text--on-accent, #003a20); border-color: transparent; }
.ps-skip { justify-self: start; min-height: 44px; padding: 0 4px; border: 0; background: none; cursor: pointer;
  color: inherit; font: 500 15px/1.2 inherit; font-family: inherit; text-decoration: underline; text-underline-offset: .2em; }
.ps-ask-said, .ps-next { margin: 0 !important; }
.ps-ask-said:focus { outline: 0; }
.ps-bar :focus-visible, .ps-sheet :focus-visible, .ps-after :focus-visible { outline: 3px solid var(--focus--ring, #2b2bb8); outline-offset: 2px; }
.ps-after :focus-visible { outline-color: currentColor; }

@media (prefers-reduced-motion: reduce) { .ps-bar { transition: none; } }
.btn[aria-disabled=true] { opacity: .7; cursor: progress; }
