/* ==========================================================================
   KÁRMÁN · paywall.css — "Show them what's behind the door"
   Direction: the night page, a big amber headline, and three real-looking
   things Unlimited opens, laid on the table like paper from the hangar:
   the punched run card, the archive calendar, the four liveries. Each gets a
   short caption with a live number. One ticket to buy; everything else quiet.
   Palette: night navy (60) · cream paper + navy ink (30) · amber/vermilion (10).
   Type: Big Shoulders (headline, captions), Instrument Serif italic (the
   pilot's own line), Instrument Sans (quiet lines), Plex Mono (paper labels).
   Motion: the three cards settle in once (≤ 460 ms); nothing loops.
   Overrides the old #sheet-paywall rules in ui.css; loaded right after it.
   ========================================================================== */

#sheet-paywall {
  --pw-paper: #FBF6EB;
  --pw-ink: #14213D;
  --pw-ink-soft: rgba(20, 33, 61, 0.5);
  --pw-verm: #C4402A;
  --pw-cream: #FFF4E2;
  --pw-dim: rgba(236, 232, 222, 0.74);
  --pw-faint: rgba(224, 230, 248, 0.6);
}
#sheet-paywall.open {
  background:
    radial-gradient(120% 55% at 50% 118%, rgba(240, 124, 44, 0.16), transparent 60%),
    radial-gradient(1px 1px at 12% 18%, rgba(255, 244, 226, 0.55), transparent 1.5px),
    radial-gradient(1px 1px at 78% 9%, rgba(255, 244, 226, 0.45), transparent 1.5px),
    radial-gradient(1.2px 1.2px at 64% 31%, rgba(255, 244, 226, 0.35), transparent 1.7px),
    radial-gradient(1px 1px at 31% 6%, rgba(255, 244, 226, 0.4), transparent 1.5px),
    radial-gradient(1px 1px at 91% 44%, rgba(255, 244, 226, 0.3), transparent 1.5px),
    radial-gradient(1px 1px at 6% 52%, rgba(255, 244, 226, 0.3), transparent 1.5px),
    linear-gradient(180deg, rgba(6, 8, 22, 0.985), rgba(9, 12, 30, 0.985));
}

/* ---------------------------------------------------------------- the page */
#sheet-paywall .sheet.pay {
  width: min(440px, calc(100% - 40px));
  padding: 60px 0 calc(env(safe-area-inset-bottom, 0px) + 20px);
  max-height: 100vh; max-height: 100dvh;
  justify-content: flex-start;
  scrollbar-width: none;
}
#sheet-paywall .sheet.pay::-webkit-scrollbar { display: none; }
#sheet-paywall .sheet.pay:focus { outline: none; }
#sheet-paywall .pay-x { top: max(14px, env(safe-area-inset-top, 0px)); right: 14px; z-index: 2; }

/* ---------------------------------------------------------------- headline */
#sheet-paywall .pay-hero { gap: 0; margin: 0; }
#sheet-paywall .pay-eyebrow {
  margin: 0; font: 500 11px/1 var(--f-mono); letter-spacing: 0.22em; text-transform: uppercase;
  color: rgba(255, 181, 71, 0.82);
}
#sheet-paywall .pay-title {
  margin: 12px 0 0; font: 800 clamp(50px, 15vw, 64px)/0.86 var(--f-display);
  letter-spacing: 0.035em; text-transform: uppercase; color: var(--amber);
  text-shadow: 0 0 34px rgba(255, 181, 71, 0.22);
  text-wrap: balance;
}
.pay-you {
  margin: 14px 0 0; max-width: 30ch;
  font: italic 400 19px/1.28 var(--f-serif); color: var(--pw-dim); text-wrap: balance;
}
.pay-you b { font-weight: 400; color: var(--pw-cream); }

/* ---------------------------------------------------------------- the previews */
.pay-peek {
  list-style: none; margin: 26px 0 0; padding: 0; width: 100%;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
}
.pv { --rot: 0deg; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.pv-runs { --rot: -2.2deg; }
.pv-arch { --rot: 1.4deg; }
.pv-liv { --rot: -1deg; }
.pv-art {
  position: relative; box-sizing: border-box; container-type: inline-size;
  display: flex; flex-direction: column; width: 100%; aspect-ratio: 1 / 0.98;
  padding: 7px 7px 8px; border-radius: 7px;
  background: var(--fibre, none), var(--pw-paper); color: var(--pw-ink);
  box-shadow: 0 0 0 1px rgba(20, 33, 61, 0.18), 0 1px 0 rgba(255, 250, 240, 0.4) inset, 0 14px 26px rgba(0, 0, 0, 0.45), 0 2px 4px rgba(0, 0, 0, 0.3);
  transform: rotate(var(--rot));
  overflow: hidden;
}
.pv-head {
  flex: none; display: block; padding-bottom: 4px; margin-bottom: 6px; border-bottom: 1.5px solid var(--pw-verm);
  font: 500 7.5px/1 var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--pw-ink);
  white-space: nowrap; overflow: hidden; text-align: left;
}

