/* ============================================================================
   SAFE START : apply flow skin
   The --ob-* tokens for the shared onboarding structure, and Safe Start's own
   pieces: the call-outs, the fort strip and the close. Sizes come from
   foundation.css; the sky, grain, buttons and the plan art's build styles are
   the landing page's (styles.css).
   ========================================================================== */

:root {
  --ob-font:        var(--f-sans);
  --ob-ink-2:       var(--ink-2);
  --ob-card-bg:     linear-gradient(180deg, rgba(255,255,255,.86), rgba(255,255,255,.74));
  --ob-card-edge:   0 0 0 1px var(--glass-edge);
  --ob-card-shadow: var(--lift);
  --ob-card-blur:   22px;
  --ob-selected-bg: #f0f5ff;
  --ob-progress:    linear-gradient(90deg, var(--green-bright), var(--blue));
}

/* The sky: the landing page's three stops, eased from step to step. */
@property --a1 { syntax: '<color>'; inherits: true; initial-value: #cfe7f2; }
@property --a2 { syntax: '<color>'; inherits: true; initial-value: #e2f1ee; }
@property --a3 { syntax: '<color>'; inherits: true; initial-value: #eef6e8; }
.atmos { transition: --a1 1.6s var(--ease), --a2 1.6s var(--ease), --a3 1.6s var(--ease); }

.ob-noscript { padding: var(--space-6) var(--gutter); font-weight: 600; }

/* ============================================================= type == */
/* Titles in the landing page's soft serif, a level below its headlines. */
.ob-title {
  font-family: var(--f-serif); font-weight: 420; letter-spacing: -.02em; line-height: 1.1;
  font-optical-sizing: none; font-variation-settings: "opsz" 72, "SOFT" 100, "WONK" 0;
}
.ob-group__t, .ob-notify__t { font-weight: 600; }
.ob-label { font-weight: 600; }
.ob-choice__t, .ob-check__t { font-weight: 600; }
.ob-note, .ob-back, .ob-leave, .ob-reveal, .ob-linkbtn, .ob-more summary { font-weight: 600; }
.ob-error { font-weight: 600; }
.ob-progress__text { font-weight: 600; }

/* ============================================================ brand bar == */
.ob-top .brand { color: var(--blue); }
.ob-leave { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }   /* the link's 44px target; the text stays centred */
.ob-top .brand { min-height: 44px; }
.ob-top .brand__lockup { width: max(130px, calc(150 * var(--p))); }

/* ========================================================== buttons == */
/* The landing page's button, at the form's size. The engine draws its arrow
   as an inline SVG rather than the landing page's masked span. */
.ob .btn { --bh: var(--control-height); font-size: var(--type-body); }
.ob .btn svg.btn__arrow { width: 1.1em; height: 1.1em; overflow: visible; }
.ob .btn svg.btn__arrow::before, .ob .btn svg.btn__arrow::after { display: none; }

/* ======================================================== call-outs == */
/* a plain-words reason, said once, next to the choice it's about */
.sc-callout {
  display: flex; align-items: flex-start; gap: calc(12 * var(--p));
  padding: calc(14 * var(--p)) calc(16 * var(--p)); border-radius: var(--radius-control);
  background: linear-gradient(180deg, rgba(201,247,200,.75), rgba(201,247,200,.45));
  box-shadow: inset 0 0 0 1px rgba(15,138,85,.22);
  font-size: var(--type-small); font-weight: 500; line-height: 1.5; color: var(--ink);
  animation: sc-in var(--dur-2) var(--ease) both;
}
.sc-callout + .sc-callout { margin-top: calc(10 * var(--p)); }
.sc-callout .ico { width: calc(20 * var(--p)); height: calc(20 * var(--p)); margin-top: calc(1 * var(--p)); flex: none; color: var(--green); }
.sc-callout b { font-weight: 650; }
.sc-callout--quiet { background: rgba(255,255,255,.7); box-shadow: inset 0 0 0 1px rgba(12,40,35,.1); }
.sc-callout--quiet .ico { color: var(--blue); }
@keyframes sc-in { from { opacity: 0; transform: translateY(6px); } }

/* ======================================================= the offer == */
/* the cash-offer arm only: the landing page's coral coin, one line, in
   fixed places. Supporting, never louder than the protections. */
.sc-offer {
  display: flex; align-items: flex-start; gap: calc(12 * var(--p));
  padding: calc(12 * var(--p)) calc(16 * var(--p)) calc(12 * var(--p)) calc(12 * var(--p));
  border-radius: var(--radius-control);
  background: linear-gradient(180deg, rgba(255,233,168,.7), rgba(255,233,168,.4));
  box-shadow: inset 0 0 0 1px rgba(214,140,40,.28);
  font-size: var(--type-small); font-weight: 500; line-height: 1.5; color: var(--ink);
  animation: sc-in var(--dur-2) var(--ease) both;
}
.sc-offer b { font-weight: 650; }
.sc-offer--quiet { background: rgba(255,255,255,.7); box-shadow: inset 0 0 0 1px rgba(12,40,35,.1); }
.sc-offer__coin {
  flex: none; display: grid; place-items: center;
  width: calc(24 * var(--p)); height: calc(24 * var(--p)); border-radius: 50%;
  background: var(--coral); color: #fff; font-weight: 650; font-size: calc(13 * var(--p)); line-height: 1;
}
.sc-offer + .sc-callout, .sc-offer + .sc-offer { margin-top: calc(10 * var(--p)); }


/* ======================================================== the card == */
/* The landing page's debit card, small and still, above the digital-card
   choices. No tilt, no glare; it only fades in. */
.sc-card-wrap { display: grid; justify-items: center; padding-block: calc(4 * var(--p)) calc(8 * var(--p)); }
.sc-debit {
  position: relative; width: min(100%, 228px); aspect-ratio: 1.586; border-radius: 16px; overflow: hidden;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(58,124,242,.95), rgba(58,124,242,0) 60%),
    radial-gradient(90% 90% at 0% 100%, rgba(201,247,200,.9), rgba(201,247,200,0) 60%),
    linear-gradient(135deg, #3fcf8d, #139a5e 55%, #1b53c9);
  box-shadow: 0 1px 3px rgba(12,40,35,.14), 0 22px 36px -22px rgba(20,63,174,.55), inset 0 1px 0 rgba(255,255,255,.5);
  color: #fff; animation: sc-in var(--dur-2) var(--ease) both;
}
.sc-debit::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; opacity: .45; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.sc-debit__face { position: absolute; inset: 0; padding: 15px 16px; display: flex; flex-direction: column; justify-content: space-between; }
.sc-debit__row { display: flex; justify-content: space-between; align-items: center; }
.sc-debit__brand { width: 84px; height: auto; color: #fff; filter: drop-shadow(0 1px 2px rgba(10,40,120,.25)); }
.sc-debit__type { font-family: var(--f-mono); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.sc-debit__chip {
  width: 32px; aspect-ratio: 1.3; border-radius: 5px;
  background: linear-gradient(135deg, #fff1bf, #f4cd6b 50%, #fde8a4);
  box-shadow: inset 0 0 0 1px rgba(160,110,20,.3);
}
.sc-debit__num { font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; }
@media (max-width: 767px) { .sc-debit { width: min(100%, 200px); border-radius: 14px; } .sc-debit__brand { width: 74px; } .sc-debit__num { font-size: 11px; } }

/* ============================================================= close == */
.sc-done { display: grid; gap: var(--space-3); }
.sc-done__list { display: grid; gap: calc(10 * var(--p)); margin-top: var(--space-1); }
.sc-done__list li {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: calc(12 * var(--p));
  padding: calc(12 * var(--p)) calc(14 * var(--p)); border-radius: var(--radius-control);
  background: rgba(255,255,255,.78); box-shadow: inset 0 0 0 1px rgba(12,40,35,.08);
  font-weight: 600;
}
.sc-done__ico {
  width: calc(32 * var(--p)); height: calc(32 * var(--p)); display: grid; place-items: center;
  border-radius: 50%; background: var(--green); color: #fff;
}
.sc-done__ico .ico { width: calc(16 * var(--p)); height: calc(16 * var(--p)); }
.sc-done__next { font-weight: 600; }

/* ===================================================== the companion == */
/* A slim strip above the form: the fort, small, and how many of the five
   protections are chosen. It opens into the list of the five. */
.sc { position: relative; }
.sc-strip {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: calc(14 * var(--p));
  width: 100%; min-height: calc(68 * var(--p)); padding: calc(6 * var(--p)) calc(18 * var(--p)) calc(6 * var(--p)) calc(12 * var(--p));
  border: 1px solid var(--glass-edge); border-radius: var(--radius-panel); cursor: pointer; text-align: left;
  font: inherit; color: var(--ink);
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(150%); backdrop-filter: blur(20px) saturate(150%);
  box-shadow: 0 18px 36px -26px rgba(20,63,174,.45), inset 0 1px 0 rgba(255,255,255,.9);
}
.sc-strip:hover .sc-strip__more { color: var(--ink); }
.sc-strip__text { display: grid; line-height: 1.25; min-width: 0; }
.sc-strip__label { font-size: var(--type-small); font-weight: 500; color: var(--ink-2); }
.sc-strip__num { font-size: var(--type-small); font-weight: 600; color: var(--ink-2); }
.sc-strip__num b {
  display: inline-block; font-family: var(--f-serif); font-size: var(--ob-type-heading); font-weight: 500;
  font-variation-settings: "opsz" 48, "SOFT" 100; color: var(--green); letter-spacing: -.01em;
}
.sc-strip.is-grow .sc-strip__num b { animation: sc-count calc(var(--dur-2) * 1.2) var(--ease); }
@keyframes sc-count { 0% { transform: translateY(40%); opacity: 0; } 100% { transform: none; opacity: 1; } }
.sc-strip__more { display: inline-flex; align-items: center; gap: 4px; font-size: var(--type-small); font-weight: 600; color: var(--blue-deep); }
.sc-strip__chev { width: 18px; height: 18px; transition: transform var(--dur-1) var(--ease); }
.sc-strip[aria-expanded="true"] .sc-strip__chev { transform: rotate(180deg); }

/* The fort: drawn for this size (tinyFort() in the generator). A pale
   silhouette of the whole fort; each chosen protection's piece rises out of
   the ground over it, whole, with a plain ease-out. */
.sc-fort { display: block; width: calc(70 * var(--p)); height: calc(52 * var(--p)); flex: none; }
.sc-fort__art { width: 100%; height: 100%; overflow: visible; }
/* one flat silhouette, tinted so it reads on the white glass */
.sc-fort .tf-ghost path { fill: #d6e8e1 !important; stroke: #d6e8e1 !important; }
.sc-fort .tf-piece { transform: translateY(var(--rise)); transition: transform .8s var(--ease); }
.sc-fort .tf-piece.is-built { transform: none; }
.sc-fort.is-still .tf-piece { transition: none; }

/* the list opens over the form, not pushing it down */
.sc-panel {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 5;
  padding: calc(14 * var(--p)); border-radius: var(--radius-panel);
  background: linear-gradient(180deg, rgba(255,255,255,.97), rgba(244,250,246,.95));
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border: 1px solid #fff;
  box-shadow: 0 30px 70px -30px rgba(12,40,35,.45);
  animation: sc-in var(--dur-1) var(--ease) both;
}
.sc-panel[hidden] { display: none; }
.sc-rows { display: grid; gap: calc(8 * var(--p)); }
.sc-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: calc(12 * var(--p));
  padding: calc(12 * var(--p)) calc(14 * var(--p)); border-radius: var(--radius-control);
  background: rgba(255,255,255,.6); box-shadow: inset 0 0 0 1px rgba(12,40,35,.07);
}
.sc-row__mark {
  width: calc(26 * var(--p)); height: calc(26 * var(--p)); display: grid; place-items: center; flex: none;
  border-radius: 50%; color: transparent; box-shadow: inset 0 0 0 1.5px rgba(12,40,35,.22);
  transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}
.sc-row__mark .ico { width: calc(14 * var(--p)); height: calc(14 * var(--p)); }
.sc-row__body { display: grid; gap: calc(2 * var(--p)); min-width: 0; }
.sc-row__t { font-size: var(--type-small); font-weight: 600; line-height: 1.35; }
.sc-row__s { font-size: var(--type-small); font-weight: 400; line-height: 1.45; color: var(--ink-2); }
.sc-row__tag { font-size: var(--type-small); font-weight: 600; line-height: 1; color: var(--green); white-space: nowrap; }
.sc-row__tag:empty { display: none; }
.sc-row:not([data-s="available"]) { background: linear-gradient(180deg, rgba(201,247,200,.55), rgba(201,247,200,.3)); box-shadow: inset 0 0 0 1px rgba(15,138,85,.25); }
.sc-row:not([data-s="available"]) .sc-row__mark { background: var(--green); color: #fff; box-shadow: none; }
.sc-foot { margin-top: calc(12 * var(--p)); font-size: var(--type-small); color: var(--ink-2); }

@media (max-width: 767px) {
  .ob-top__end { display: none; }   /* phones drop the leave link, as the shared bar does */
  /* svh: vh is the tall viewport on iOS Safari, so with the toolbar showing
     the panel's foot would sit under it */
  .sc-panel { max-height: 70vh; max-height: calc(100svh - 150px); overflow: auto; overscroll-behavior: contain; }
  .sc-strip { min-height: 60px; }
  .sc-fort { width: 62px; height: 46px; }
  .sc-strip__label { display: none; }

  /* "Show" and the close's text button reach a 44px target */
  .ob-reveal, .ob-linkbtn { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .atmos { transition: none; }
  .sc-callout, .sc-offer, .sc-debit, .sc-panel, .sc-strip.is-grow .sc-strip__num b { animation: none; }
  .sc-fort .tf-piece { transition: none; }
}

/* Offer and concept share the existing strip; no second banner. */
.sc-strip--bonus { height: auto; min-height: var(--cell, 68px); grid-template-columns: auto minmax(0, 1fr) auto; padding-block: 12px; row-gap: 6px; }
.sc-strip--bonus .sc-strip__text { display: flex; flex-wrap: wrap; gap: 0 10px; }
.sc-strip__offer { grid-column: 2; display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: var(--type-small); line-height: 1.4; }
.sc-strip__offer b { color: var(--ink); font-weight: 700; }
.sc-strip--bonus .sc-strip__more { grid-column: 3; grid-row: 1 / 3; }
.sc-strip--bonus > :first-child { grid-row: 1 / 3; }
.sc-summary { margin-bottom: 10px; font-size: var(--type-small); font-weight: 700; }
.sc-offer-terms { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--ink-100, rgba(12,40,35,.15)); font-size: var(--type-small); line-height: 1.5; }
.sc-strip__offer[hidden], .sc-offer-terms[hidden] { display: none; }
@media (max-width: 767px) {
  .sc-strip--bonus .sc-strip__label { display: block; }
  .sc-strip--bonus .sc-strip__text { display: flex; flex-wrap: wrap; gap: 0 6px; align-items: baseline; }
  .sc-strip__offer { display: grid; }
  .sc-strip--bonus { column-gap: 8px; }
}

.sc-strip--bonus .sc-strip__num b { font: inherit; color: inherit; }
.sc-strip--bonus .sc-strip__label::after { content: " ·"; }
