/* ==========================================================================
   Tech Knows You — iridescent pearl / holographic light mode
   Lilac · mint · baby blue · blush over near-white. Frosted glass, soft
   shadows, deep-ink type with a holographic sheen. Fashion-brand polish.
   ========================================================================== */

:root {
  --paper: #fdfcff;
  --ink: #1f1838;
  --ink-soft: #565073;
  --ink-faint: #8b86a6;

  --lilac: #c9b4ff;
  --mint: #aeeed4;
  --sky: #b4d8ff;
  --blush: #ffcfe2;
  --butter: #fdedc8;

  --glass: rgba(255, 255, 255, 0.58);
  --glass-strong: rgba(255, 255, 255, 0.78);
  --glass-edge: rgba(255, 255, 255, 0.9);

  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;

  --shadow-soft: 0 24px 60px -28px rgba(98, 74, 168, 0.35),
                 0 6px 18px -8px rgba(98, 74, 168, 0.18);
  --shadow-lift: 0 32px 70px -26px rgba(98, 74, 168, 0.45),
                 0 8px 22px -8px rgba(98, 74, 168, 0.22);

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Space Grotesk", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100svh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  overflow-x: hidden;
}

::selection { background: var(--lilac); color: var(--ink); }

a { color: inherit; }

/* --------------------------------------------------------------------------
   Animated gradient mesh background — never flat
   -------------------------------------------------------------------------- */

/* Perf note: the mesh animates TRANSFORM ONLY — no filters and no blend
   modes on animating layers (those force full-screen repaints every
   frame). Softness/saturation is baked into the gradient stops instead. */
.mesh {
  position: fixed;
  inset: -12%;
  z-index: -2;
  pointer-events: none;
}

.mesh__layer {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.mesh__layer--a {
  background:
    radial-gradient(42% 38% at 18% 22%, rgba(201, 180, 255, 0.65), transparent 70%),
    radial-gradient(40% 42% at 82% 16%, rgba(180, 216, 255, 0.6), transparent 70%),
    radial-gradient(46% 40% at 78% 80%, rgba(255, 207, 226, 0.55), transparent 72%),
    radial-gradient(38% 36% at 16% 84%, rgba(174, 238, 212, 0.6), transparent 70%);
  animation: drift-a 46s ease-in-out infinite alternate;
}

.mesh__layer--b {
  background:
    radial-gradient(34% 30% at 60% 40%, rgba(253, 237, 200, 0.5), transparent 72%),
    radial-gradient(30% 34% at 34% 58%, rgba(201, 180, 255, 0.42), transparent 70%),
    radial-gradient(28% 28% at 88% 52%, rgba(174, 238, 212, 0.4), transparent 70%);
  animation: drift-b 64s ease-in-out infinite alternate;
}

/* The rotating sheen used to be a soft-light blended conic layer; the
   blend made every frame of its rotation a full-screen repaint. Same
   look now comes from lower-alpha white stops, compositing normally,
   so the rotation is a cheap transform-only animation. Oversized so
   the square's corners never show while rotating. */
.mesh__sheen {
  position: absolute;
  inset: -30%;
  background: conic-gradient(
    from 180deg at 50% 50%,
    rgba(255, 255, 255, 0) 0deg,
    rgba(255, 255, 255, 0.22) 80deg,
    rgba(255, 255, 255, 0) 160deg,
    rgba(255, 255, 255, 0.15) 260deg,
    rgba(255, 255, 255, 0) 360deg
  );
  animation: sheen-spin 90s linear infinite;
}

@keyframes drift-a {
  0%   { transform: translate3d(-3%, -2%, 0) scale(1) rotate(0.001deg); }
  50%  { transform: translate3d(2.5%, 3%, 0) scale(1.08); }
  100% { transform: translate3d(4%, -3%, 0) scale(1.03); }
}

@keyframes drift-b {
  0%   { transform: translate3d(3%, 2%, 0) scale(1.05); }
  50%  { transform: translate3d(-2%, -3%, 0) scale(1); }
  100% { transform: translate3d(-4%, 3.5%, 0) scale(1.1); }
}

@keyframes sheen-spin {
  to { transform: rotate(1turn); }
}

/* Fine grain overlay */
.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

/* --------------------------------------------------------------------------
   Layout shell
   -------------------------------------------------------------------------- */

.shell {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4.5vw, 28px) 56px;
}

