/* ls_state-pass-cta.css — the ONE hard-gate CTA card on an evergreen page.
 *
 * The short-term paywall (owner directive, 2026-08-19): gate the article
 * that is already on the page, the way a news publisher does. One card,
 * one decision point, everything below it removed at the edge for anyone
 * without a pass. Modelled on the CNN "Keep reading with a CNN
 * subscription" panel the owner supplied as the reference, rebuilt in
 * DG4 — dark ground, Georgia headline, one gold button.
 *
 * WHERE IT COMES FROM: this markup is NOT authored per page. It is
 * emitted at the cut by paywall/build/mark_page_temp.py, so all ~1,300
 * evergreen pages carry a byte-identical card. Change the copy there,
 * change the skin here.
 *
 * Design authority: .claude/skills/design-director/SKILL.md. Namespaced
 * #hw-solar to match the evergreen family, so this file is completely
 * inert on every other page type even though it loads sitewide.
 *
 * ⚠️ PX ONLY, NEVER REM — the legacy screen.css still ships sitewide and
 * sets html{font-size:62.5%} (a 10px root), so a rem value renders at
 * 62.5% of what you meant. ls_paywall.css shipped 37.5% too small once
 * for exactly this reason ("small and squished" — owner). Same
 * convention here, and in ls_evergreen.css, which is px throughout.
 *
 * Colour semantics, shared with ls_paywall.css:
 *   gold  = buy this
 *   green = you already have it   (.hw-gate-active)
 *
 * ⚠️ SPECIFICITY: this card renders INSIDE the article, which means it
 * sits inside `<section class="gh-content">` and `.hw-article-in`, and
 * ls_evergreen.css reaches in there with rules that out-specify a plain
 * `#hw-solar .hw-gate-*`:
 *     #hw-solar .hw-article h2         (1,1,1) → would turn the card
 *                                       headline into a 13.5px gold-caps
 *                                       section header with a rule after
 *                                       it. Hence the headline is a <p>,
 *                                       not an <h2> — which also keeps it
 *                                       out of the sitewide #hw-toc
 *                                       generator, which harvests h2/h3/h4.
 *     #hw-solar .hw-article-in section a    (1,2,1) → button text
 *     #hw-solar .hw-article-in section p a  (1,2,2) → the sign-in links
 * So the anchor rules below carry matching specificity AND !important on
 * the colour, the same defensive pattern ls_account.css and
 * ls_paywall.css already use. White-on-gold is design-director §3 rule 2
 * and must not be able to regress.
 */

/* ── the band ──────────────────────────────────────────────────────────
 * Pulled UP over the last lines of the free content, with a gradient
 * scrim fading them into the page ground. That overlap is the whole
 * point: the reader can see the article continuing underneath, which is
 * what makes a paywall read as "there is more" rather than "the end".
 * It is presentational only — the paid text is physically absent from
 * the response (website/paywall/rewrite.js), never merely covered. */
#hw-solar .hw-gate, #hw-stpage .hw-gate {
  position: relative;
  margin: -96px 0 56px;
  padding-top: 128px;
}
#hw-solar .hw-gate::before, #hw-stpage .hw-gate::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 128px;
  pointer-events: none;
  background: linear-gradient(to bottom,
    rgba(11, 14, 20, 0) 0%,
    rgba(11, 14, 20, 0.72) 46%,
    rgba(11, 14, 20, 0.97) 78%,
    #0b0e14 100%);
}

/* ── the card ───────────────────────────────────────────────────────── */
#hw-solar .hw-gate-card, #hw-stpage .hw-gate-card {
  position: relative;
  text-align: center;
  padding: 44px 40px 40px;
  border: 1px solid rgba(172, 125, 70, 0.34);
  border-radius: 10px;
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(172, 125, 70, 0.13) 0%, rgba(172, 125, 70, 0) 62%),
    rgba(19, 24, 34, 0.82);
  box-shadow: 0 26px 60px -34px rgba(0, 0, 0, 0.85);
}

/* The wordmark, same component as the header/footer (.hw-logo), just
 * centred and sized down. Reused, not rebuilt — design-director §1. */
#hw-solar .hw-gate-logo, #hw-stpage .hw-gate-logo {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  margin-bottom: 22px;
}
#hw-solar .hw-gate-logo .hw-logo-hoa, #hw-stpage .hw-gate-logo .hw-logo-hoa {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 25px;
  color: #fff;
  line-height: 1;
}
#hw-solar .hw-gate-logo .hw-logo-weekly, #hw-stpage .hw-gate-logo .hw-logo-weekly {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
}