/* 1 · run card: a hole per run, punched through once flown */
.pv-holes { flex: 1; display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); align-content: space-between; gap: 2.5px 2.5px; }
.pv-holes i {
  display: grid; place-items: center; aspect-ratio: 1; border-radius: 50%; font: 500 0/1 var(--f-mono); font-style: normal;
  color: rgba(20, 33, 61, 0.5); box-shadow: inset 0 0 0 0.8px rgba(20, 33, 61, 0.32);
}
.pv-holes i.next { background: var(--amber); box-shadow: inset 0 0 0 1px var(--pw-ink); color: var(--pw-ink); }
.pv-holes i.on { background: #1B2A4A; transform: scale(0.82); box-shadow: inset 0 1px 1.5px rgba(0, 0, 0, 0.6), 0 0.5px 0 rgba(255, 250, 240, 0.9); color: transparent; }

/* 2 · archive: the last four weeks, flown days circled, today boxed */
.pv-cal { flex: 1; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-template-rows: auto repeat(4, minmax(0, 1fr)); gap: 1px 1px; }
.pv-cal em, .pv-cal i { display: grid; place-items: center; font-style: normal; min-width: 0; }
.pv-cal em { padding-bottom: 2px; font: 500 5.5px/1 var(--f-mono); color: rgba(20, 33, 61, 0.55); border-bottom: 0.8px solid rgba(20, 33, 61, 0.35); }
.pv-cal i { position: relative; font: 700 8px/1 var(--f-display); color: var(--pw-ink); }
.pv-cal i.on::before { content: ""; position: absolute; left: 50%; top: 50%; width: 92%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); box-shadow: inset 0 0 0 0.9px rgba(43, 63, 122, 0.85); }
.pv-cal i.on { color: #2B3F7A; }
.pv-cal i.now { color: var(--pw-verm); box-shadow: inset 0 0 0 1px var(--pw-verm); }
.pv-cal i.off { color: rgba(20, 33, 61, 0.2); }

/* 3 · liveries: four windows of sky, each balloon painted by the real envelope */
.pv-livs { flex: 1; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 4px; min-height: 0; }
.pv-win { position: relative; min-height: 0; border-radius: 4px; overflow: hidden; background: linear-gradient(180deg, #7E9CC6 0%, #A9BFDC 62%, #E9D3B9 100%); box-shadow: inset 0 0 0 0.8px rgba(20, 33, 61, 0.25); }
.pv-win svg { position: absolute; inset: 6% 0 0; width: 100%; height: 94%; }
.pv-midnight { background: linear-gradient(180deg, #2A3C6B 0%, #5B6F9E 62%, #D8B48E 100%); }
.pv-gold { background: linear-gradient(180deg, #6E8DBB 0%, #A3B6D6 62%, #F0CFA6 100%); }

/* captions: a number in the display face, a short line under it */
.pv-cap { margin: 14px 0 0; display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center; min-width: 0; }
.pv-cap b { font: 800 18px/0.95 var(--f-display); letter-spacing: 0.03em; text-transform: uppercase; color: var(--pw-cream); white-space: nowrap; }
.pv-cap span { font: 500 12px/1.2 var(--f-ui); color: var(--pw-dim); }

/* bigger cards print more: numbers in the holes, bigger dates */
@container (min-width: 150px) {
  .pv-head { font-size: 9px; padding-bottom: 6px; margin-bottom: 9px; }
  .pv-holes { gap: 4px; }
  .pv-holes i { font-size: 6.5px; }
  .pv-cal em { font-size: 7px; }
  .pv-cal i { font-size: 11px; }
  .pv-livs { gap: 6px; }
}

/* ---------------------------------------------------------------- buy */
#sheet-paywall .pay-act { width: 100%; display: flex; flex-direction: column; align-items: center; }
#sheet-paywall .pay-cta { width: 100%; max-width: none; margin-top: 28px; min-height: 68px; }
#sheet-paywall .buy-ticket { --cut: 71%; height: 68px; }
#sheet-paywall .buy-ticket .bt-main { font-size: 25px; letter-spacing: 0.06em; gap: 7px; }
#sheet-paywall .buy-ticket .bt-main::after { content: "No subscription"; content: "No subscription" / ""; font-size: 9.5px; letter-spacing: 0.18em; }
#sheet-paywall .buy-ticket .bt-stub b { font-size: 30px; }
#sheet-paywall .buy-ticket .bt-stub small { font-size: 9px; }

/* sign-in step: Google's button takes the ticket's place */
#sheet-paywall .pay-cta:has(.gsi:not([hidden])) {
  position: relative; box-sizing: border-box; padding: 18px 18px 20px; border-radius: 12px;
  background: rgba(255, 244, 226, 0.045); border: 1px solid rgba(255, 181, 71, 0.32);
}
#sheet-paywall .pay-cta:has(.gsi:not([hidden]))::before {
  content: "Unlimited · " attr(data-price) " one-time"; display: block; margin: 0 0 10px;
  font: 800 20px/1 var(--f-display); letter-spacing: 0.05em; text-transform: uppercase; color: var(--amber); text-align: center;
}
#sheet-paywall .gsi-lead { max-width: 34ch; text-wrap: balance; font: 500 14px/1.45 var(--f-ui); color: var(--pw-dim); }
#sheet-paywall .gsi .gsi-btn { min-height: 44px; min-width: 220px; align-items: center; }
#sheet-paywall .gsi .gsi-btn:empty::before {
  content: "Loading Google sign-in…"; display: grid; place-items: center; width: 220px; height: 40px; border-radius: 999px;
  border: 1px dashed rgba(255, 244, 226, 0.35); font: 500 13px/1 var(--f-ui); color: var(--pw-faint);
}

/* ---------------------------------------------------------------- quiet lines */
.pay-alt { margin: 10px 0 0; display: flex; align-items: center; justify-content: center; gap: 2px; }
.pay-q {
  min-height: 44px; padding: 0 10px; border: 0; background: none; cursor: pointer;
  font: 500 14px/1 var(--f-ui); color: var(--pw-dim);
  text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px;
  transition: color 160ms var(--ease-out), text-decoration-color 160ms var(--ease-out);
}
.pay-q:hover { color: var(--pw-cream); text-decoration-color: rgba(255, 244, 226, 0.45); }
.pay-q:focus-visible { outline: 2px solid var(--amber); outline-offset: -4px; border-radius: 8px; }
.pay-q[hidden] { display: none; }
.pay-dot { color: var(--pw-faint); }
#sheet-paywall .code-form { box-sizing: border-box; width: 100%; margin: 4px 0 12px; padding: 0 5px; }
#sheet-paywall .code-go { min-width: 84px; }
#sheet-paywall .pay-fine { margin: 6px 0 0; max-width: 40ch; font: 400 12px/1.5 var(--f-ui); color: var(--pw-faint); }
#sheet-paywall .pay-fine a { color: var(--pw-dim); text-underline-offset: 3px; text-decoration-color: rgba(236, 232, 222, 0.35); }
#sheet-paywall .pay-fine a:hover { color: var(--pw-cream); }

/* ---------------------------------------------------------------- entrance */
@keyframes pvIn {
  from { opacity: 0; transform: translateY(14px) rotate(0deg); }
  to { opacity: 1; transform: rotate(var(--rot)); }
}
#sheet-paywall.open .pv-art { animation: pvIn 460ms var(--ease-out, cubic-bezier(.2, .8, .2, 1)) both; }
#sheet-paywall.open .pv-arch .pv-art { animation-delay: 70ms; }
#sheet-paywall.open .pv-liv .pv-art { animation-delay: 140ms; }
@media (hover: hover) and (pointer: fine) {
  .pv-art { transition: transform 200ms var(--ease-out); }
  .pv:hover .pv-art { transform: rotate(0deg) translateY(-3px); }
}
@media (prefers-reduced-motion: reduce) {
  #sheet-paywall.open .pv-art { animation: none; }
  .pv-art, .pay-q { transition: none; }
  .pv:hover .pv-art { transform: rotate(var(--rot)); }
}

/* ---------------------------------------------------------------- short phones (360×640 and the like) */
@media (max-height: 720px) {
  #sheet-paywall .sheet.pay { padding-top: 52px; }
  #sheet-paywall .pay-eyebrow { font-size: 10px; }
  #sheet-paywall .pay-title { margin-top: 9px; font-size: clamp(42px, 12.5vw, 52px); }
  .pay-you { margin-top: 10px; font-size: 17px; }
  .pay-peek { margin-top: 18px; gap: 10px; }
  .pv-art { aspect-ratio: 1 / 0.86; }
  .pv-cap { margin-top: 10px; gap: 3px; }
  .pv-cap b { font-size: 16px; }
  .pv-cap span { font-size: 11.5px; }
  #sheet-paywall .pay-cta { margin-top: 20px; min-height: 64px; }
  #sheet-paywall .buy-ticket { height: 64px; }
  .pay-alt { margin-top: 4px; }
  #sheet-paywall .pay-fine { margin-top: 2px; font-size: 11.5px; }
}
@media (max-width: 370px) {
  .pay-peek { gap: 9px; }
  .pv-cap b { font-size: 15.5px; }
  .pv-cap span { font-size: 11px; }
}

/* ---------------------------------------------------------------- desktop: a spread, not a stretched phone */
@media (min-width: 900px) and (min-height: 600px), (min-width: 640px) and (max-height: 599px) and (orientation: landscape) {
  #sheet-paywall .sheet.pay {
    width: min(1200px, calc(100% - 112px)); padding: 48px 0;
    display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); column-gap: clamp(56px, 7vw, 112px);
    grid-template-areas: "hero peek" "act peek"; align-content: center; align-items: start;
    text-align: left; margin: auto 0;
  }
  #sheet-paywall .pay-hero { grid-area: hero; align-items: flex-start; align-self: end; }
  #sheet-paywall .pay-eyebrow { font-size: 12px; }
  #sheet-paywall .pay-title { font-size: 96px; margin-top: 18px; }
  .pay-you { font-size: 24px; max-width: 24ch; margin-top: 20px; }
  #sheet-paywall .pay-act { grid-area: act; align-items: stretch; }
  #sheet-paywall .pay-cta { margin-top: 36px; }
  #sheet-paywall .buy-ticket { height: 76px; }
  #sheet-paywall .buy-ticket .bt-main { font-size: 28px; }
  #sheet-paywall .buy-ticket .bt-stub b { font-size: 34px; }
  .pay-alt { justify-content: flex-start; margin: 12px 0 0 -10px; }
  .pay-q { font-size: 15px; }
  #sheet-paywall .pay-fine { text-align: left; font-size: 13px; }
  .pay-peek { grid-area: peek; align-self: center; margin: 0; gap: 28px; }
  .pv-art { padding: 12px 12px 14px; border-radius: 9px; aspect-ratio: 1 / 1.08; }
  .pv-runs { margin-top: 26px; }
  .pv-liv { margin-top: 14px; }
  .pv-cap { margin-top: 20px; gap: 7px; }
  .pv-cap b { font-size: 24px; }
  .pv-cap span { font-size: 14px; }
  #sheet-paywall .pay-x { top: 24px; right: 24px; }
}

/* ---------------------------------------------------------------- phones on their side: the same spread, smaller */
@media (min-width: 640px) and (max-height: 599px) and (orientation: landscape) {
  #sheet-paywall .sheet.pay { width: min(860px, calc(100% - 64px)); padding: 24px 0; column-gap: 40px; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); }
  #sheet-paywall .pay-eyebrow { font-size: 10px; }
  #sheet-paywall .pay-title { font-size: 56px; margin-top: 10px; }
  .pay-you { font-size: 17px; margin-top: 10px; }
  #sheet-paywall .pay-cta { margin-top: 18px; min-height: 60px; }
  #sheet-paywall .buy-ticket { height: 60px; }
  #sheet-paywall .buy-ticket .bt-main { font-size: 22px; }
  #sheet-paywall .buy-ticket .bt-stub b { font-size: 26px; }
  .pay-alt { margin-top: 2px; }
  .pay-q { font-size: 14px; }
  #sheet-paywall .pay-fine { font-size: 11.5px; margin-top: 0; }
  .pay-peek { gap: 16px; }
  .pv-art { padding: 8px 8px 9px; aspect-ratio: 1 / 1; }
  .pv-runs { margin-top: 14px; }
  .pv-liv { margin-top: 8px; }
  .pv-cap { margin-top: 12px; gap: 4px; }
  .pv-cap b { font-size: 17px; }
  .pv-cap span { font-size: 12px; }
  #sheet-paywall .pay-x { top: 12px; right: 12px; }
}

/* "Fly flight #12": the flight number in cream against the amber headline. */
#sheet-paywall .pay-title em { font-style: normal; color: #FFF1DA; }

/* The personal line: each sentence wraps as a unit, never "…51 / more runs". */
.pay-you > span { display: inline-block; }