.site-header {
  max-width: 560px;
  margin: 0 auto;
  padding: clamp(14px, 4vw, 22px) clamp(16px, 4.5vw, 28px) 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  min-height: 44px;
}

.brand__mark {
  font-size: 0.85em;
  background: linear-gradient(120deg, var(--lilac), var(--sky), var(--mint), var(--blush));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.92rem;
  padding: 12px 10px;
  display: inline-block;
  border-radius: var(--radius-sm);
}

.site-nav a:hover { color: var(--ink); }

/* --------------------------------------------------------------------------
   Broadcast facts ticker — transform-only marquee, edge-to-edge
   -------------------------------------------------------------------------- */

.ticker {
  overflow: hidden;
  border-top: 1px solid rgba(31, 24, 56, 0.08);
  border-bottom: 1px solid rgba(31, 24, 56, 0.08);
  background: rgba(255, 255, 255, 0.45);
  padding: 9px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

.ticker__track {
  display: flex;
  width: max-content;
  animation: ticker-roll 56s linear infinite;
  will-change: transform;
}

@keyframes ticker-roll {
  to { transform: translateX(-50%); }
}

.ticker__list {
  display: flex;
  align-items: center;
  gap: 26px;
  padding-right: 26px;
  white-space: nowrap;
}

.ticker__item {
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.ticker__star {
  font-size: 0.7rem;
  background: linear-gradient(120deg, #7a5cd6, #3f86c9, #2fa886, #d6669c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --------------------------------------------------------------------------
   Shared-link landing banner
   -------------------------------------------------------------------------- */

.shared-banner {
  margin: 14px 0 6px;
  padding: 20px 22px 22px;
  border-radius: var(--radius-md);
  background: var(--glass-strong);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.shared-banner__label {
  margin: 0 0 4px;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.shared-banner__caption {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.25rem;
  line-height: 1.35;
  overflow-wrap: break-word;
}

.shared-banner__tags {
  margin: 8px 0 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.shared-banner__tags em {
  font-family: var(--font-display);
  font-size: 1.02rem;
  color: var(--ink);
}

.shared-banner__note {
  margin: 10px 0 14px;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.shared-banner__cta { width: 100%; }

/* --------------------------------------------------------------------------
   Hero: PSA headline + thesis
   -------------------------------------------------------------------------- */

.hero {
  text-align: center;
  padding: clamp(18px, 5vw, 30px) 0 4px;
}

/* Holographic PSA stamp — literal for reviewers, ironic for everyone else */
.psa-stamp {
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  margin: 0 0 16px;
  padding: 9px 18px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-radius: 999px;
  background:
    linear-gradient(var(--glass-strong), var(--glass-strong)) padding-box,
    linear-gradient(120deg, rgba(201,180,255,.95), rgba(180,216,255,.95), rgba(174,238,212,.95), rgba(255,207,226,.95)) border-box;
  border: 1.5px solid transparent;
  box-shadow: var(--shadow-soft);
}

.psa-stamp__star {
  letter-spacing: 0;
  background: linear-gradient(120deg, #7a5cd6, #3f86c9, #2fa886, #d6669c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__headline {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 560;
  font-size: clamp(1.85rem, 7.6vw, 2.9rem);
  line-height: 1.12;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.hero__headline em {
  font-style: italic;
  background: linear-gradient(115deg, #7a5cd6, #4f86d9 38%, #2fa886 70%, #d6669c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__sub {
  margin: 14px auto 0;
  max-width: 44ch;
  color: var(--ink-soft);
  font-size: 0.98rem;
  text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   Live money counter — kinetic eye-candy
   -------------------------------------------------------------------------- */

/* The thesis line sitting directly above the counter */
.counter-lede {
  margin: clamp(34px, 8vw, 48px) auto 0;
  max-width: 24ch;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 560;
  font-size: clamp(1.45rem, 5.8vw, 2.1rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.counter-lede em {
  font-style: italic;
  background: linear-gradient(115deg, #7a5cd6, #4f86d9 38%, #2fa886 70%, #d6669c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.counter {
  margin: clamp(14px, 3.5vw, 20px) 0 0;
  padding: 22px 18px 20px;
  border-radius: var(--radius-lg);
  text-align: center;
  background:
    linear-gradient(var(--glass), var(--glass)) padding-box,
    linear-gradient(120deg, rgba(201,180,255,.9), rgba(180,216,255,.9), rgba(174,238,212,.9), rgba(255,207,226,.9)) border-box;
  border: 1.5px solid transparent;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.counter::after {
  content: "";
  position: absolute;
  inset: -40% -60%;
  background: linear-gradient(105deg, transparent 42%, rgba(255,255,255,0.38) 50%, transparent 58%);
  animation: counter-gleam 7s ease-in-out infinite;
  pointer-events: none;
}

@keyframes counter-gleam {
  0%, 55%  { transform: translateX(-60%); }
  85%, 100% { transform: translateX(60%); }
}

.counter__label {
  margin: 0 0 6px;
  font-size: 0.74rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
}

.live-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34c08c;
}

/* Pulse ring: transform/opacity only (a box-shadow keyframe repaints). */
.live-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(52, 192, 140, 0.45);
  animation: live-pulse 2.2s ease-out infinite;
}

@keyframes live-pulse {
  0%        { transform: scale(1);    opacity: 0.7; }
  70%, 100% { transform: scale(3.2);  opacity: 0; }
}

.counter__figure {
  margin: 0;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(2.1rem, 9.5vw, 3.4rem);
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  /* Static holographic gradient: animating background-position on
     background-clip:text repainted the biggest text on the page every
     frame, forever. The iridescent look stays; the churn doesn't.
     Glow kept to a single tight drop-shadow layer (cheap, ≤24px). */
  background: linear-gradient(
      110deg,
      var(--ink) 0%, var(--ink) 30%,
      #6f55c8 44%, #3f86c9 52%, #2fa886 60%, #c95f96 68%,
      var(--ink) 82%, var(--ink) 100%
    );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 16px rgba(155, 130, 240, 0.45));
}

.counter__rate {
  margin: 8px 0 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.counter__rate-fine {
  display: block;
  margin-top: 2px;
  font-size: 0.74rem;
  font-weight: 400;
  color: var(--ink-faint);
}

.chrome-inline { color: inherit; }

/* --------------------------------------------------------------------------
   The 2×2 grid — the hero
   -------------------------------------------------------------------------- */

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(10px, 2.6vw, 16px);
  margin-top: clamp(18px, 4.5vw, 26px);
}

.tile {
  position: relative;
  aspect-ratio: 1 / 1.08;            /* fixed footprint: zero layout shift */
  border-radius: var(--radius-md);
  background:
    linear-gradient(var(--glass), var(--glass)) padding-box,
    linear-gradient(150deg, rgba(255,255,255,.95), rgba(201,180,255,.65), rgba(180,216,255,.6), rgba(255,207,226,.6)) border-box;
  border: 1.5px solid transparent;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.45s ease;
  animation: tile-in 0.8s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.tile:nth-child(1) { animation-delay: 0.05s; }
.tile:nth-child(2) { animation-delay: 0.14s; }
.tile:nth-child(3) { animation-delay: 0.23s; }
.tile:nth-child(4) { animation-delay: 0.32s; }

@keyframes tile-in {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@media (hover: hover) {
  .tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
}

.tile__label {
  position: absolute;
  top: 8px;
  left: 10px;
  z-index: 3;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  padding: 2px 8px;
}

.tile__adwrap {
  position: absolute;
  inset: 0;
  display: block;
}

.tile__adwrap .adsbygoogle {
  width: 100%;
  height: 100%;
}

/* Styled empty/fallback state — pure CSS + text, no images */
.tile__empty {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  text-align: center;
  background:
    radial-gradient(80% 70% at 30% 20%, rgba(201, 180, 255, 0.35), transparent 70%),
    radial-gradient(80% 70% at 75% 85%, rgba(174, 238, 212, 0.35), transparent 70%),
    radial-gradient(70% 70% at 80% 15%, rgba(255, 207, 226, 0.3), transparent 70%);
}

.tile.is-empty .tile__empty { display: flex; }
.tile.is-empty .tile__adwrap { visibility: hidden; }

.tile__empty-glyph {
  font-size: 1.5rem;
  color: var(--ink-faint);
  animation: glyph-float 5s ease-in-out infinite;
}

@keyframes glyph-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

.tile__empty-text {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(0.82rem, 3.2vw, 0.98rem);
  color: var(--ink-soft);
  max-width: 16ch;
  text-wrap: balance;
}

/* Loading shimmer / skeleton */
.tile.is-loading::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  background:
    linear-gradient(105deg,
      rgba(255,255,255,0) 38%,
      rgba(255,255,255,0.85) 50%,
      rgba(255,255,255,0) 62%),
    linear-gradient(150deg, rgba(244,240,255,.9), rgba(236,246,255,.9), rgba(255,242,248,.9));
  background-size: 250% 100%, 100% 100%;
  animation: shimmer 1.4s linear infinite;
}

@keyframes shimmer {
  from { background-position: 130% 0, 0 0; }
  to   { background-position: -130% 0, 0 0; }
}

.grid-notice {
  margin: 12px auto 0;
  max-width: 46ch;
  text-align: center;
  font-size: 0.82rem;
  color: var(--ink-faint);
}

/* --------------------------------------------------------------------------
   Caption — designed display + input
   -------------------------------------------------------------------------- */

.caption {
  margin: clamp(18px, 4.5vw, 26px) auto 0;
  max-width: 38ch;
  text-align: center;
}

.caption__text {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 520;
  font-size: clamp(1.2rem, 5.4vw, 1.6rem);
  line-height: 1.3;
  overflow-wrap: break-word;
  text-wrap: balance;
}

.caption__quote {
  background: linear-gradient(120deg, #7a5cd6, #d6669c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.caption__credit {
  margin-top: 6px;
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.caption-input {
  margin: 14px 0 0;
  position: relative;
}

.caption-input input {
  width: 100%;
  min-height: 52px;
  padding: 14px 64px 14px 18px;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--glass-strong);
  border: 1px solid var(--glass-edge);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  outline: none;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.caption-input input::placeholder {
  color: var(--ink-faint);
  font-style: italic;
}

.caption-input input:focus-visible {
  border-color: var(--lilac);
  box-shadow: 0 0 0 4px rgba(201, 180, 255, 0.35), var(--shadow-soft);
}

.caption-input__count {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-faint);
}

/* --------------------------------------------------------------------------
   Controls
   -------------------------------------------------------------------------- */

.controls {
  display: flex;
  gap: 12px;
  margin: 16px 0 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 52px;
  padding: 12px 22px;
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  border-radius: 999px;
  border: 1px solid var(--glass-edge);
  cursor: pointer;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.btn:focus-visible {
  outline: 3px solid #6f55c8;
  outline-offset: 3px;
}

.btn:active { transform: scale(0.97); }

.btn--ghost {
  flex: 1;
  background: var(--glass-strong);
  box-shadow: var(--shadow-soft);
}

.btn--primary {
  flex: 1.4;
  border: none;
  /* Static holo gradient — the infinite background-position slide was a
     persistent repaint loop for a barely-visible shimmer. */
  background: linear-gradient(115deg, var(--lilac), var(--sky) 35%, var(--mint) 68%, var(--blush));
  box-shadow: 0 14px 34px -12px rgba(122, 92, 214, 0.55);
}

.btn--primary:hover { filter: brightness(1.04); }

.btn--mini {
  min-height: 44px;
  padding: 10px 18px;
  font-size: 0.92rem;
  background: var(--glass-strong);
  box-shadow: var(--shadow-soft);
}

.btn[disabled] {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Field notes — the homepage editorial (publisher-content)
   -------------------------------------------------------------------------- */

.fieldnotes {
  margin: clamp(36px, 9vw, 56px) 0 0;
  padding: clamp(20px, 5vw, 30px);
  border-radius: var(--radius-lg);
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--shadow-soft);
}

.fieldnotes__heading {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.3rem, 5.2vw, 1.7rem);
  letter-spacing: -0.01em;
  text-align: center;
  text-wrap: balance;
}

.fieldnotes__prose {
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.6;
}

.fieldnotes__prose p { margin: 0 0 0.9em; }

.fieldnotes__prose strong,
.fieldnotes__prose em { color: var(--ink); }

.fieldnotes__lead {
  font-weight: 600;
  color: var(--ink);
}

.fieldnotes__steps {
  margin: 0 0 1em;
  padding-left: 1.4em;
}

.fieldnotes__steps li { margin-bottom: 0.55em; }

.fieldnotes__steps li::marker {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--ink-faint);
}

.fieldnotes__more {
  margin-bottom: 0 !important;
  text-align: center;
}

.fieldnotes__more a {
  font-weight: 600;
  color: var(--ink);
  text-decoration-color: var(--lilac);
  text-underline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Card preview modal ("Wrap it up" renders straight to here)
   -------------------------------------------------------------------------- */

.cardmodal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.cardmodal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(31, 24, 56, 0.38);
}

.cardmodal__panel {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 88svh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px 22px calc(24px + env(safe-area-inset-bottom, 0px));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: #fbfaff;
  border: 1px solid var(--glass-edge);
  box-shadow: var(--shadow-lift);
  animation: sheet-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

@keyframes sheet-in {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (min-width: 700px) {
  .cardmodal { align-items: center; padding: 24px; }

  .cardmodal__panel {
    border-radius: var(--radius-lg);
    padding-bottom: 24px;
  }
}

.cardmodal__title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  text-align: center;
}

.cardmodal__img {
  display: block;
  width: min(100%, 330px);
  margin: 0 auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lift);
}

.cardmodal__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.cardmodal__share { flex-basis: 100%; }

.cardmodal__note {
  margin: 12px auto 0;
  max-width: 40ch;
  font-size: 0.76rem;
  color: var(--ink-faint);
  text-align: center;
}

.cardmodal__close {
  display: block;
  margin: 10px auto 0;
  min-height: 44px;
  padding: 10px 16px;
  font: inherit;
  font-size: 0.86rem;
  color: var(--ink-soft);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--lilac);
  text-underline-offset: 3px;
  -webkit-tap-highlight-color: transparent;
}

.cardmodal__close:focus-visible { outline: 3px solid #6f55c8; outline-offset: 2px; border-radius: var(--radius-sm); }

/* --------------------------------------------------------------------------
   Stats / methodology / sources
   -------------------------------------------------------------------------- */

.stats {
  margin: clamp(36px, 9vw, 56px) 0 0;
}

.stats__heading {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.4rem, 5.6vw, 1.9rem);
  text-align: center;
  letter-spacing: -0.01em;
}

.stats__lede {
  margin: 8px auto 18px;
  max-width: 42ch;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.stats__cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.stat-card {
  padding: 18px 16px;
  border-radius: var(--radius-md);
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--shadow-soft);
}

.stat-card__figure {
  margin: 0 0 6px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(1.3rem, 5.4vw, 1.7rem);
  background: linear-gradient(115deg, #5d44b8, #3f86c9 50%, #258a6d);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-card__desc {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

.method {
  margin: 16px 0 0;
  border-radius: var(--radius-md);
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.method__summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 20px;
  min-height: 52px;
  display: flex;
  align-items: center;
  font-weight: 600;
  font-size: 0.98rem;
}

.method__summary::-webkit-details-marker { display: none; }

.method__summary::before {
  content: "＋";
  margin-right: 10px;
  font-weight: 400;
  color: var(--ink-faint);
  transition: transform 0.25s ease;
}

.method[open] .method__summary::before { content: "−"; }

.method__summary:focus-visible {
  outline: 3px solid #6f55c8;
  outline-offset: -3px;
  border-radius: var(--radius-md);
}

.method__body {
  padding: 0 20px 18px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.method__body strong { color: var(--ink); }

.sources {
  margin-top: 18px;
  font-size: 0.86rem;
}

.sources__heading {
  margin: 0 0 8px;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.sources__list {
  margin: 0;
  padding-left: 1.2em;
  color: var(--ink-soft);
}

.sources__list li { margin-bottom: 6px; }

.sources__list a {
  color: var(--ink);
  text-decoration-color: var(--lilac);
  text-underline-offset: 3px;
}

.sources__note {
  margin: 12px 0 0;
  font-size: 0.78rem;
  color: var(--ink-faint);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  margin-top: clamp(40px, 10vw, 64px);
  padding-top: 22px;
  border-top: 1px solid rgba(31, 24, 56, 0.08);
  text-align: center;
  font-size: 0.84rem;
  color: var(--ink-soft);
}

.site-footer__brand {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-style: italic;
}

.site-footer nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 6px;
}

.site-footer nav a {
  text-decoration: none;
  color: var(--ink-soft);
  padding: 10px 10px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-sm);
}

.site-footer nav a:hover { color: var(--ink); }

.site-footer__fine {
  margin: 8px 0 0;
  font-size: 0.74rem;
  color: var(--ink-faint);
}

/* --------------------------------------------------------------------------
   Screenshot mode
   -------------------------------------------------------------------------- */

.watermark {
  display: none;            /* revealed in screenshot mode */
  width: fit-content;
  margin: 16px 4px 0 auto;  /* right corner of the composition */
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.88rem;
  color: var(--ink-soft);
  background: var(--glass-strong);
  border: 1px solid var(--glass-edge);
  border-radius: 999px;
  padding: 7px 14px;
  box-shadow: var(--shadow-soft);
}

.watermark__mark {
  font-style: normal;
  background: linear-gradient(120deg, #7a5cd6, #3f86c9, #2fa886, #d6669c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Screenshot mode shows the grid + the URL watermark and nothing else,
   centred in the viewport over the mesh — the cleanest possible crop. */
body.screenshot-mode .chrome,
body.screenshot-mode .hero,
body.screenshot-mode .counter-lede,
body.screenshot-mode .counter,
body.screenshot-mode .caption { display: none !important; }

/* Centred directly under the grid */
body.screenshot-mode .watermark {
  display: block;
  margin: 18px auto 0;
}

body.screenshot-mode .shell {
  min-height: 100vh;            /* fallback: browsers without svh */
  min-height: 100svh;           /* svh = height with mobile toolbars shown */
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 12px;
  /* Reserve the fixed shotbar (+ iOS home-indicator) so the centred
     composition never sits under it. */
  padding-bottom: calc(170px + env(safe-area-inset-bottom, 0px));
}

/* Size the 2×2 grid to the LARGEST square that still leaves room for the
   watermark and the shotbar on a single screen — width is driven by the
   available height ÷ the grid's ~1.08 aspect, capped at the column width.
   Using svh means it fits even with a mobile browser's URL bar showing. */
body.screenshot-mode .grid {
  margin-top: 0;
  margin-inline: auto;
  width: min(100%, calc((100vh - 254px) / 1.08));    /* fallback */
  width: min(100%, calc((100svh - 254px) / 1.08));
}

/* Wider screens show the extra "Capture it for me" button, so the shotbar
   is taller — give the composition more bottom clearance there. */
@media (min-width: 700px) {
  body.screenshot-mode .shell {
    padding-bottom: calc(220px + env(safe-area-inset-bottom, 0px));
  }
}

/* While a one-click capture frame is being grabbed, hide our own UI so
   it never appears in the shot (the elements are fixed — no reflow). */
body.is-capturing .shotbar,
body.is-capturing .toast { visibility: hidden; }

.toast {
  position: fixed;
  top: calc(14px + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  background: rgba(31, 24, 56, 0.88);
  color: #fdfcff;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 12px 20px;
  border-radius: 999px;
  box-shadow: 0 18px 44px -14px rgba(31, 24, 56, 0.5);
  animation: toast-life 4.4s ease forwards;
  pointer-events: none;
  white-space: nowrap;
  max-width: calc(100vw - 32px);
}

@keyframes toast-life {
  0%   { opacity: 0; transform: translate(-50%, -12px); }
  8%   { opacity: 1; transform: translate(-50%, 0); }
  80%  { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -8px); }
}

.shotbar {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: min(92vw, 420px);
}

.shotbar__link,
.shotbar__alt,
.shotbar__exit {
  font: inherit;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.shotbar__link {
  min-height: 48px;
  padding: 12px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--ink);
  background: var(--glass-strong);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--shadow-soft);
}

.shotbar__link:focus-visible,
.shotbar__alt:focus-visible,
.shotbar__exit:focus-visible {
  outline: 3px solid #6f55c8;
  outline-offset: 3px;
}

.shotbar__targets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.shotbar__alt,
.shotbar__exit {
  min-height: 44px;
  padding: 10px 16px;
  background: none;
  color: var(--ink-soft);
  font-size: 0.86rem;
  text-decoration: underline;
  text-decoration-color: var(--lilac);
  text-underline-offset: 3px;
  border-radius: var(--radius-sm);
}

.shotbar__alt { margin-bottom: -10px; }

/* --------------------------------------------------------------------------
   Consent banner
   -------------------------------------------------------------------------- */

.consent {
  position: fixed;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 80;
  width: min(94vw, 480px);
  padding: 18px 18px 16px;
  border-radius: var(--radius-md);
  background: var(--glass-strong);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--shadow-lift);
  animation: consent-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) backwards;
  animation-delay: 0.6s;
}

@keyframes consent-in {
  from { opacity: 0; transform: translate(-50%, 16px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

.consent__title {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
}

.consent__text {
  margin: 0 0 12px;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.consent__text a {
  color: var(--ink);
  text-decoration-color: var(--lilac);
  text-underline-offset: 3px;
}

.consent__actions {
  display: flex;
  gap: 10px;
}

.consent__actions .btn { flex: 1; min-height: 48px; font-size: 0.94rem; }

/* --------------------------------------------------------------------------
   Content pages (about / privacy / terms / cookies)
   -------------------------------------------------------------------------- */

.page {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4.5vw, 28px) 64px;
}

.page-hero {
  text-align: center;
  padding: clamp(20px, 6vw, 40px) 0 8px;
}

.page-hero__kicker {
  margin: 0 0 10px;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.page-hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.8rem, 7vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.page-hero__date {
  margin: 10px 0 0;
  font-size: 0.8rem;
  color: var(--ink-faint);
}

.prose {
  margin-top: clamp(18px, 5vw, 30px);
  padding: clamp(20px, 5vw, 34px);
  border-radius: var(--radius-lg);
  background: var(--glass-strong);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--shadow-soft);
  font-size: 0.96rem;
  color: var(--ink-soft);
}

.prose h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--ink);
  margin: 1.8em 0 0.5em;
  letter-spacing: -0.01em;
}

.prose h2:first-child { margin-top: 0; }

.prose h3 {
  font-size: 1.02rem;
  color: var(--ink);
  margin: 1.5em 0 0.4em;
}

.prose p { margin: 0 0 1em; }

.prose ul { margin: 0 0 1em; padding-left: 1.3em; }

.prose li { margin-bottom: 0.4em; }

.prose strong { color: var(--ink); }

.prose a {
  color: var(--ink);
  text-decoration-color: var(--lilac);
  text-underline-offset: 3px;
}

.prose em { color: var(--ink); }

.prose blockquote {
  margin: 1.2em 0;
  padding: 0.2em 0 0.2em 1em;
  border-left: 3px solid var(--lilac);
  font-family: var(--font-display);
  font-style: italic;
  color: var(--ink);
}

.back-home {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 20px;
  font-weight: 600;
  color: var(--ink);
  text-decoration-color: var(--lilac);
  text-underline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Utilities & responsive
   -------------------------------------------------------------------------- */

/* The hidden attribute must always win, even over display:flex rules. */
[hidden] { display: none !important; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 700px) {
  .shell, .site-header { max-width: 620px; }
  .tile { aspect-ratio: 1 / 1; }
}

/* --------------------------------------------------------------------------
   Reduced motion — calm everything down
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .mesh__layer--a,
  .mesh__layer--b,
  .mesh__sheen,
  .counter::after,
  .counter__figure,
  .btn--primary,
  .live-dot,
  .tile,
  .tile__empty-glyph,
  .ticker__track,
  .cardmodal__panel,
  .consent {
    animation: none !important;
  }

  .counter__figure {
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
    color: var(--ink);
    filter: none;
  }

  .tile.is-loading::before {
    animation: none !important;
    background: linear-gradient(150deg, rgba(244,240,255,.9), rgba(236,246,255,.9), rgba(255,242,248,.9));
  }

  .tile { transition: none; }
  .toast { animation: toast-life-static 4.4s steps(1, end) forwards; }

  @keyframes toast-life-static {
    0%   { opacity: 1; }
    99%  { opacity: 1; }
    100% { opacity: 0; }
  }
}