#hw-solar .hw-gate .hw-gate-title, #hw-stpage .hw-gate .hw-gate-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 30px;
  line-height: 1.22;
  color: #fbf9f4;
  margin: 0 auto 14px;
  max-width: 560px;
}
#hw-solar .hw-gate .hw-gate-sub, #hw-stpage .hw-gate .hw-gate-sub {
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-dim);
  margin: 0 auto 26px;
  max-width: 520px;
}
#hw-solar .hw-gate .hw-gate-sub strong, #hw-stpage .hw-gate .hw-gate-sub strong { color: var(--ink); font-weight: 600; }

/* The one button. Gold fill, WHITE text, gold-bright on hover only —
 * design-director §3 rules 1-2. */
#hw-solar .hw-gate a.hw-gate-btn, #hw-stpage .hw-gate a.hw-gate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 260px;
  padding: 15px 30px;
  background: var(--gold);
  color: #fff !important;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  text-decoration: none !important;
  transition: background .15s ease, box-shadow .15s ease, transform .15s ease;
}
#hw-solar .hw-gate a.hw-gate-btn:hover, #hw-stpage .hw-gate a.hw-gate-btn:hover, #hw-solar .hw-gate a.hw-gate-btn:focus-visible, #hw-stpage .hw-gate a.hw-gate-btn:focus-visible {
  background: var(--gold-bright);
  color: #fff !important;
  box-shadow: 0 8px 22px -8px rgba(224, 160, 76, 0.65);
}
#hw-solar .hw-gate a.hw-gate-btn:active, #hw-stpage .hw-gate a.hw-gate-btn:active { transform: translateY(1px); }
#hw-solar .hw-gate a.hw-gate-btn:focus-visible, #hw-stpage .hw-gate a.hw-gate-btn:focus-visible { outline: 2px solid var(--gold-dim); outline-offset: 3px; }

#hw-solar .hw-gate .hw-gate-alt, #hw-stpage .hw-gate .hw-gate-alt {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-dim);
  margin: 18px 0 0;
}
#hw-solar .hw-gate p.hw-gate-alt a, #hw-stpage .hw-gate p.hw-gate-alt a {
  color: var(--gold) !important;
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 2px;
}
#hw-solar .hw-gate p.hw-gate-alt a:hover, #hw-stpage .hw-gate p.hw-gate-alt a:hover { color: var(--gold-bright) !important; }

#hw-solar .hw-gate .hw-gate-fine, #hw-stpage .hw-gate .hw-gate-fine {
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-faint);
  margin: 20px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
}
#hw-solar .hw-gate p.hw-gate-fine a, #hw-stpage .hw-gate p.hw-gate-fine a {
  color: var(--gold) !important;
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 2px;
}
#hw-solar .hw-gate p.hw-gate-fine a:hover, #hw-stpage .hw-gate p.hw-gate-fine a:hover { color: var(--gold-bright) !important; }

/* ── the subscriber's receipt ──────────────────────────────────────────
 * Green, never gold: gold means "buy", green means "you already have
 * it". Shown in place of the card for an entitled visitor. */
#hw-solar .hw-gate-active, #hw-stpage .hw-gate-active {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 34px 0 40px;
  padding: 15px 20px;
  border: 1px solid rgba(113, 183, 132, 0.32);
  border-radius: 6px;
  background: rgba(113, 183, 132, 0.08);
  color: #a9d4b3;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

/* ── TOC lock icons ─────────────────────────────────────────────────
 *
 * A padlock beside every "On this page" entry the visitor cannot reach yet.
 * Which entries those are is decided by the page's own data-hw-premium
 * regions and stamped at build time (stamp_toc_locks in build_site.py), so
 * moving the CTA moves the locks. There is no list of section names here on
 * purpose — if one ever appears, the feature has been broken.
 *
 * Scoped to li.hw-toc-locked so the 1,274 pages that have not opted in keep
 * the plain TOC rows exactly as they are.
 */
