/* Black Friday 2026 on the marketing site. Linked only while the sale is on
   for this visitor (lib/promo/black-friday-site.ts); every color is a
   site.css token. */

:root { --bf-h: calc(44px + env(safe-area-inset-top, 0px)); }
@media (max-width: 759px) {
  :root { --bf-h: calc(64px + env(safe-area-inset-top, 0px)); }
}

/* the strip: sticky above the nav, which moves down by its height */
.bf-strip {
  position: sticky; top: 0; z-index: 25;
  padding: env(safe-area-inset-top, 0px) var(--pad) 0;
  background: var(--ink); color: var(--on-dark);
  border-bottom: 1px solid var(--dark-line);
}
body:has(> .bf-strip) .nav { top: var(--bf-h); padding-top: 0; }
body:has(> .bf-strip) [id] { scroll-margin-top: calc(80px + var(--bf-h)); }
body:has(> .bf-strip) .menu { max-height: calc(100dvh - 66px - var(--bf-h)); }
.bf-in {
  position: relative; max-width: var(--max); margin-inline: auto; min-height: 44px;
  display: flex; align-items: center; justify-content: center; gap: 6px 18px;
  font-size: 14px; line-height: 1.3;
}
.bf-strip p { margin: 0; }
.bf-msg { min-width: 0; font-weight: 600; color: var(--on-dark); }
.bf-tag { color: var(--green-bright); font-weight: 800; }
.bf-cd { display: inline-flex; align-items: baseline; gap: 8px; color: var(--dtext); white-space: nowrap; }
.bf-cd-l { font-size: 13px; }
.bf-clock { font: 700 14px/1 var(--mono); font-variant-numeric: tabular-nums; color: var(--on-dark); }
.bf-go {
  display: inline-flex; align-items: center; min-height: 32px; padding: 0 14px; border-radius: 999px;
  background: var(--green-bright); color: var(--ink); font-weight: 800; font-size: 13px;
  text-decoration: none; white-space: nowrap;
}
/* the whole strip is the link's tap target */
.bf-go::after { content: ""; position: absolute; inset: 0; }
.bf-go:hover { filter: brightness(1.06); }
.bf-go:focus-visible { outline: none; }
.bf-go:focus-visible::after { outline: 2px solid var(--green-bright); outline-offset: -3px; border-radius: 6px; }
.bf-sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
@media (max-width: 759px) {
  .bf-in {
    min-height: 64px; padding-block: 6px;
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 10px;
    font-size: 13px;
  }
  .bf-msg { grid-column: 1 / -1; }
  .bf-cd { grid-column: 1; grid-row: 2; }
  .bf-cd-l { font-size: 12px; }
  .bf-clock { font-size: 13px; }
  .bf-go { grid-column: 2; grid-row: 2; padding: 0 12px; }
}

/* the head over the plan cards (#black-friday) */
.bf-head {
  max-width: 980px; margin: 0 auto 20px; padding: clamp(22px, 3vw, 34px);
  border-radius: 26px; background: var(--ink); color: var(--on-dark);
  display: flex; flex-direction: column; gap: 10px;
  box-shadow: inset 0 0 0 1px var(--dark-line);
}
.bf-kick { align-self: flex-start; font-size: 13px; font-weight: 800; color: var(--ink); background: var(--green-bright); border-radius: 999px; padding: 6px 12px; }
.bf-h { margin: 0; font-size: clamp(28px, 3.6vw, 44px); font-weight: 900; letter-spacing: -0.04em; line-height: 1.02; }
.bf-sub { margin: 0; font-size: 16px; line-height: 1.5; color: var(--dtext); }
.bf-cd-head { margin: 2px 0 0; }
.bf-cd-head .bf-clock { font-size: 18px; color: var(--green-bright); }

/* a plan card in its sale state (classes added by black-friday.js) */
.card.bf .billing[hidden] { display: none; }
.card.bf .amt { align-items: baseline; }
.card.bf .bf-was { font-size: clamp(26px, 3vw, 34px); font-weight: 700; letter-spacing: -0.02em; text-decoration-thickness: 3px; }
.card.main .bf-was { color: var(--dtext-3); }
.card.alt .bf-was { color: var(--muted); }
.bf-terms { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: 16px; font-weight: 700; }
.bf-save { font-size: 13px; font-weight: 800; border-radius: 999px; padding: 5px 10px; white-space: nowrap; }
.card.main .bf-save { color: var(--ink); background: var(--green-bright); }
.card.alt .bf-save { color: var(--on-dark); background: var(--green); }
.card.bf .btn { white-space: normal; text-align: center; line-height: 1.2; min-height: 52px; height: auto; padding-block: 10px; }
.bf-alt { align-self: center; display: inline-flex; align-items: center; min-height: 44px; margin-top: -10px; font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.card.main .bf-alt { color: var(--dtext); }
.card.alt .bf-alt { color: var(--body); }
.bf-alt:hover { color: inherit; }

/* the compare table's first row */
.tbl tr.bf-row th, .tbl tr.bf-row td { background: var(--green-tint); }
.tbl tr.bf-row th { padding-left: 12px; }
.tbl tr.bf-row td b { color: var(--ink); }

@media (prefers-reduced-motion: no-preference) {
  .bf-tag::before {
    content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%;
    background: var(--green-bright); vertical-align: 1px; animation: bf-pulse 1.6s ease-in-out infinite;
  }
  @keyframes bf-pulse { 50% { opacity: 0.35; } }
}
@media print { .bf-strip { position: static; } }
