/* Wallpacks store. Hand-written, no framework. Phone-first (390 px), scales up to a
   1120 px content column. Ported from the design boards in store-mockup/project/. */

/* Self-hosted fonts (latin subsets, SIL Open Font License: /assets/fonts/OFL.txt). No request
   goes to a font CDN, so visitors' IP addresses are not shared with anyone for fonts. */
@font-face {
  font-family: 'Bodoni Moda';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/bodoni-moda-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Bodoni Moda';
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/bodoni-moda-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/assets/fonts/hanken-grotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-mono-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-mono-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #ECEDE8;
  --ink: #15171B;
  --muted: #5B5E66;
  --line: #D3D4CE;
  --card: #F8F8F5;
  --accent: #2142B5;
  --accent-hover: #15287A;
  --body: #33363C;
  --soft: #DFE0DA;
  --edge: #A9ABA4;
  --navy: #0F1524;
  --navy-text: #E9EBF2;
  --navy-muted: #A8B1C9;
  --ok: #1F6B3A;
  --warn: #8A4B0F;
  --serif: 'Bodoni Moda', 'Bodoni 72', Didot, Georgia, serif;
  --sans: 'Hanken Grotesk', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
  --gutter: 18px;
  --max: 1120px;
  --header-h: 64px;
  color-scheme: light;
}
@media (min-width: 768px) {
  :root { --gutter: 32px; }
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 12px);
  /* keep the scrollbar's space when the checkout locks scrolling (no sideways jump on desktop) */
  scrollbar-gutter: stable;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
html.is-locked, html.is-locked body { overflow: hidden; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  /* short pages (404, thanks): the footer sits at the bottom of the window, not halfway up.
     .buybar and .sheet are position: fixed, so the flex column does not affect them. */
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }
@media (min-width: 768px) {
  body { font-size: 17px; }
}

img, video, svg { max-width: 100%; }
img, video { display: block; height: auto; }
h1, h2, h3, p, ul, ol, figure, dl, dd { margin: 0; }
ul, ol { padding: 0; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.dark :focus-visible {
  /* the accent ring is only 2.2:1 on navy: use white there (18:1), clear of .btn-light's fill */
  outline-color: #FFFFFF;
  box-shadow: none;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 100;
  background: var(--ink);
  color: var(--card);
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
}
.skip-link:focus { top: 10px; color: var(--card); }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
  /* notched iPhones in landscape: keep text clear of the sensor housing */
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}
.narrow { max-width: calc(760px + 2 * var(--gutter)); }

/* ---------- type ---------- */
.eyebrow, .mono-label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
@media (min-width: 768px) {
  .eyebrow { font-size: 13px; }
}
.eyebrow-ok { color: var(--ok); }
.mono { font-family: var(--mono); font-size: 13px; }
.muted { color: var(--muted); }
.serif { font-family: var(--serif); }