#hw-solar .hw-toc-list li.hw-toc-locked, #hw-stpage .hw-toc-list li.hw-toc-locked {
  display: flex;
  align-items: flex-start;
  gap: 7px;
}
/* WHICH ELEMENT IS THE FLEX ITEM DEPENDS ON WHETHER THE GATE RAN.
 *
 * Ungated, the row's direct child is the data-hw-locked-only WRAPPER and
 * .hw-toc-lock sits inside it. Gated, the wrapper is unwrapped and
 * .hw-toc-lock IS the direct child. Putting flex: 0 0 auto only on
 * .hw-toc-lock therefore left the wrapper at its default flex-shrink: 1,
 * and the padlocks squashed to between 7.3px and 13px wide across the rail
 * — narrowest beside the longest headings. Target every direct child so
 * both shapes behave identically. (Measured on the deployment 2026-09-02;
 * a local render could not show it, because locally I had already removed
 * the wrappers by hand.) */
#hw-solar .hw-toc-list li.hw-toc-locked > *, #hw-stpage .hw-toc-list li.hw-toc-locked > * { flex: 0 0 auto; }
#hw-solar .hw-toc-list li.hw-toc-locked > a, #hw-stpage .hw-toc-list li.hw-toc-locked > a { flex: 1 1 auto; min-width: 0; }

#hw-solar .hw-toc-lock, #hw-stpage .hw-toc-lock {
  display: block;
  flex: 0 0 auto;
  /* clears the anchor's 5px top padding so the icon sits on the first line */
  margin-top: 7px;
  line-height: 0;
  /* THE brand gold. --gold-bright is hover-only and never used here. */
  color: var(--gold);
}
#hw-solar .hw-toc-lock svg, #hw-stpage .hw-toc-lock svg {
  display: block;
  width: 13px;
  height: 13px;
  /* the site ships a global svg { max-width: 100% }; inside a shrinking
   * flex item that is what let the icon compress below 13px */
  max-width: none;
}
/* An unlocked section is a quieter fact than a locked one: the subscriber
 * already has it, so the open padlock is a receipt, not a call to action. */
#hw-solar .hw-toc-lock-open, #hw-stpage .hw-toc-lock-open { opacity: 0.55; }

/* ══ WHEN THE GATE HAS NOT RUN, SHOW THE LOCKED STATE ══════════════
 *
 * A deployment without PAYWALL_ENABLED — every branch preview today —
 * serves the page whole. No marker is processed, so the locked AND the
 * unlocked copy of everything survive together and the page contradicts
 * itself: two padlocks on every TOC row, and a green "your pass is active"
 * bar sitting directly above a card asking you to buy that same pass.
 *
 * ONE RULE FOR ALL OF IT. A surviving [data-hw-locked-only] IS the signal
 * that no gate ran: rewrite.js always disposes of it, unwrapping it when
 * locked and deleting it when unlocked, so a gated response never contains
 * one. While one is here, hide every unlocked-only block. LOCKED WINS THE
 * TIE — over-locking is the safe error, and a preview exists to show what
 * an anonymous reader sees.
 *
 * This replaced a narrower adjacent-sibling version that reached only the
 * padlocks: the green bar is authored BEFORE its locked-only counterpart,
 * so sibling order could never have caught it (owner, 2026-09-02). */
body:has([data-hw-locked-only]) [data-hw-unlocked-only] {
  display: none;
}

/* ══ "WHAT YOU UNLOCK" — the sections behind the cut, named ════════
 *
 * Derived at build time from the page's own data-hw-premium regions, the
 * same source the TOC padlocks read (stamp_unlock_list in build_site.py).
 * No section name appears in this file, and none may: move the cut and the
 * list has to move with it.
 *
 * Left-aligned inside a centred card on purpose — a list reads as a list,
 * and centred rows of different lengths read as decoration.
 */
/* ── the full price menu, quietly (owner mockup, 2026-09-03) ─────────
 * The pitch above names the monthly price in bold because that is the
 * decision most readers make. This line exists so the other two ways to
 * buy — annual and the day pass — are not invisible. Deliberately the
 * quietest text in the card: ink-faint, 13px, no weight. It informs a
 * reader who is already interested; it does not compete with the button.
 */
#hw-solar .hw-gate .hw-gate-price, #hw-stpage .hw-gate .hw-gate-price {
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-faint);
  margin: -8px auto 24px;
}

