/* Shared logo + brand-color restyle for the card-pack hub and program pages.
   Tokens follow the homepage redesign. */
body.brand-restyle{
  --bg:#f6f7fb;
  --card:#fff;
  --ink-page:#111827;
  --muted:#6b7280;
  --line:#eceef3;
  --brand2:#2563eb;
  --radius:18px;
  background:var(--bg);
  color:var(--ink-page);
}
body.brand-restyle .nav{
  background:#fff;
  box-shadow:none;
  border-bottom:1px solid var(--line);
}

/* ---- Program and hub heroes ---- */
body.brand-restyle .phero{
  position:relative;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--brand, var(--ink, var(--brand2))) 12%, #fff) 0%, #fff 72%);
  border-bottom:0;
}
body.brand-restyle .phero:before{
  content:"";
  display:block;
  height:6px;
  background:var(--brand, var(--ink, var(--brand2)));
}
body.brand-restyle .phero .wrap{padding-top:22px;padding-bottom:28px}
body.brand-restyle .phero h1{
  letter-spacing:-.03em;
  font-weight:750;
  color:var(--ink-page);
}
body.brand-restyle .brand-hero-logo{
  width:56px;
  height:56px;
  border-radius:16px;
  background:#fff;
  border:1px solid color-mix(in srgb, var(--brand, var(--ink, var(--brand2))) 28%, #e5e7eb);
  box-shadow:0 8px 20px color-mix(in srgb, var(--brand, var(--ink, var(--brand2))) 16%, transparent);
  overflow:hidden;
}
body.brand-restyle .brand-hero-logo img{
  width:40px;
  height:40px;
  object-fit:contain;
}
body.brand-restyle .phero .eyebrow{
  color:var(--brand, var(--ink, var(--brand2)));
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
}

/* ---- Program offer cards ---- */
body.brand-restyle .offer-card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  border-top:4px solid var(--brand, var(--ink, var(--brand2)));
  box-shadow:0 10px 28px rgba(17,24,39,.06);
  padding:18px 18px 16px;
}
body.brand-restyle .offer-kicker-row{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:10px;
}
body.brand-restyle .offer-brand{
  width:40px;
  height:40px;
  border-radius:12px;
  background:color-mix(in srgb, var(--brand, var(--ink, var(--brand2))) 10%, #fff);
  border:1px solid color-mix(in srgb, var(--brand, var(--ink, var(--brand2))) 22%, #e5e7eb);
  display:grid;
  place-items:center;
  overflow:hidden;
}
body.brand-restyle .offer-brand img{width:28px;height:28px;object-fit:contain;display:block}
body.brand-restyle .offer-kicker{
  font-weight:750;
  color:var(--brand, var(--ink, var(--brand2)));
  margin:0;
}
body.brand-restyle .offer-benefit{
  font-size:17px;
  font-weight:650;
  letter-spacing:-.02em;
  line-height:1.35;
  color:var(--ink-page);
}
body.brand-restyle .offer-card .btn.primary.offer-go,
body.brand-restyle .offer-actions .btn.primary{
  background:var(--brand, var(--ink, #111827));
  border-color:var(--brand, var(--ink, #111827));
  color:#fff;
}
body.brand-restyle .offer-card.is-light .btn.primary.offer-go,
body.brand-restyle .offer-card.is-light .offer-actions .btn.primary,
body.brand-restyle.is-light .offer-card .btn.primary.offer-go{
  color:#111827;
}
body.brand-restyle .code-pill{
  border-color:color-mix(in srgb, var(--brand, var(--ink, var(--brand2))) 28%, #e5e7eb);
  background:color-mix(in srgb, var(--brand, var(--ink, var(--brand2))) 8%, #fff);
}
body.brand-restyle .panel{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:0 8px 24px rgba(17,24,39,.04);
}

/* ---- Hub app cards ---- */
.hub-logo-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:16px 0 0;
  align-items:center;
}
.hub-logo-row img,
.hub-logo-row .app-fallback{
  width:36px;
  height:36px;
  border-radius:10px;
  background:#fff;
  border:1px solid var(--line);
  object-fit:contain;
  box-shadow:0 2px 8px rgba(17,24,39,.06);
}
.app-offer-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:14px;
  margin:0 0 8px;
}
@media (min-width:720px){
  .app-offer-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
}
@media (min-width:1024px){
  .app-offer-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
.app-offer-card{
  --brand:var(--ink, var(--brand2));
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  border-top:4px solid var(--brand);
  box-shadow:0 10px 28px rgba(17,24,39,.05);
  padding:16px 16px 12px;
  display:flex;
  flex-direction:column;
  min-width:0;
}
.app-offer-head{
  display:flex;
  gap:12px;
  align-items:flex-start;
  margin:0 0 12px;
}
.app-offer-logo,
.app-fallback{
  width:44px;
  height:44px;
  border-radius:12px;
  background:color-mix(in srgb, var(--brand) 12%, #fff);
  border:1px solid color-mix(in srgb, var(--brand) 22%, #e5e7eb);
  object-fit:contain;
  flex:none;
}
.app-fallback{
  display:grid;
  place-items:center;
  font-weight:800;
  font-size:18px;
  color:#fff;
  background:var(--brand);
  border-color:var(--brand);
}
.app-offer-head h3{
  margin:0;
  font-size:16px;
  letter-spacing:-.02em;
  line-height:1.2;
}
.app-offer-head h3 a{color:var(--ink-page);text-decoration:none}
.app-offer-head h3 a:hover{color:var(--brand)}
.app-offer-headline{
  margin:4px 0 0;
  font-size:15px;
  font-weight:650;
  letter-spacing:-.02em;
  line-height:1.35;
  color:var(--ink-page);
}
.app-offer-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  margin-top:auto;
}
.app-offer-actions .btn.primary.offer-go{
  background:var(--brand);
  border-color:var(--brand);
  color:#fff;
  min-height:42px;
}
.app-offer-card.is-light .btn.primary.offer-go{color:#111827}
.app-offer-actions .code-pill{
  min-height:42px;
}
.app-offer-details{
  margin:12px 0 0;
  border-top:1px solid var(--line);
  padding-top:8px;
}
.app-offer-details summary{
  cursor:pointer;
  font-weight:700;
  font-size:13px;
  color:var(--brand);
  list-style:none;
  padding:8px 0;
  min-height:44px;
  display:flex;
  align-items:center;
}
.app-offer-details summary::-webkit-details-marker{display:none}
.app-offer-details summary:after{
  content:"+";
  margin-left:auto;
  font-weight:700;
  color:var(--muted);
}
.app-offer-details[open] summary:after{content:"–"}
.app-offer-details dl{
  margin:0 0 10px;
}
.app-offer-details dt{
  font-size:12px;
  font-weight:750;
  text-transform:uppercase;
  letter-spacing:.03em;
  color:var(--muted);
  margin:10px 0 3px;
}
.app-offer-details dd{
  margin:0;
  font-size:14px;
  line-height:1.55;
  color:var(--ink-page);
}
.app-offer-details a{color:var(--brand2)}

/* ---- Compact comparison table ---- */
.compact-compare-wrap{
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
}
table.compact-compare{
  width:100%;
  border-collapse:collapse;
  min-width:640px;
  font-size:14px;
}
table.compact-compare th,
table.compact-compare td{
  padding:10px 12px;
  text-align:left;
  border-bottom:1px solid var(--line);
  vertical-align:top;
}
table.compact-compare thead th{
  position:sticky;
  top:0;
  background:#f8fafc;
  font-size:12px;
  letter-spacing:.03em;
  text-transform:uppercase;
  color:#4b5563;
  white-space:nowrap;
}
table.compact-compare th[data-sort-key]{
  cursor:pointer;
  user-select:none;
}
table.compact-compare th[data-sort-key]:hover{color:#111827}
table.compact-compare th[aria-sort="ascending"]:after{content:" ↑"}
table.compact-compare th[aria-sort="descending"]:after{content:" ↓"}
table.compact-compare tbody tr:hover{background:#f9fafb}
table.compact-compare .cmp-app{
  display:flex;
  gap:8px;
  align-items:center;
  font-weight:700;
  color:inherit;
  text-decoration:none;
}
table.compact-compare .cmp-app img,
table.compact-compare .app-fallback{
  width:24px;
  height:24px;
  border-radius:6px;
}
table.compact-compare code{
  font-size:12px;
  background:#f3f4f6;
  padding:2px 6px;
  border-radius:6px;
}
@media (max-width:719px){
  body.brand-restyle .phero .wrap{padding-top:16px;padding-bottom:20px}
  body.brand-restyle .brand-hero-logo{width:48px;height:48px;border-radius:14px}
  .app-offer-actions{flex-direction:column;align-items:stretch}
  .app-offer-actions .btn,
  .app-offer-actions .code-pill{width:100%;justify-content:center}
  table.compact-compare{min-width:0;font-size:13px}
  .compact-compare-wrap{border:0;background:transparent}
  table.compact-compare thead{display:none}
  table.compact-compare,
  table.compact-compare tbody,
  table.compact-compare tr,
  table.compact-compare td{display:block;width:100%}
  table.compact-compare tr{
    border:1px solid var(--line);
    border-radius:14px;
    background:#fff;
    margin:0 0 10px;
    padding:8px 10px;
    box-shadow:0 4px 14px rgba(17,24,39,.04);
  }
  table.compact-compare td{
    border:0;
    padding:6px 0;
    display:flex;
    gap:10px;
    justify-content:space-between;
  }
  table.compact-compare td:before{
    content:attr(data-label);
    font-size:11px;
    font-weight:750;
    letter-spacing:.03em;
    text-transform:uppercase;
    color:var(--muted);
    flex:none;
    max-width:42%;
  }
  table.compact-compare td:first-child{padding-top:4px}
}

body.brand-restyle .panel, body.brand-restyle .phero, body.brand-restyle #codes, body.brand-restyle #compare{scroll-margin-top:72px}

/* Offer banners and trust chips (Nov 16, 2026 offer-clarity pass) */
.offer-banner{
  display:block;
  margin:16px 0 0;
  padding:12px 16px;
  border-radius:14px;
  background:var(--brand,#4338ca);
  color:#fff;
  font-size:clamp(17px,2.5vw,23px);
  font-weight:800;
  line-height:1.3;
  letter-spacing:-0.02em;
  box-shadow:0 8px 22px rgba(67,56,202,.22);
}
.offer-banner.is-ended{
  background:#4b5563;
  box-shadow:none;
}
.trust-chips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:12px 0 0;
  padding:0;
  list-style:none;
}
.trust-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  border-radius:999px;
  padding:6px 11px;
  font-size:12px;
  font-weight:700;
  line-height:1.3;
  background:color-mix(in srgb, var(--brand,#4338ca) 12%, #fff);
  color:var(--ink,#122033);
  border:1px solid color-mix(in srgb, var(--brand,#4338ca) 28%, #d5d9e2);
}
.trust-chip[hidden]{display:none !important}
.trust-line-best{
  margin:10px 0 0;
  font-size:13px;
  color:var(--muted,#5b6b80);
  line-height:1.45;
  max-width:70ch;
}


.offer-caveat{
  margin:8px 0 16px;
  font-size:13px;
  color:var(--muted,#5b6b80);
  line-height:1.5;
  max-width:70ch;
}


/* Nov 16 audit: brand-colored text darkened so light brand colors (lime, cyan, yellow) still pass WCAG AA on white */
body.brand-restyle main a:not(.btn):not(.offer-go):not(.code-pill),
body.brand-restyle .phero a,
body.brand-restyle .other-options a,
body.brand-restyle .roundup-rec a,
body.brand-restyle .back a,
body.brand-restyle .offer-kicker,
body.brand-restyle .trust-chip,
body.brand-restyle .app-offer-details summary{color:color-mix(in srgb,var(--brand,#4338ca) 45%,#0b1020)}
body.brand-restyle .phero .eyebrow{color:color-mix(in srgb,var(--brand,#4338ca) 45%,#0b1020)!important}
/* brand colors are pre-darkened in page HTML so white button text passes AA */
body.brand-restyle .offer-card.is-light .offer-actions .btn.primary,
body.brand-restyle.is-light .offer-card .btn.primary.offer-go{color:#fff}


/* Growth pass Nov 16, 2026: expiring banners, claim bar, offer labels */
.offer-banner-source{
  margin:8px 0 0;
  font-size:13px;
  line-height:1.5;
  color:#334155;
}
.offer-banner-source a{font-weight:650}
.offer-benefit{
  margin:10px 0 0;
  font-size:clamp(16px,2.2vw,20px);
  font-weight:750;
  line-height:1.35;
  letter-spacing:-0.02em;
}
/* Reserve space on program pages so the fixed mobile claim bar does not shift layout. */
@media (max-width:720px){
  main.page{
    padding-bottom:calc(92px + env(safe-area-inset-bottom, 0px));
  }
}
.claim-bar{
  display:none;
}
@media (max-width:720px){
  .claim-bar{
    display:flex;
    position:fixed;
    left:0;
    right:0;
    bottom:0;
    z-index:40;
    gap:8px;
    align-items:stretch;
    padding:10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    background:#0f172a;
    color:#fff;
    box-shadow:0 -8px 24px rgba(15,23,42,.28);
  }
  .claim-bar[hidden]{display:none}
  .claim-bar .claim-bar-copy,
  .claim-bar .claim-bar-go{
    flex:1 1 0;
    min-height:44px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:12px;
    font-size:15px;
    font-weight:750;
    text-decoration:none;
    border:0;
    cursor:pointer;
  }
  .claim-bar .claim-bar-copy{
    background:#fff;
    color:#0f172a;
  }
  .claim-bar .claim-bar-go{
    background:var(--brand,#4338ca);
    color:#fff;
  }
  .claim-bar .claim-bar-copy:focus-visible,
  .claim-bar .claim-bar-go:focus-visible{
    outline:3px solid #93c5fd;
    outline-offset:2px;
  }
}
@media (min-width:721px){
  .claim-bar{display:none !important}
}
