/* ===========================================================================
   Prosper In America - Phase 1 commercial design system
   STAGING MOCKUP STYLESHEET. Not production code. Not wired to Astro.
   ---------------------------------------------------------------------------
   SCOPE FENCE
   Every rule below is scoped to .pia-commercial. That class goes on <body> of
   the four commercial routes only: /, /pt/, /insurance/, /seguro/.
   The shared :root on the live site still carries the legacy gold, saffron and
   emerald tokens. This file never references them, and it re-declares the two
   rule tokens locally so a gold hairline cannot reach a commercial page.
   Nothing here edits the shared :root, so every legacy and subbrand route keeps
   its current chrome untouched.
   =========================================================================== */

.pia-commercial {
  /* --- approved palette ------------------------------------------------- */
  --navy:            #0A1628;   /* surfaces, footer, primary CTA             */
  --navy-ink:        #102645;   /* headings                                  */
  --navy-up:         #142038;   /* navy surface lift                         */
  --slate:           #4A5466;   /* secondary body, 7.31 on stone             */
  --stone:           #FAFAFA;   /* page background                           */
  --white:           #FFFFFF;
  --line:            #E3E6EB;   /* hairlines, never gold                     */
  --line-strong:     #CCD2DA;

  /* red, measured from the approved wordmark master and split by job */
  --brand-red:       #F8000B;   /* NON-TEXT marks only. 4.20 on white, fails AA for text */
  --brand-red-text:  #B00009;   /* 7.37 on white, AAA. the only red allowed to carry a word */

  /* legacy tokens neutralised inside the commercial scope */
  --rule-soft:       var(--line);
  --rule-mid:        var(--line-strong);

  /* --- type ------------------------------------------------------------- */
  --font-body: Inter, "Helvetica Neue", Arial, system-ui, -apple-system, "Segoe UI", sans-serif;

  /* --- layout ----------------------------------------------------------- */
  --page-max:  1120px;
  --prose-max:  720px;
  --gutter:      32px;
  --rhythm:      96px;
  --header-h:    68px;
  --radius:      10px;

  background: var(--stone);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  margin: 0;
}

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