#hw-solar .hw-gate-unlocks, #hw-stpage .hw-gate-unlocks {
  max-width: 420px;
  margin: 4px auto 26px;
  padding: 18px 20px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  text-align: left;
}
#hw-solar .hw-gate-unlocks-kicker, #hw-stpage .hw-gate-unlocks-kicker {
  margin-bottom: 12px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
}
#hw-solar .hw-gate-unlocks-list, #hw-stpage .hw-gate-unlocks-list { list-style: none; }
/* The article stylesheet gives every list item inside a <section> a gold
 * bullet via ::before, and .hw-gate IS a section inside .hw-article-in — so
 * each row shipped with a dot AND a padlock, two markers for one item.
 * list-style: none cannot remove a pseudo-element, and the inherited
 * selector carries more elements than a plain override, hence the extra
 * class here to out-specify it. Caught on the deployment, 2026-09-02. */
#hw-solar .hw-article-in .hw-gate-unlocks-list li::before, #hw-stpage .hw-article-in .hw-gate-unlocks-list li::before { content: none; }
#hw-solar .hw-gate-unlocks-list li, #hw-stpage .hw-gate-unlocks-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 5px 0;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-dim);
}
/* currentColor on the shared padlock: gold here, white on the sticky bar,
 * gold in the rail — one glyph, three homes, no colour duplicated */
#hw-solar .hw-gate-unlocks-list li > svg, #hw-stpage .hw-gate-unlocks-list li > svg {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  max-width: none;
  margin-top: 4px;
  color: var(--gold);
}
#hw-solar .hw-gate-unlocks-more, #hw-stpage .hw-gate-unlocks-more {
  margin-top: 10px;
  font-family: var(--sans);
  font-size: 12.5px;
  font-style: italic;
  color: var(--ink-faint);
}

@media (max-width: 720px) {
  #hw-solar .hw-gate-unlocks, #hw-stpage .hw-gate-unlocks { padding: 15px 16px; margin-bottom: 22px; }
  #hw-solar .hw-gate-unlocks-list li, #hw-stpage .hw-gate-unlocks-list li { font-size: 13.5px; }
}

/* ══ THE STICKY BOTTOM CTA BAR (owner, 2026-09-02) ═════════════════
 *
 * Appears once the gate card has been scrolled into view and then stays for
 * the rest of the pageview. Opt-in per page (data-hw-cta-bar), injected by
 * the build, revealed by /assets/js/ctabar.js.
 *
 * NO DISMISS CONTROL EXISTS, and none may be added — owner-directed, the
 * same ruling the legal disclaimer bar carries (design-director §3 rule 17).
 * Nothing here reads or writes storage either, so navigating away resets it.
 *
 * SCOPED UNDER #hw-solar, AND INJECTED INSIDE IT. Those two facts have to
 * agree, and twice they did not. First the bar was stamped at body start with
 * these rules written as descendants of #hw-solar: nothing matched, and it
 * deployed unstyled and permanently visible. Then the rules were loosened to
 * body:has(#hw-solar) — and the background was STILL transparent, because
 * ls_evergreen.css declares --gold, --bg and the rest ON #hw-solar. Outside
 * that element var(--gold) is not gold, it is invalid. Both measured on the
 * deployment (2026-09-02); neither was visible locally.
 *
 * COLOUR, and the one deviation worth naming. The bar is THE brand gold with
 * white text, matching the notice bar at the top of every page. Its button
 * cannot also be .hw-btn-gold — gold on gold is invisible — so it inverts to
 * the page's own background token with white text, which is 18:1 against
 * white and uses no colour that is not already canon. That is the only
 * departure from "primary action gets gold".
 */
#hw-solar .hw-ctabar, #hw-stpage .hw-ctabar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  /* under the notice bar's 2000: that one is a legal requirement and wins
   * every stacking argument */
  z-index: 1900;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 14px 22px;
  background: var(--gold);
  border-top: 1px solid rgba(0, 0, 0, 0.18);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.35);
  /* hidden until ctabar.js has seen the card, and inert while hidden */
  visibility: hidden;
  transform: translateY(100%);
  transition: transform 0.32s ease-out, visibility 0s linear 0.32s;
}
html.hw-ctabar-on #hw-solar .hw-ctabar, html.hw-ctabar-on #hw-stpage .hw-ctabar {
  visibility: visible;
  transform: none;
  transition: transform 0.32s ease-out, visibility 0s;
}
/* the bar overlays the page, so give the content room to clear it */
html.hw-ctabar-on #hw-solar, html.hw-ctabar-on #hw-stpage { padding-bottom: 78px; }