.h1, .h2, .h3 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.h1 { font-size: clamp(2.55rem, 1.55rem + 4.4vw, 5.1rem); line-height: 1.02; }
.h2 { font-size: clamp(2rem, 1.45rem + 2.4vw, 3.25rem); line-height: 1.06; }
.h3 { font-size: clamp(1.6rem, 1.4rem + 0.8vw, 1.9rem); line-height: 1.1; }
.h1 em, .h2 em { font-style: italic; }
/* "Your screens, / in thick oil paint.": never split the italic phrase across the break */
.hero .h1 em { display: block; }
.lead {
  font-size: 1.08rem;
  color: var(--body);
  max-width: 34em;
}
@media (min-width: 768px) {
  .lead { font-size: 1.15rem; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn-sm { min-height: 44px; padding: 10px 16px; font-size: 15px; font-weight: 500; }
.btn-lg { min-height: 54px; padding: 15px 28px; font-size: 17px; }
.btn-block { display: flex; width: 100%; }
.btn-accent { background: var(--accent); color: #FFFFFF; }
.btn-accent:hover { background: var(--accent-hover); color: #FFFFFF; }
.btn-ink { background: var(--ink); color: var(--card); }
.btn-ink:hover { background: #2B2E35; color: var(--card); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--edge); font-weight: 500; }
.btn-outline:hover { background: rgba(21, 23, 27, 0.05); color: var(--ink); border-color: var(--ink); }
.btn-light { background: var(--card); color: var(--navy); }
.btn-light:hover { background: #FFFFFF; color: var(--navy); }
.btn-ghost-light { background: transparent; color: var(--navy-text); border-color: rgba(233, 235, 242, 0.4); font-weight: 500; }
.btn-ghost-light:hover { border-color: var(--navy-text); color: #FFFFFF; }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.btn:active, .zip:active { filter: brightness(0.92); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
/* phones: every big call to action is full width, everywhere */
@media (max-width: 559px) {
  .btn-row > .btn-lg { flex: 1 1 100%; }
}
.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 500;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(236, 237, 232, 0.94);
  -webkit-backdrop-filter: saturate(1.3) blur(10px);
  backdrop-filter: saturate(1.3) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--header-h);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--serif);
  font-size: clamp(18px, 4.8vw, 25px);
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.wordmark:hover { color: var(--ink); }
.site-nav { display: flex; align-items: center; gap: 4px; }
.nav-link {
  display: none;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  color: var(--ink);
  font-size: 15px;
  text-decoration: none;
}
.nav-link:hover { color: var(--accent); }
@media (min-width: 860px) {
  .nav-link { display: inline-flex; }
  .site-nav .btn { margin-left: 10px; }
}
.site-nav .btn { white-space: nowrap; }
/* "My downloads": added by app.js only when this browser has an order (nothing for others) */
.nav-mine {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
}
.nav-mine svg { flex: none; color: var(--accent); }
.nav-mine:hover { color: var(--accent); }
.nav-mine[aria-current="page"] { color: var(--muted); }
.nav-mine-short { display: none; }
/* phones: icon over a short label, one narrow column next to the bundle pill. Only headers that
   have the link (.has-mine, set by app.js) tighten their spacing to make room. */
@media (max-width: 559px) {
  .nav-mine {
    flex-direction: column;
    justify-content: center;
    gap: 1px;
    min-width: 44px;
    padding: 2px;
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 500;
    line-height: 1.1;
  }
  .nav-mine-long { display: none; }
  .nav-mine-short { display: block; }
  .site-header.has-mine .wrap { gap: 6px; }
  .site-header.has-mine .site-nav { gap: 2px; }
  .site-header.has-mine .site-nav .btn-sm { padding-inline: 13px; }
}
@media (max-width: 389px) {
  .site-header.has-mine .wordmark { letter-spacing: 0.1em; }
}
/* under 375 px: the icon alone (the link keeps its "My downloads" name for screen readers) */
@media (max-width: 374px) {
  .nav-mine-short { display: none; }
  .site-header.has-mine .wordmark { letter-spacing: 0.07em; }
}
/* 320 px screens (iPhone SE / mini with Display Zoom, large Android display size) */
@media (max-width: 359px) {
  .site-header .wrap { gap: 8px; }
  .wordmark { letter-spacing: 0.08em; }
  .site-nav .btn-sm { padding-inline: 12px; font-size: 14px; }
  .site-header.has-mine .wordmark { font-size: 16px; letter-spacing: 0.08em; }
  .site-header.has-mine .site-nav .btn-sm { padding-inline: 11px; font-size: 13px; }
}

/* top bar: an order confirmed in the background (app.js purchase recovery) */
.ready-bar {
  background: var(--ink);
  color: var(--card);
  font-size: 15px;
}
.ready-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 48px;
}
.ready-bar p { padding-block: 8px; line-height: 1.35; }
@media (max-width: 359px) {
  .ready-bar { font-size: 14px; }
}
.ready-bar a {
  color: #FFFFFF;
  font-weight: 600;
  white-space: nowrap;
}
.ready-bar a:hover { color: #FFFFFF; }
.ready-bar :focus-visible { outline-color: #FFFFFF; }
.ready-close {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--card);
  cursor: pointer;
}
.ready-close:hover { background: rgba(255, 255, 255, 0.12); }

.crumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: var(--ink);
  font-size: 15px;
  text-decoration: none;
}
.crumb:hover { color: var(--accent); }

/* ---------- sections ---------- */
.section { padding-block: 64px; }
@media (min-width: 768px) {
  .section { padding-block: 96px; }
}
.section-tight { padding-block: 40px; }
.band {
  background: var(--card);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.dark {
  background: var(--navy);
  color: var(--navy-text);
}
.dark .eyebrow { color: var(--navy-muted); }
.dark .lead, .dark p { color: #C9CFDF; }
.dark a:not(.btn) { color: #C8D3FF; }
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 36px;
}
.section-head p { max-width: 30em; color: var(--muted); }
@media (min-width: 768px) {
  .section-head { margin-bottom: 48px; }
}

/* ---------- protected previews ----------
   Owner's request: buyers should not be able to grab the wallpapers from the shop pages.
   Be honest about the limits: NO website can block screenshots or screen recording. What we
   do instead: publish only a few small featured previews (900 px desktop / 480 px phone),
   never show them larger than that, and block drag / long-press / right-click saving.
   The preview pictures carry a light "WALLPACKS" watermark baked into the image files
   (previews-wm/), so a screenshot, "Save page as" or a copied image URL is low-res and
   watermarked. The .mp4 loops are not watermarked, so their frames (.protect--video) keep a
   repeating CSS watermark ABOVE the video. Every frame has a transparent overlay that, not
   the picture, receives taps, clicks and drags. */
.protect {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: #1B1C1F;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.protect img,
.protect video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
/* transparent shield above every picture: it gets the taps / right-clicks / drags */
.protect::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: transparent;
  pointer-events: auto;
}
/* video frames: the shield also carries the repeating watermark */
.protect--video::after {
  inset: -60%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='120'%3E%3Cg font-family='Arial,Helvetica,sans-serif' font-size='15' font-weight='700' letter-spacing='1' fill='white' stroke='black' stroke-width='0.6' stroke-opacity='1'%3E%3Ctext x='8' y='42'%3EWALLPACKS%3C/text%3E%3Ctext x='138' y='102'%3EWALLPACKS%3C/text%3E%3Ctext x='-122' y='102'%3EWALLPACKS%3C/text%3E%3C/g%3E%3C/svg%3E");
  background-size: 260px 120px;
  transform: rotate(-24deg);
  opacity: 0.2;
}
/* Before the first play the poster shows, and it already has the baked-in watermark: no second
   mark on top. app.js adds .has-played once the (unwatermarked) MP4 is really on screen and
   never removes it, so a paused frame stays covered. The shield itself still takes the taps. */
.protect--video:not(.has-played)::after { background-image: none; }
/* Live loop pause / play (WCAG 2.2.2): above the shield, a real 44 px button */
.live-toggle {
  position: absolute;
  right: 6px;
  bottom: 6px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 21, 36, 0.72);
  color: #FFFFFF;
  cursor: pointer;
}
.live-toggle[hidden] { display: none; }
.live-toggle .i-play, .live-toggle.is-paused .i-pause { display: none; }
.live-toggle.is-paused .i-play { display: block; }

/* ---------- home hero ---------- */
.hero { padding-block: 36px 56px; }
.hero-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}
.hero-copy { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.hero-note { font-size: 14px; color: var(--muted); }
@media (min-width: 960px) {
  .hero { padding-block: 72px 96px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 64px; }
  .hero-copy { gap: 24px; }
}
/* Phones and tablets: show the wallpaper on the first screen (as on the Mobile board):
   eyebrow, headline, lead, device mock, then the call to action. DOM order is unchanged. */
@media (max-width: 959px) {
  .hero { padding-block: 20px 44px; }
  .hero-grid { gap: 16px; }
  .hero-copy { display: contents; }
  .hero-copy > .eyebrow, .hero-copy > .h1, .hero-copy > .lead { order: 1; }
  .hero-grid > .stage { order: 2; max-width: 380px; }
  .hero-copy > .btn-row { order: 3; justify-content: center; align-items: center; }
  .hero-copy > .hero-note, .hero-copy > noscript { order: 4; text-align: center; }
  .phone-mock { width: 34%; }
}
/* tablets: headline and lead are left-aligned, so the mock, CTA row and note follow them */
@media (min-width: 560px) and (max-width: 959px) {
  .hero-copy > .btn-row { justify-content: flex-start; }
  .hero-copy > .hero-note, .hero-copy > noscript { text-align: left; }
  .hero-grid > .stage { margin-inline: 0; }
}

/* device mocks */
.stage {
  position: relative;
  padding: 0 13% 11% 0;
  min-width: 0;
  max-width: 640px;
  margin-inline: auto;
  width: 100%;
}
.laptop-screen {
  background: #1B1C1F;
  border-radius: 14px 14px 4px 4px;
  padding: 2.2% 2.2% 3%;
  box-shadow: 0 24px 50px -24px rgba(21, 23, 27, 0.45);
}
.laptop-screen .protect { aspect-ratio: 16 / 10; border-radius: 3px; }
.laptop-base {
  position: relative;
  height: 12px;
  margin: 0 -4%;
  background: linear-gradient(#D9DAD5, #B5B6B0);
  border-radius: 0 0 14px 14px;
}
.laptop-base::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 16%;
  height: 4px;
  transform: translateX(-50%);
  background: #A4A59F;
  border-radius: 0 0 6px 6px;
}
.phone-mock {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 29%;
  max-width: 180px;
  padding: 2.4%;
  background: #111214;
  border-radius: 18% / 8.4%;
  box-shadow: 0 22px 40px -16px rgba(21, 23, 27, 0.55);
}
.phone-mock .protect { aspect-ratio: 9 / 19.5; border-radius: 15% / 7%; }

/* spec strip */
.specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 16px;
  padding-block: 24px;
  font-family: var(--mono);
  font-size: 13px;
}
.specs div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.specs dt { color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px; }
.specs dd { color: var(--ink); white-space: nowrap; }
@media (max-width: 359px) {
  .specs { font-size: 12px; }
}
@media (min-width: 768px) {
  .specs { grid-template-columns: repeat(4, minmax(0, 1fr)); padding-block: 28px; }
}

/* ---------- pack cards ---------- */
.pack-grid {
  display: grid;
  gap: 56px 32px;
}
@media (min-width: 720px) {
  .pack-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px 32px; }
}
.pack-card { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pack-media {
  position: relative;
  display: block;
  padding-bottom: 26px;
  text-decoration: none;
}
.pack-media > .protect { aspect-ratio: 16 / 9; border-radius: 8px; }
.pack-media .phone-chip {
  position: absolute;
  right: 14px;
  bottom: 0;
  width: 23%;
  padding: 4px;
  background: var(--card);
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(21, 23, 27, 0.2);
}
.phone-chip .protect { aspect-ratio: 9 / 19.5; border-radius: 12px; }
.pack-title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pack-title-row .mono { color: var(--muted); white-space: nowrap; }
.pack-card .tagline { color: var(--body); }
.pack-card .btn-row .btn { flex: 1 1 0; }
@media (min-width: 720px) {
  .pack-card .btn-row .btn { flex: 0 0 auto; }
}

.soon-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin-top: 48px;
  padding: 18px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.3;
  color: var(--body);
}

/* ---------- bundle (dark) ---------- */
.bundle-grid { display: grid; gap: 44px; align-items: center; }
@media (min-width: 960px) {
  .bundle-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr); gap: 64px; }
}
.bundle-copy { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  border-top: 1px solid rgba(233, 235, 242, 0.18);
  padding-top: 18px;
}
.stats div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stats strong { font-family: var(--serif); font-weight: 500; font-size: clamp(28px, 7vw, 40px); line-height: 1; color: var(--navy-text); }
.stats span { font-size: 13px; line-height: 1.35; color: var(--navy-muted); }
.price-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.price-line .price { font-family: var(--serif); font-size: 52px; line-height: 1; }
.price-line .was { font-family: var(--mono); font-size: 14px; color: var(--navy-muted); }
.light .price-line .was, .price-box .was { color: var(--muted); }
.fan {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
  max-width: 520px;
  margin-inline: auto;
  width: 100%;
}
.fan .phone-frame:nth-child(even) { margin-top: 28px; }
.phone-frame {
  padding: 4px;
  background: #050608;
  border-radius: 18px;
  box-shadow: 0 14px 34px -14px rgba(0, 0, 0, 0.7);
}
.phone-frame .protect { aspect-ratio: 9 / 19.5; border-radius: 14px; }
@media (min-width: 600px) {
  .phone-frame { padding: 5px; border-radius: 24px; }
  .phone-frame .protect { border-radius: 19px; }
}

/* ---------- how it works ---------- */
.steps {
  list-style: none;
  display: grid;
  gap: 28px;
}
@media (min-width: 768px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
}
.steps li {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 2px solid var(--ink);
  padding-top: 16px;
}
.steps .num { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.steps strong { font-size: 19px; font-weight: 600; }
.steps p { color: var(--body); }

/* ---------- FAQ ---------- */
.faq { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 14px 0;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: translateY(-3px) rotate(45deg);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.faq details p { padding: 0 0 20px; color: var(--body); max-width: 40em; }
.faq-more { margin-top: 20px; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 40px 48px;
  font-size: 14px;
  color: var(--muted);
}
.footer-grid { display: grid; gap: 24px; }
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
}
.footer-brand { display: flex; flex-direction: column; gap: 6px; }
.footer-brand .wordmark { font-size: 20px; min-height: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 18px; list-style: none; }
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
}
.footer-links a:hover { color: var(--accent); }
.footer-legal { margin-top: 18px; display: flex; flex-direction: column; gap: 4px; }
.has-buybar .site-footer { padding-bottom: calc(120px + env(safe-area-inset-bottom)); }
@media (min-width: 768px) {
  .has-buybar .site-footer { padding-bottom: 48px; }
}

/* ---------- pack page ---------- */
.pack-hero { padding-block: 8px 32px; }
/* the Everything page has no "All packs" crumb above its hero */
main > .pack-hero:first-child { padding-top: 28px; }
.pack-hero-grid { display: grid; gap: 28px; align-items: end; }
@media (min-width: 900px) {
  .pack-hero { padding-block: 24px 40px; }
  main > .pack-hero:first-child { padding-top: 48px; }
  .pack-hero-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 56px; }
}
.pack-hero-copy { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
/* phones: a picture first, then name, then the price box with Buy (DOM order unchanged) */
.pack-hero-media { position: relative; padding-bottom: 22px; min-width: 0; }
.pack-hero-media > .protect { aspect-ratio: 16 / 9; border-radius: 8px; }
.hero-chip {
  position: absolute;
  right: 12px;
  bottom: 0;
  width: 24%;
  max-width: 120px;
  padding: 3px;
  background: var(--card);
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(21, 23, 27, 0.2);
}
.hero-chip .protect { aspect-ratio: 9 / 19.5; border-radius: 11px; }
.pack-hero-media.fan { padding-bottom: 6px; max-width: 420px; }
@media (max-width: 899px) {
  .pack-hero-grid { gap: 14px; }
  .pack-hero-copy { display: contents; }
  .pack-hero-media { order: 0; }
  .pack-hero-copy > .eyebrow, .pack-hero-copy > .h1 { order: 1; }
  .price-box { order: 2; }
  .pack-hero-copy > p:not(.eyebrow) { order: 3; }
}
@media (min-width: 900px) {
  .pack-hero-media { display: none; }
  /* /everything/: the phone fan stays on laptops, above the price box in the right column */
  .pack-hero-media.fan {
    display: grid;
    grid-column: 2;
    grid-row: 1;
    max-width: 440px;
    width: 100%;
    margin: 0 0 0 auto;
    padding-bottom: 0;
  }
  .pack-hero-grid:has(.fan) { row-gap: 28px; }
  .pack-hero-grid:has(.fan) .price-box { grid-column: 2; grid-row: 2; }
  .pack-hero-grid:has(.fan) .pack-hero-copy { grid-row: 1 / span 2; align-self: center; }
}
.price-box {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.price-box .price-line .price { font-size: 48px; }
.price-box .small { font-size: 14px; color: var(--muted); }
.price-box .text-link { align-self: flex-start; min-height: 32px; margin-top: -6px; font-size: 15px; }
@media (min-width: 560px) {
  .price-box .btn-row .btn { flex: 1 1 auto; }
}

.segmented {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--soft);
  border-radius: 999px;
}
.segmented button {
  min-height: 44px;
  padding: 8px 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}
.segmented button[aria-pressed="true"] { background: var(--ink); color: var(--card); font-weight: 600; }
.segmented .count { font-family: var(--mono); font-size: 12px; opacity: 0.75; margin-left: 4px; }
.gallery-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.gallery {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 600px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
}
@media (min-width: 960px) {
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.gallery-phone { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) {
  .gallery-phone { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.gallery figure { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.gallery .protect { border-radius: 8px; }
.gallery-desktop .protect { aspect-ratio: 16 / 9; max-width: 900px; }
.gallery-phone .protect { aspect-ratio: 9 / 19.5; border-radius: 18px; max-width: 480px; }
.gallery figcaption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2px 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.gallery figcaption b { font-weight: 500; color: var(--ink); }
.gallery-phone figcaption { flex-direction: column; gap: 0; }
.more-line {
  margin-top: 20px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--body);
  font-size: 15px;
}
.more-line strong { font-family: var(--mono); font-weight: 500; color: var(--ink); }

.contents-grid { display: grid; gap: 28px; }
@media (min-width: 900px) {
  .contents-grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 56px; }
}
.contents-copy { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.contents-copy p { color: var(--body); }
.table-wrap { overflow-x: auto; min-width: 0; }
.files-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.files-table th {
  padding: 10px 8px 10px 0;
  text-align: left;
  font-weight: 500;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.files-table td {
  padding: 12px 8px 12px 0;
  border-bottom: 1px solid #E2E3DD;
  vertical-align: top;
}
.files-table td:nth-child(2), .files-table th:nth-child(2) { text-align: right; padding-right: 16px; white-space: nowrap; }
@media (min-width: 768px) {
  .files-table { font-size: 14px; }
}

.upsell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 28px 22px;
  border-radius: 14px;
}
.upsell-copy { display: flex; flex-direction: column; gap: 6px; flex: 1 1 320px; min-width: 0; }
.upsell-copy strong { font-family: var(--serif); font-weight: 500; font-size: clamp(26px, 5vw, 32px); line-height: 1.1; color: var(--navy-text); }
.upsell .btn-row { flex: 1 1 280px; justify-content: flex-start; }
@media (min-width: 768px) {
  .upsell { padding: 40px; }
  .upsell .btn-row { flex: 0 0 auto; }
}

/* sticky buy bar on phones (pack + bundle pages) */
.buybar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
  background: rgba(248, 248, 245, 0.97);
  border-top: 1px solid var(--line);
  box-shadow: 0 -10px 30px -18px rgba(21, 23, 27, 0.4);
  transform: translateY(110%);
  transition: transform 0.25s ease;
}
.buybar.is-on { transform: translateY(0); }
.buybar-name { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.buybar-name strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.buybar-name span { font-family: var(--mono); font-size: 12px; color: var(--muted); }
@media (min-width: 768px) {
  .buybar { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .buybar { transition: none; }
}

/* ---------- everything page ---------- */
.incl-list { display: grid; gap: 14px; }
@media (min-width: 720px) {
  .incl-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
}
.incl {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
}
.incl:hover { border-color: var(--edge); color: var(--ink); }
.incl .protect { aspect-ratio: 16 / 10; border-radius: 6px; }
.incl-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.incl-body strong { font-family: var(--serif); font-weight: 500; font-size: 22px; line-height: 1.15; }
.incl-body span { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.incl-body em { font-style: normal; font-size: 14px; color: var(--accent); }
@media (min-width: 480px) {
  .incl { grid-template-columns: 150px minmax(0, 1fr); }
}
@media (min-width: 960px) {
  .incl-list--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .incl-list--3 .incl { grid-template-columns: 112px minmax(0, 1fr); }
}

.bonus-grid { display: grid; gap: 18px; }
.bonus {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  min-width: 0;
}
.bonus-copy { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.bonus p { color: var(--body); }
.bonus .mono { color: var(--muted); }
/* laptops: each bonus is one wide row, pictures left and text right (no empty card space) */
@media (min-width: 900px) {
  .bonus {
    display: grid;
    grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
    column-gap: 36px;
    align-items: center;
    padding: 24px;
  }
}
.gold-plate {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  aspect-ratio: 16 / 9;
  padding: 18px;
  border-radius: 10px;
  color: #FFF7E6;
  background:
    linear-gradient(to top, rgba(40, 26, 6, 0.6), transparent 65%),
    radial-gradient(120% 90% at 20% 15%, rgba(255, 236, 190, 0.55), transparent 55%),
    linear-gradient(135deg, #C9A35A 0%, #8E6A2B 48%, #4E3712 100%);
}
.gold-plate b { font-family: var(--serif); font-weight: 500; font-size: clamp(28px, 6vw, 40px); line-height: 1; }
.gold-plate span { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
.live-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}
@media (min-width: 560px) {
  .live-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.live-grid figure { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.live-grid .protect { aspect-ratio: 16 / 9; border-radius: 8px; max-width: 640px; }
/* Gold Edition previews on phones: one wide picture, then two side by side */
@media (max-width: 559px) {
  .gold-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gold-grid figure:first-child { grid-column: 1 / -1; }
}
.live-grid figcaption { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.live-badge {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 3;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(15, 21, 36, 0.72);
  color: #FFFFFF;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  pointer-events: none;
}

/* ---------- checkout sheet ---------- */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: stretch;
  justify-content: center;
}
.sheet[hidden] { display: none; }
.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 21, 36, 0.62);
}
.sheet-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: var(--card);
  overflow: hidden;
  outline: none;
}
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
  padding: 8px 8px 8px var(--gutter);
  padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) 8px max(var(--gutter), env(safe-area-inset-left));
  border-bottom: 1px solid var(--line);
  background: var(--card);
}
.sheet-head h2 {
  min-width: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.15;
}
@media (min-width: 768px) {
  .sheet-head h2 { font-size: 28px; }
}
.sheet-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.sheet-close:hover { background: var(--soft); }
.sheet-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.sheet-summary {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px var(--gutter);
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.sheet-price { font-family: var(--serif); font-weight: 500; font-size: 30px; line-height: 1.1; }
.sheet-what {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
  font-size: 14px;
  color: var(--body);
}
.sheet-what li { position: relative; padding-left: 20px; }
.sheet-what li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.45em;
  width: 9px;
  height: 5px;
  border-left: 2px solid var(--ok);
  border-bottom: 2px solid var(--ok);
  transform: rotate(-45deg);
}
.sheet-pay {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px var(--gutter) 24px;
  /* full-screen sheet on phones: stay clear of the notch and the home indicator */
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
}
.checkout-area { position: relative; min-height: 460px; }
.checkout-area.is-ready { min-height: 0; }
#whop-checkout { width: 100%; }
#whop-checkout iframe { width: 100%; border: 0; }
.checkout-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--card);
  color: var(--muted);
  font-size: 15px;
  z-index: 1;
}
.checkout-loading[hidden] { display: none; }
/* the one small line under the payment form: Sold by Wallpacks · Payments are processed by Whop · Terms · Refunds */
.sheet-note { font-size: 13px; line-height: 1.5; color: var(--muted); text-align: center; }
.sheet-note a { color: var(--muted); }
.sheet-note a:hover { color: var(--accent); }
/* phones: a short order summary, so the payment form starts high on the screen */
@media (max-width: 767px) {
  .sheet-summary { gap: 4px; padding-block: 12px 14px; }
  .sheet-price { font-size: 26px; }
  .sheet-what { margin-top: 2px; font-size: 13px; }
  .checkout-area { min-height: 360px; }
  .checkout-loading { justify-content: flex-start; padding-top: 40px; }
}
@media (min-width: 768px) {
  .sheet {
    align-items: center;
    padding: 24px;
    padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  }
  .sheet-panel {
    width: min(920px, 100%);
    height: auto;
    max-height: min(92vh, 900px);
    max-height: min(92dvh, 900px);
    border-radius: 16px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  }
  .sheet-body {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
  }
  .sheet-summary {
    padding: 28px;
    border-bottom: 0;
    border-right: 1px solid var(--line);
    gap: 10px;
  }
  .sheet-pay { padding: 24px 28px 28px; }
  .sheet-head { padding: 10px 10px 10px 28px; } /* title lines up with the summary column */
}
@media (prefers-reduced-motion: no-preference) {
  .sheet.is-open .sheet-panel { animation: sheet-up 0.28s cubic-bezier(0.2, 0.8, 0.2, 1); }
  .sheet.is-open .sheet-backdrop { animation: fade-in 0.2s ease; }
}
@keyframes sheet-up { from { transform: translateY(24px); opacity: 0.4; } to { transform: none; opacity: 1; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* spinner + status boxes */
.spinner {
  flex: none;
  width: 28px;
  height: 28px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2.4s; }
}
@keyframes spin { to { transform: rotate(360deg); } }
.status {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}
.status[hidden] { display: none; }
.status-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.status-title { font-weight: 600; font-size: 17px; }
.status p { color: var(--body); overflow-wrap: anywhere; }
.status-warn { border-color: #E2C9A8; background: #FBF4EA; }
.status-warn .status-title { color: var(--warn); }
.status-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 6px; }
/* in-app browser notice (Instagram, TikTok, ...) on /thanks/ and the download page */
.inapp { margin-block: 4px 18px; }
.inapp .status-title { font-size: 16px; }
/* checkout sheet: "You already bought this" / "still being confirmed" (the checkout stays below it) */
.sheet-owned {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  font-size: 14px;
  line-height: 1.45;
  color: var(--body);
}
.sheet-owned[hidden] { display: none; }
.sheet-owned a { font-weight: 600; white-space: nowrap; }
/* pack pages in an in-app browser: a small, neutral tip under the price box's small print
   (never blocks buying, never moves the Buy button) */
.inapp-hint {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  font-size: 13px;
  line-height: 1.4;
  color: var(--body);
}
.inapp-hint-title { padding-right: 36px; font-weight: 500; color: var(--body); }
.inapp-hint-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 13px; color: var(--muted); }
.hint-close {
  position: absolute;
  top: 2px;
  right: 2px;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.hint-close:hover { background: rgba(21, 23, 27, 0.06); color: var(--ink); }
.btn-xs { min-height: 44px; padding: 8px 14px; font-size: 14px; font-weight: 500; }
.copy-field {
  flex: 1 1 220px;
  min-width: 0;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #85878E;
  border-radius: 10px;
  background: #FFFFFF;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}

/* ---------- simple pages (thanks, help, legal, 404) ---------- */
.page-hero { padding-block: 40px 28px; display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 768px) {
  .page-hero { padding-block: 72px 36px; }
}
.page-body { padding-bottom: 72px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
}
@media (min-width: 768px) {
  .card { padding: 28px; }
}
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack-lg { display: flex; flex-direction: column; gap: 40px; }

.legal-nav { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 15px; }
.legal-nav a { display: inline-flex; align-items: center; min-height: 44px; }
.legal-nav a[aria-current="page"] { color: var(--ink); text-decoration: none; font-weight: 600; }
.legal { display: flex; flex-direction: column; gap: 32px; }
.legal section { display: flex; flex-direction: column; gap: 10px; }
.legal h2 { font-family: var(--serif); font-weight: 500; font-size: 26px; line-height: 1.15; }
.legal p { color: var(--body); max-width: 40em; }

.resend-form { display: flex; flex-direction: column; gap: 10px; }
.resend-form label { font-size: 15px; font-weight: 600; }
.field-row { display: flex; flex-wrap: wrap; gap: 10px; }
.field-row input {
  flex: 1 1 240px;
  min-width: 0;
  min-height: 50px;
  padding: 12px 16px;
  /* 3.4:1 against the card, so the field edge is visible (WCAG 1.4.11) */
  border: 1px solid #85878E;
  border-radius: 12px;
  background: #FFFFFF;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}
.field-row input[aria-invalid="true"] { border-color: var(--warn); }
.field-row input:focus-visible { border-color: var(--accent); }
.field-row .btn { flex: 1 1 auto; }
@media (min-width: 560px) {
  .field-row .btn { flex: 0 0 auto; }
}
.form-status { min-height: 1.5em; font-size: 15px; color: var(--body); }
.form-status.is-error { color: var(--warn); }
.form-status.is-ok { color: var(--ok); }

/* /help/: "My downloads" (filled by app.js from this browser's order list; Open + Remove per order) */
.card[hidden] { display: none; }
.device-orders { list-style: none; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.device-order {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 12px;
  border-bottom: 1px solid var(--line);
}
.device-order-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.device-order-text strong { font-weight: 600; overflow-wrap: anywhere; }
.device-order-text .mono { font-size: 12px; }
.device-order-actions { display: flex; flex: none; gap: 8px; }
.device-order .btn { flex: none; }
.device-note { font-size: 14px; color: var(--muted); }

.contact-line { font-size: 17px; }
.contact-line a { font-weight: 600; overflow-wrap: anywhere; }

/* ---------- download page ---------- */
.dl-hero { padding-block: 40px 24px; display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 768px) {
  .dl-hero { padding-block: 64px 32px; }
}
.dl-hero p { color: var(--body); max-width: 38em; overflow-wrap: anywhere; }
.dl-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.dl-keep { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.dl-loading { display: flex; align-items: center; gap: 14px; padding-block: 64px; color: var(--muted); }
.jump { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 8px; }
.jump a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 14px;
  border: 1px solid var(--edge);
  border-radius: 999px;
  color: var(--ink);
  font-size: 14px;
  text-decoration: none;
}
.jump a:hover { border-color: var(--ink); }
.dl-packs { display: flex; flex-direction: column; gap: 22px; padding-bottom: 40px; }
.dl-pack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
}
@media (min-width: 768px) {
  .dl-pack { padding: 28px; }
}
.dl-pack-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.dl-pack-head h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(26px, 5vw, 34px); line-height: 1.1; }
.zip-grid { display: grid; gap: 10px; grid-auto-flow: row dense; }
@media (min-width: 640px) {
  .zip-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
}
.zip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 72px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  text-decoration: none;
}
.zip-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.zip-text strong { font-size: 17px; font-weight: 600; line-height: 1.25; }
.zip-text span { font-family: var(--mono); font-size: 13px; }
.zip svg { flex: none; }
.zip-1 { background: var(--accent); color: #FFFFFF; }
.zip-1:hover { background: var(--accent-hover); color: #FFFFFF; }
.zip-1 .zip-text span { color: #DCE3FF; }
.zip-2 { background: var(--ink); color: var(--card); }
.zip-2:hover { background: #2B2E35; color: var(--card); }
.zip-2 .zip-text span { color: #C9CBD1; }
.zip-3 { background: var(--paper); color: var(--ink); border-color: var(--line); }
.zip-3:hover { border-color: var(--ink); color: var(--ink); }
.zip-3 .zip-text span { color: var(--muted); }
.dl-hint { font-size: 14px; color: var(--muted); }
.files { border-top: 1px solid var(--line); }
.files details { border-bottom: 1px solid var(--line); }
.files details:last-child { border-bottom: 0; }
.files summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 10px 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.files summary::-webkit-details-marker { display: none; }
.files summary .mono { font-weight: 400; color: var(--muted); }
.files summary::after {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: translateY(-3px) rotate(45deg);
}
.files details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.summary-text { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  grid-auto-flow: row dense; /* a limit note (full row) lands under the tapped card's row, no hole */
  gap: 12px;
  padding: 4px 0 18px;
}
.file-grid-tall { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
.file {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #FFFFFF;
  color: var(--ink);
  text-decoration: none;
}
.file:hover { border-color: var(--ink); color: var(--ink); }
.file-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background: var(--soft);
}
.file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-name { font-size: 14px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.file-meta { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.file-dl { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--accent); }
/* friendly download limits (app.js asks with HEAD before a download starts) */
.zip.is-checking, .file.is-checking { cursor: progress; opacity: 0.8; }
.file.is-limited .file-dl { color: var(--warn); }
.dl-note {
  grid-column: 1 / -1;
  padding: 12px 14px;
  border: 1px solid #E2C9A8;
  border-radius: 10px;
  background: #FBF4EA;
  color: var(--body);
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.dl-note:empty { display: none; }
.howto { display: grid; gap: 20px; }
@media (min-width: 720px) {
  .howto { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 40px; }
}
@media (min-width: 1000px) {
  .howto { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.howto div { display: flex; flex-direction: column; gap: 4px; border-top: 2px solid var(--ink); padding-top: 12px; }
.howto strong { font-weight: 600; }
.howto p { font-size: 15px; color: var(--body); }

/* ---------- 404 ---------- */
.notfound { padding-block: 72px 96px; display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
/* the button row spans the column, so .btn-lg goes full width on phones like everywhere else */
.notfound .btn-row, #thanks-actions { align-self: stretch; }

/* ---------- touch screens: no "stuck" hover colours after a tap ---------- */
@media (hover: none) {
  .btn-accent:hover { background: var(--accent); }
  .btn-ink:hover { background: var(--ink); }
  .btn-outline:hover { background: transparent; border-color: var(--edge); }
  .btn-light:hover { background: var(--card); }
  .btn-ghost-light:hover { border-color: rgba(233, 235, 242, 0.4); color: var(--navy-text); }
  .nav-link:hover, .crumb:hover, .wordmark:hover { color: var(--ink); }
  .footer-links a:hover, .sheet-note a:hover { color: var(--muted); }
  .dark a:not(.btn):hover { color: #C8D3FF; }
  .incl:hover, .file:hover { border-color: var(--line); }
  .jump a:hover { border-color: var(--edge); }
  .zip-1:hover { background: var(--accent); }
  .zip-2:hover { background: var(--ink); }
  .zip-3:hover { border-color: var(--line); }
  .sheet-close:hover { background: transparent; }
  .nav-mine:hover { color: var(--ink); }
  .ready-close:hover, .hint-close:hover { background: transparent; }
  .hint-close:hover { color: var(--muted); }
}

/* ---------- print: never print the previews ---------- */
@media print {
  .protect img, .protect video { display: none !important; }
  .site-header, .buybar, .sheet, .ready-bar { display: none !important; }
}
