/* comeback.tansolutions.org: header, menu and footer (redesign phase 2, 14 Nov 2026).
   Loaded on every page right after /brand/brand.css, which stays byte-identical to design/brand.css (pinned by
   design/brand.sha256 and shared with the studio site). Tokens only from brand.css; no new colours. */

/* ---------- Header: the install button at every width ---------- */
.site-header .header-end .header-cta { display: inline-flex; }
.header-cta .cta-full, .header-cta .cta-tiny { display: none; }
.lang { min-height: 2.75rem; display: inline-flex; align-items: center; }
.nav a[aria-current="true"] { color: var(--ink); }

/* Phones: lockup, install, menu. The language link moves into the menu (and stays in the footer). German keeps this
   layout up to 36rem, where its longer labels would otherwise overflow the row. */
@media (max-width: 29.99rem) {
  .header-bar, .header-end { gap: var(--s-2); }
  .header-end .lang { display: none; }
  .header-cta .cta-short:not(:last-child) { display: none; }
  .header-cta .cta-tiny { display: inline; }
  .site-header .header-cta { padding-inline: 0.75rem; }
  /* The menu button keeps its name for screen readers and shows the three bars only. */
  .menu-button { width: 2.75rem; padding: 0; justify-content: center; }
  .menu-button .menu-label {
    position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
  }
}
@media (min-width: 30rem) and (max-width: 35.99rem) {
  .site-header-long .header-bar, .site-header-long .header-end { gap: var(--s-2); }
  .site-header-long .header-end .lang { display: none; }
  .site-header-long .header-cta .cta-short:not(:last-child) { display: none; }
  .site-header-long .header-cta .cta-tiny { display: inline; }
  .site-header-long .menu-button { width: 2.75rem; padding: 0; justify-content: center; }
  .site-header-long .menu-button .menu-label {
    position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
  }
}
/* 320-360 px: the endorsement line shows in the footer only, so the install button keeps its row. */
@media (max-width: 22.5rem) {
  .header-bar, .header-end { gap: var(--s-1); }
  .site-header .header-cta { padding-inline: 0.5rem; }
  .header-bar .lockup-by { display: none; }
}
/* Wide screens: the full label, "Install free on Shopify". */
@media (min-width: 80rem) {
  .header-cta .cta-short { display: none; }
  .header-cta .cta-full { display: inline; }
}
/* German between 64 and 70rem: the menu button replaces the long nav, the install button stays. */
@media (min-width: 64rem) and (max-width: 69.99rem) {
  .site-header-long .header-end .header-cta { display: inline-flex; }
}

/* ---------- Menu (native popover): each destination says what it holds ---------- */
.menu .menu-main a:not(.btn) { display: grid; gap: 0.125rem; align-content: center; min-height: 3.5rem; padding-block: var(--s-2); }
.menu .menu-title { font-size: var(--t-lg); font-weight: 700; line-height: 1.2; }
.menu .menu-desc { font-size: var(--t-sm); font-weight: 400; color: var(--ink-2); line-height: 1.4; }
.menu a[aria-current="true"] .menu-title { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 0.3em; }
.menu a[aria-current="page"] { text-decoration: none; }
.menu a[aria-current="page"] .menu-title { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 0.3em; }
.menu .actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.menu .menu-more { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-5); margin-top: var(--s-5); padding-top: var(--s-4); border-top: 1px solid var(--line); }
.menu .menu-more li + li { border-top: 0; }
.menu .menu-more a:not(.btn) { min-height: 2.75rem; font-size: var(--t-md); font-weight: 600; color: var(--ink-2); }
.menu .menu-more a:not(.btn):hover { color: var(--ink); }
@media (min-width: 40rem) {
  .menu .menu-main { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s-6); }
  .menu .menu-main li + li { border-top: 0; }
  .menu .menu-main li { border-bottom: 1px solid var(--line); }
  .menu .btn { flex: 0 1 auto; }
}