#hw-solar .hw-ctabar-text, #hw-stpage .hw-ctabar-text {
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.35;
  /* text on any gold background is white — design-director §3 rule 2 */
  color: #fff;
}
#hw-solar .hw-ctabar-text strong, #hw-stpage .hw-ctabar-text strong { font-weight: 700; color: #fff; }

#hw-solar a.hw-ctabar-btn, #hw-stpage a.hw-ctabar-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 4px;
  background: var(--bg);
  color: #fff;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.15s ease;
}
#hw-solar a.hw-ctabar-btn:hover, #hw-stpage a.hw-ctabar-btn:hover, #hw-solar a.hw-ctabar-btn:focus-visible, #hw-stpage a.hw-ctabar-btn:focus-visible { background: #05070b; }
/* currentColor, so the one padlock definition is white here and gold in
 * the TOC rail without either place owning a colour the other must match */
#hw-solar a.hw-ctabar-btn svg, #hw-stpage a.hw-ctabar-btn svg {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  max-width: none;
  /* the caps label sits slightly high against a symmetrical glyph */
  margin-top: -1px;
}

@media (prefers-reduced-motion: reduce) {
  #hw-solar .hw-ctabar, #hw-stpage .hw-ctabar { transition: none; }
  html.hw-ctabar-on #hw-solar .hw-ctabar, html.hw-ctabar-on #hw-stpage .hw-ctabar { transition: none; }
}

@media (max-width: 720px) {
  #hw-solar .hw-ctabar, #hw-stpage .hw-ctabar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  }
  #hw-solar .hw-ctabar-text, #hw-stpage .hw-ctabar-text { font-size: 13.5px; text-align: center; }
  #hw-solar a.hw-ctabar-btn, #hw-stpage a.hw-ctabar-btn { text-align: center; padding: 12px 18px; }
  html.hw-ctabar-on #hw-solar, html.hw-ctabar-on #hw-stpage { padding-bottom: 132px; }
}

/* ── responsive ────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  #hw-solar .hw-gate, #hw-stpage .hw-gate { margin: -72px 0 44px; padding-top: 104px; }
  #hw-solar .hw-gate::before, #hw-stpage .hw-gate::before { height: 104px; }
  #hw-solar .hw-gate-card, #hw-stpage .hw-gate-card { padding: 34px 22px 30px; }
  #hw-solar .hw-gate .hw-gate-title, #hw-stpage .hw-gate .hw-gate-title { font-size: 24px; }
  #hw-solar .hw-gate .hw-gate-sub, #hw-stpage .hw-gate .hw-gate-sub { font-size: 15px; }
  #hw-solar .hw-gate a.hw-gate-btn, #hw-stpage .hw-gate a.hw-gate-btn { min-width: 0; width: 100%; }
}

/* ══ THE PAYMENT-FAILED BANNER (moved here from ls_paywall.css, CP-6) ═══
 * The edge injects this into every gated page's [data-hw-pastdue] slot when
 * a subscriber's card fails (rewrite.js pastDueBannerHtml). It lived in
 * ls_paywall.css, which article pages otherwise only loaded for the PARKED
 * Q&A model — 32 rules for markup no article page carries. Dropping that
 * link would have left this banner unstyled for the one audience we most
 * need to reach: a paying subscriber whose payment just failed. So the four
 * rules move here, to the stylesheet the CTA component owns, and the link
 * goes.
 *
 * Clay, not gold and not red: this needs attention, but the customer still
 * HAS access. Gold would misread as a sales panel, red as "you're locked
 * out". */
#hw-solar .hw-pastdue, #hw-stpage .hw-pastdue {border:1px solid rgba(198,110,86,.32);background:rgba(198,110,86,.08);color:#e0a891;border-radius:6px;padding:14px 18px;margin:0 0 26px;font-size:14px;line-height:1.6}
#hw-solar .hw-pastdue strong, #hw-stpage .hw-pastdue strong {color:#f0c4b3;font-weight:600}
#hw-solar .hw-pastdue a, #hw-stpage .hw-pastdue a {color:var(--gold);text-decoration:underline;text-underline-offset:2px}
#hw-solar .hw-pastdue a:hover, #hw-stpage .hw-pastdue a:hover {color:var(--gold-bright)}