/* --- rhythm and containers ------------------------------------------------ */
.wrap  { width: 100%; max-width: var(--page-max); margin-inline: auto; padding-inline: var(--gutter); }
.prose { max-width: var(--prose-max); }
.band  { padding-block: var(--rhythm); }
.band--tint { background: var(--white); border-block: 1px solid var(--line); }
.band--navy { background: var(--navy); color: #E8EBF0; }

/* --- headings ------------------------------------------------------------- */
.pia-commercial h1, .pia-commercial h2, .pia-commercial h3 {
  color: var(--navy-ink); font-weight: 700; letter-spacing: -0.02em;
  line-height: 1.12; margin: 0 0 .5em;
}
.pia-commercial h1 { font-size: clamp(1.75rem, 1.15rem + 2.3vw, 2.75rem); letter-spacing: -0.03em; }
.pia-commercial h2 { font-size: clamp(1.45rem, 1.05rem + 1.5vw, 2.1rem); }
.pia-commercial h3 { font-size: 1.1rem; letter-spacing: -0.01em; }
.pia-commercial p  { margin: 0 0 1.05em; }
.lede { font-size: clamp(1.05rem, .98rem + .35vw, 1.3rem); color: var(--slate); }
.muted { color: var(--slate); }
.small { font-size: .875rem; line-height: 1.55; }

/* ---------------------------------------------------------------------------
   DARK BAND OVERRIDES. These must sit AFTER the heading rules above.
   `.pia-commercial h2` and `.band--navy h2` are both 0,1,1 specificity, so the
   later rule won. Scoping the override to `.pia-commercial .band--navy h2`
   makes it 0,2,1 and the heading reads white on navy regardless of order.
   Fixed 2026-11-07 after a rendered-browser check showed #102645 on #0A1628.
   --------------------------------------------------------------------------- */
.pia-commercial .band--navy h1,
.pia-commercial .band--navy h2,
.pia-commercial .band--navy h3 { color: var(--white); }        /* 18.13 on navy */
.pia-commercial .band--navy p,
.pia-commercial .band--navy li  { color: #DCE2EB; }            /* 13.9 on navy  */
.pia-commercial .band--navy .lede,
.pia-commercial .band--navy .muted { color: #C2CAD7; }         /* 10.6 on navy  */
.pia-commercial .band--navy .small { color: #AEB8C8; }         /*  8.2 on navy  */
.pia-commercial .band--navy .textlink { color: var(--white); }
.pia-commercial .band--navy .textlink:hover { color: #FFD9DB; }
.pia-commercial .band--navy .eyebrow { color: #AEB8C8; }

/* eyebrow: the one place --brand-red appears, as a mark, never as text */
.eyebrow { display: flex; align-items: center; gap: 12px;
  font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--slate); margin-bottom: 14px; }
.eyebrow::before { content: ""; width: 34px; height: 3px; background: var(--brand-red); flex: 0 0 auto; border-radius: 2px; }
.band--navy .eyebrow { color: #A9B4C4; }

/* --- buttons -------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 52px; padding: 0 28px; border-radius: var(--radius);
  font: inherit; font-weight: 600; font-size: 1rem; text-decoration: none;
  border: 1.5px solid transparent; cursor: pointer; transition: background .15s, border-color .15s; }
.btn--primary { background: var(--navy); color: var(--white); }      /* 18.13 contrast */
.btn--primary:hover { background: #16263f; }
.btn--ghost { background: transparent; color: var(--navy-ink); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--navy-ink); }
.band--navy .btn--primary { background: var(--white); color: var(--navy); }
.band--navy .btn--ghost { color: #E8EBF0; border-color: #35425A; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; margin-top: 28px; }
.textlink { color: var(--navy-ink); text-underline-offset: 4px; font-weight: 500; }
.textlink:hover { color: var(--brand-red-text); }

.pia-commercial :focus-visible { outline: 3px solid var(--navy-ink); outline-offset: 3px; border-radius: 4px; }
.band--navy :focus-visible { outline-color: #FFFFFF; }

/* --- header --------------------------------------------------------------- */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.site-header .wrap { display: flex; align-items: center; gap: 20px; min-height: var(--header-h); }
.brand img { display: block; width: 190px; height: auto; }
.nav { margin-left: auto; }
.nav ul { display: flex; align-items: center; gap: 26px; list-style: none; margin: 0; padding: 0; }
.nav a { color: var(--navy-ink); text-decoration: none; font-size: .95rem; font-weight: 500; padding: 8px 0; display: inline-block; }
.nav a:hover { text-decoration: underline; text-underline-offset: 6px; }
.nav a[aria-current="page"] { font-weight: 650; box-shadow: inset 0 -3px 0 0 var(--brand-red); }
.lang { display: flex; gap: 2px; margin-left: 10px; font-size: .85rem; }
.lang a { padding: 6px 9px; border: 1px solid var(--line); border-radius: 6px; }
.lang a[aria-current="true"] { background: var(--navy); color: var(--white); border-color: var(--navy); }
.navtoggle { display: none; }

/* --- hero ----------------------------------------------------------------- */
.hero { background: var(--white); border-bottom: 1px solid var(--line); }
.hero .wrap { display: grid; grid-template-columns: 1.02fr .98fr; gap: 56px; align-items: center;
  padding-block: 76px; }
.hero__art { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--stone); }
.hero__art img, .hero__art svg { display: block; width: 100%; height: auto; }

/* trust strip: three plain facts under the insurance hero, no claim beyond them */
.trust { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 30px;
  padding-top: 22px; border-top: 1px solid var(--line); }
.trust span { display: inline-flex; align-items: center; gap: 9px;
  font-size: .9rem; font-weight: 500; color: var(--slate); }
.trust span::before { content: ""; width: 7px; height: 7px; border-radius: 2px;
  background: var(--brand-red); flex: 0 0 auto; }

/* --- cards ---------------------------------------------------------------- */
.grid { display: grid; gap: 24px; }
/* grid and flex children default to min-width:auto, so a long <select> option or
   an unbreakable word can push the track wider than the viewport. Measured: the
   PT insurance page overflowed 390px by 9px before this line existed. */
.grid > *, .estimator > *, .field--row > *, .form > *, .footcols > * { min-width: 0; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.band--tint .card { background: var(--stone); }
.card__icon { color: var(--navy-ink); margin-bottom: 14px; display: block; }
.card__icon svg { width: 30px; height: 30px; }
.card p:last-child { margin-bottom: 0; }

/* --- steps ---------------------------------------------------------------- */
.steps { counter-reset: s; list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 44px 1fr; gap: 18px; align-items: start; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 44px; height: 44px;
  border-radius: 50%; background: var(--navy); color: var(--white); font-weight: 700; font-size: 1rem; }

/* --- credential / people-as-text ------------------------------------------ */
.person { display: grid; grid-template-columns: 148px 1fr; gap: 26px; align-items: start; }
.portrait-slot { aspect-ratio: 4/5; border: 2px dashed var(--line-strong); border-radius: var(--radius);
  display: grid; place-items: center; text-align: center; padding: 12px; background: var(--stone);
  color: var(--slate); font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; line-height: 1.35; }
.cred { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 9px; }
.cred li { display: grid; grid-template-columns: 20px 1fr; gap: 11px; font-size: .95rem; }
.cred li::before { content: ""; width: 9px; height: 9px; margin-top: 8px; border-radius: 2px; background: var(--brand-red); }
.team-text { display: grid; gap: 18px; }
.team-text .card h3 { margin-bottom: 4px; }
.team-text .role { font-size: .9rem; color: var(--slate); margin: 0 0 10px; }

/* --- notices --------------------------------------------------------------
   Default notice is calm. Red is reserved for the two places where a reader
   could otherwise misread a promise: the mortgage boundary and the estimator
   disclaimer. Five red-edged boxes on one page read as a warning label, not as
   a professional consumer page. */
.notice { border: 1px solid var(--line); border-left: 3px solid var(--line-strong);
  background: var(--white); border-radius: 8px; padding: 20px 24px; }
.notice p:last-child { margin-bottom: 0; }
.notice strong { color: var(--navy-ink); }
.notice--legal { border-left-color: var(--brand-red); }
.band--tint .notice { background: var(--stone); }

/* the honest limit that travels with each product description */
.limit { margin: 0; padding-top: 12px; border-top: 1px solid var(--line);
  font-size: .86rem; color: var(--slate); display: grid; grid-template-columns: 8px 1fr; gap: 10px; }
.limit::before { content: ""; width: 8px; height: 8px; margin-top: 7px; border-radius: 2px;
  background: var(--brand-red); }

/* Staging-only annotation. Must never ship.
   Deliberately quiet: it is a reviewer's margin note, not page content, and it
   must not compete with the legal notices that do belong on the page. */
.stagenote { display: flex; gap: 10px; align-items: baseline;
  border-left: 2px solid var(--line-strong); background: transparent;
  color: var(--slate); padding: 2px 0 2px 14px; font-size: .78rem; line-height: 1.5;
  margin: 16px 0; max-width: var(--prose-max); }
.stagenote b { flex: 0 0 auto; font-size: .64rem; letter-spacing: .12em; text-transform: uppercase;
  color: #8A93A3; font-weight: 600; }

/* --- forms ---------------------------------------------------------------- */
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; }
.field label { font-size: .9rem; font-weight: 600; color: var(--navy-ink); }
.field .hint { font-size: .8rem; color: var(--slate); font-weight: 400; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; padding: 13px 14px; border: 1.5px solid var(--line-strong);
  border-radius: 8px; background: var(--white); color: var(--navy); min-height: 50px; width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--navy-ink); }
.field--row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.consent { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; font-size: .88rem; color: var(--slate); }
.consent input { width: 22px; height: 22px; min-height: 0; margin-top: 2px; }

/* Working-contact fallback. The form cannot be activated until its release gates
   close, so the paths that already work must be visibly equal, not a footnote. */
.fallback { background: var(--navy); color: var(--white); border-radius: var(--radius); padding: 30px; }
.fallback h3 { color: var(--white); margin-bottom: 6px; }
.fallback p { color: #C2CAD7; }
.fallback .btn--primary { background: var(--white); color: var(--navy); }
.fallback .btn--ghost { color: #E8EBF0; border-color: #35425A; }
.fallback .cta-row { margin-top: 20px; }
.fallback .cta-row .btn { flex: 1 1 auto; }
.fallback .small { color: #AEB8C8; border-top: 1px solid #1E2C44; padding-top: 14px; margin: 18px 0 0; }

/* --- estimator ------------------------------------------------------------ */
.estimator { display: grid; grid-template-columns: 1.05fr .95fr; gap: 32px; align-items: start; }
.estimator__out { background: var(--navy); color: var(--white); border-radius: var(--radius); padding: 30px; }
.estimator__fig { font-size: clamp(2rem, 1.3rem + 2.6vw, 3rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.05; margin: 6px 0 14px; }
.estimator__out .small { color: #BFC8D6; }

/* --- faq ------------------------------------------------------------------ */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 36px 20px 0; font-weight: 600;
  color: var(--navy-ink); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 16px; font-size: 1.5rem; font-weight: 400; color: var(--slate); }
.faq details[open] summary::after { content: "\2212"; }
.faq .answer { padding: 0 0 20px; color: var(--slate); max-width: var(--prose-max); }

/* --- footer --------------------------------------------------------------- */
.site-footer { background: var(--navy); color: #C8CCD4; padding-block: 60px 40px; }
.site-footer a { color: #E2E6EC; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 4px; }
.site-footer img { width: 210px; height: auto; display: block; margin-bottom: 26px; }
/* Three explicit tracks. An earlier `repeat(auto-fit, …)` here was combined with
   an `fr` track, which is invalid, so the browser dropped the whole declaration
   and the footer collapsed to one column. Caught in a rendered check. */
.footcols { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.footcols h4 { font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: #8E99AB; margin: 0 0 14px; font-weight: 600; }
.footcols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: .92rem; }
.legal { border-top: 1px solid #1E2C44; margin-top: 44px; padding-top: 22px; font-size: .82rem; color: #8E99AB; }

/* ===========================================================================
   RESPONSIVE. Verified against 320 / 360 / 390 / 430 / 768 / 1024 / 1440.
   =========================================================================== */
@media (max-width: 1023px) {
  .pia-commercial { --rhythm: 72px; --gutter: 24px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 36px; padding-block: 52px; }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .estimator { grid-template-columns: 1fr; }
  .footcols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 899px) {
  .nav ul { display: none; }
  .navtoggle { display: block; margin-left: auto; }
  .navtoggle summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px;
    min-height: 44px; padding: 0 6px; font-weight: 600; font-size: .95rem; color: var(--navy-ink); }
  .navtoggle summary::-webkit-details-marker { display: none; }
  .navtoggle summary::after { content: ""; width: 20px; height: 2px; background: currentColor;
    box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor; }
  .navtoggle[open] summary::after { box-shadow: none; transform: rotate(45deg); }
  .navpanel { position: absolute; left: 0; right: 0; top: 100%; background: var(--white);
    border-bottom: 1px solid var(--line); box-shadow: 0 18px 32px -20px rgba(10,22,40,.4); }
  .navpanel ul { display: grid; gap: 0; list-style: none; margin: 0; padding: 8px var(--gutter) 20px; }
  .navpanel a { display: block; padding: 15px 0; min-height: 48px; border-bottom: 1px solid var(--line);
    color: var(--navy-ink); text-decoration: none; font-weight: 500; }
  .navpanel .lang { margin: 16px 0 0; }
}
@media (max-width: 767px) {
  .pia-commercial { --rhythm: 56px; --gutter: 20px; --header-h: 60px; font-size: 16px; }
  .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .field--row { grid-template-columns: 1fr; }
  .person { grid-template-columns: 1fr; gap: 18px; }
  .portrait-slot { max-width: 190px; }
  .footcols { grid-template-columns: 1fr; gap: 30px; }
  .cta-row .btn { width: 100%; }
  .brand img { width: 158px; }
}
@media (max-width: 374px) {
  .pia-commercial { --gutter: 16px; }
  .brand img { width: 140px; }
}
@media (prefers-reduced-motion: reduce) {
  .pia-commercial * { transition: none !important; animation: none !important; }
}