/* ---------- Footer: brand, then Product, Help, Legal, Company ---------- */
.footer-col { min-width: 0; }
.footer-col a { color: var(--ink-2); text-decoration: none; }
.footer-col a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.footer-col ul { gap: var(--s-1); }
.footer-col li > a { display: inline-flex; align-items: center; min-height: 2rem; }
.footer-sibling { gap: var(--s-2); align-items: flex-start !important; padding-block: 0.25rem; }
.footer-sibling .tile { flex: none; width: 1.25rem; height: 1.25rem; margin-top: 0.125rem; }
.footer-sibling > span { display: grid; gap: 0.125rem; }
.footer-sibling-name { font-weight: 600; color: var(--ink); }
.footer-sibling-desc { font-size: var(--t-xs); line-height: 1.4; color: var(--ink-2); }
.footer-col a[data-consent-open] { text-decoration: underline; text-underline-offset: 2px; }
@media (min-width: 40rem) and (max-width: 63.99rem) {
  .footer-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 64rem) {
  .footer-grid { grid-template-columns: minmax(0, 1.4fr); grid-auto-columns: minmax(0, 1fr); }
}
.footer-base { margin-top: var(--s-7); padding-top: var(--s-4); border-top: 1px solid var(--line); }
.footer-lang { display: flex; gap: var(--s-4); margin: 0; padding: 0; list-style: none; font-weight: 600; }
.footer-lang a { color: var(--ink-2); }
.footer-lang [aria-current] { color: var(--ink); }

/* ---------- Hero grammar, shared by the home and the product pages (redesign phase 3, 14 Nov 2026) ----------
   docs/specs/site-redesign-2026-11-14.md §3.1/§4: category line, H1, lead, one primary action, true facts, and the
   real screen on the berry-tint stage with the Comeback glyph and two code-rendered outcome cards. Moved here from
   home.css (same rules, loaded earlier, so the home renders as before). */
/* The Comeback glyph drawn large on a berry-tint stage, cropped by the stage edges, behind the real screen. */
.hero-stage { position: relative; overflow: hidden; isolation: isolate; background: var(--accent-tint); padding: clamp(1rem, 0.4rem + 2.4vw, 2.75rem); }
/* The art layer clips the glyph itself, so the stage never overflows (WCAG 1.4.12 check) and no glyph part sits past the viewport at 320-390 px. */
.stage-art { position: absolute; inset: 0; z-index: -1; overflow: hidden; border-radius: inherit; pointer-events: none; }
.stage-glyph { position: absolute; width: 104%; height: auto; right: -34%; top: -10%; opacity: 0.16; }
.hero-stage .product-frame { z-index: 1; }
/* Three true facts under the install button, each with the "ok" check mark. */
.hero-facts { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin: 0; padding: 0; list-style: none; font-size: var(--t-sm); font-weight: 600; color: var(--ink); }
.hero-facts li { display: inline-flex; align-items: center; gap: 0.45rem; }
.hero-facts .fact-icon { flex: none; width: 1.05rem; height: 1.05rem; color: var(--ok); }
/* Two outcome cards that quote the real screen's numbers: a row under the frame, lifted over its lower edge at 64rem+. */
.hero-cards { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); margin: var(--s-4) 0 0; padding: 0; list-style: none; }
.outcome-card { display: grid; gap: 0.15rem; align-content: start; padding: 0.7rem 0.95rem 0.8rem; border-radius: var(--r-lg); background: var(--paper); box-shadow: var(--shadow-frame); font-size: var(--t-sm); line-height: 1.35; }
.outcome-card b { display: flex; align-items: center; gap: 0.45rem; color: var(--accent-deep); }
.outcome-card b::before { content: ""; flex: none; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--accent); }
.outcome-card span { color: var(--ink); font-weight: 600; }
@media (min-width: 64rem) {
  .hero-cards { grid-template-columns: repeat(2, minmax(0, 12rem)); justify-content: end; margin: -1.75rem var(--s-4) 0 0; }
}

/* Product page heroes (.hero-page: how it works, demo, EU withdrawal EN/DE, the German landing pages). Below 64rem
   the copy and the primary action come before the visual (brand.css puts the visual after the H1, which pushed the
   install button under the consent bar at 390 and 768 px). */
.hero-page h1 { hyphens: manual; }
.hero-page .hero-copy > .crumbs { margin: 0; }
.hero-page .actions { align-items: center; gap: var(--s-3) var(--s-5); }
.hero-link { display: inline-block; padding-block: 0.6rem; font-weight: 700; }
.hero-page .hero-product .pf-phone { max-width: 22rem; margin-inline: auto; }
@media (max-width: 63.99rem) {
  .hero-page .hero-copy > * { order: 6; }
  .hero-page .hero-copy > .crumbs { order: 1; }
  .hero-page .hero-copy > h1 { order: 2; max-width: 16ch; }
  .hero-page .hero-copy > .lead { order: 3; }
  .hero-page .hero-copy > .actions { order: 4; }
  .hero-page .hero-copy > .hero-facts { order: 5; }
  .hero-page .hero-product { order: 7; margin-top: var(--s-4); }
}
@media (max-width: 39.99rem) {
  .hero-page .lead { font-size: var(--t-md); line-height: 1.5; }
  .hero-page .hero-facts { flex-direction: column; gap: var(--s-2); }
}
@media (min-width: 64rem) {
  .hero-page .hero-copy { display: grid; gap: var(--s-5); align-content: start; }
  .hero-page .hero-copy > * { margin: 0; }
}
/* A product hero with no visual (phase 4: pricing, compare, alternatives): one column, the lead held to a reading width. */
.hero-solo .hero-copy > .lead { max-width: 60ch; }
@media (min-width: 64rem) {
  .hero-page.hero-solo .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-page.hero-solo h1 { max-width: 22ch; }
}
/* Lines on every plan card under the cap ("$0 per return"): the ok tick, ink text (pricing.mjs cardLines). */
.plan-line { display: flex; align-items: center; gap: 0.45rem; margin: 0; font-weight: 700; color: var(--ink); }
/* Four across: hold the allowance to two lines so every card's tick line and list start at one height. */
@media (min-width: 72rem) { .plan .plan-cap { min-height: calc(2 * 1.5em); } }
/* Calculator: inputs share a baseline when one field carries a hint. */
.calc-fields { align-items: end; }
.plan-line .fact-icon { flex: none; width: 1.05rem; height: 1.05rem; color: var(--ok); }
/* A tall phone capture shown from its top (how it works): CSS crop only, the pixels stay untouched (D115.20). */
.hero-page .pf-crop { aspect-ratio: 4 / 5; overflow: hidden; }
.hero-page .pf-crop img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
/* How it works: each step as a row, the text first and its real screens beside it from 64rem. */
.how-flow { padding-block: var(--s-7) var(--section); }
.how-flow > .fine { margin: 0 0 var(--s-5); }
.how-row { display: grid; gap: var(--s-5); padding-block: var(--s-7); border-top: 1px solid var(--line); }
.how-row .prose { max-width: 40rem; }
.how-row .prose > h2:first-child { margin-top: 0; }
.how-shots { display: grid; gap: var(--s-5); justify-items: center; align-content: start; }
.how-shots .shot-fig { margin: 0; width: 100%; max-width: 24rem; }
@media (min-width: 64rem) {
  .how-row { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s-8); align-items: start; }
}

/* ---------- Code blocks (help 13's Analytics query, 15 Nov 2026) ----------
   brand.css styles inline code only. A query block wraps at phone widths instead of pushing the page sideways
   (390 px overflow, consent-overlap check). Soft wraps add no line breaks, so a copied query stays exact. */
pre { margin: 1rem 0; padding: 0.75rem 1rem; background: var(--paper-2); border-radius: var(--r-sm); font-family: var(--mono); font-size: 0.875rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; max-width: 100%; }
pre code { padding: 0; background: none; font-size: inherit; }
