/* ===== ZealVector — home page ===== */
/* Site theme matches news tiles = GradientDemo.jpeg blue → purple.
   Tile size restored toward original compact card (min-height 132px, tighter padding). */

:root {
  /* Deep blue field (left edge of GradientDemo) */
  --bg: #06102a;
  --text: #f4f0ff;
  --muted: #c8bce8;
  --muted-2: #8f7fb8;
  /* Mid blue + right-side purple from tile gradient */
  --accent: #2a56b9;
  --accent-2: #b879e1;
  --accent-rgb: 42, 86, 185;
  --accent-2-rgb: 184, 121, 225;
  /* Chrome uses same family as tiles */
  --surface: linear-gradient(
    115deg,
    #054bad 0%,
    #2a56b9 40%,
    #7267cd 70%,
    #b879e1 100%
  );
  /* News tiles: GradientDemo.jpeg frame L→R */
  --tile-grad: linear-gradient(
    115deg,
    #004aad 0%,
    #054bad 18%,
    #2a56b9 38%,
    #7267cd 58%,
    #b879e1 78%,
    #da83eb 100%
  );
  --btn-grad: linear-gradient(135deg, #2a56b9 0%, #b879e1 100%);
  --glass-bg: linear-gradient(160deg, rgba(var(--accent-rgb), 0.22), rgba(var(--accent-2-rgb), 0.08));
  --glass-border: rgba(255, 255, 255, 0.14);
  --pill-bg: rgba(255, 255, 255, 0.08);
  --font: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
  /* Matte paper grain — tiled, desaturated, contrast-boosted fractal noise.
     Reused across every surface; blended over each element's own background
     with background-blend-mode so colors/behaviour never change. */
  --paper-grain: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='170' height='170'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/><feComponentTransfer><feFuncR type='linear' slope='1.7' intercept='-0.35'/><feFuncG type='linear' slope='1.7' intercept='-0.35'/><feFuncB type='linear' slope='1.7' intercept='-0.35'/></feComponentTransfer></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
}

#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
  /* Decorative only — never steal taps from forms/buttons (mobile WebViews). */
  pointer-events: none;
}

/* vignette to darken page edges */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 38%, transparent 55%, rgba(4, 12, 36, 0.55) 100%),
    linear-gradient(to bottom, rgba(4, 12, 36, 0.32), transparent 18%, transparent 75%, rgba(4, 12, 36, 0.45));
}

.page {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 22px 34px 40px;
}

/* ===== Glassmorphism ===== */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px) saturate(1.6);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  box-shadow: 0 8px 32px rgba(4, 20, 60, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

/* ===== Nav ===== */
.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  padding: 15px 20px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 48px;
  height: 48px;
  padding: 3.5px;
  border-radius: 50%;
  background: #fff;
}

.brand-logo {
  width: 100%;
  height: auto;
  display: block;
}

.footer .brand-mark {
  width: 38px;
  height: 38px;
  padding: 2.5px;
}

.brand-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 24px 6px 66px;
  text-align: center;
}

.hero-title {
  font-size: 66px;
  line-height: 1.08;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  background: linear-gradient(180deg, #ffffff 45%, #da83eb 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-tagline {
  font-size: 24px;
  line-height: 1.4;
  color: #e9e2ff;
  font-weight: 550;
  letter-spacing: -0.01em;
  max-width: 680px;
  margin: 0 auto 16px;
  text-shadow: 0 1px 12px rgba(4, 12, 36, 0.85), 0 0 28px rgba(4, 12, 36, 0.6);
}

.hero-sub {
  font-size: 20px;
  line-height: 1.55;
  color: #c8bce8;
  font-weight: 400;
  max-width: 640px;
  margin: 0 auto;
  text-shadow: 0 1px 12px rgba(4, 12, 36, 0.85), 0 0 28px rgba(4, 12, 36, 0.6);
}

.hero-title {
  filter: drop-shadow(0 2px 14px rgba(4, 12, 36, 0.55));
}

.hero-actions {
  margin-top: 28px;
  display: flex;
  justify-content: center;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 25px;
  border-radius: 11px;
  font-size: 15.5px;
  font-weight: 600;
  font-family: var(--font);
  text-decoration: none;
  border: 1px solid #ffffff;
  cursor: pointer;
  color: var(--text);
  transition: filter .15s, background .15s;
}

.btn-sm { padding: 9px 17px; font-size: 13.5px; border-radius: 9px; }

.btn-primary {
  background: var(--btn-grad);
  box-shadow: 0 6px 24px rgba(var(--accent-rgb), 0.4), 0 0 40px rgba(var(--accent-rgb), 0.28);
}
.btn-primary:hover { filter: brightness(1.08); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid #ffffff;
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }

/* ===== Month / week sections ===== */
.month-tag {
  width: fit-content;
  margin: 0 auto 30px;
  padding: 8px 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Visually hidden but available to screen readers / document outline. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.week { margin-bottom: 34px; }
.week:last-of-type { margin-bottom: 0; }

/* ===== Week selector (tabs above & below the visible week) ===== */
.week-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
}
.week-nav-top { margin: 0 auto 26px; }
.week-nav-bottom { margin: 30px auto 0; }

.week-pill {
  display: inline-block;
  padding: 6px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 650;
  color: var(--text);
}

/* Pills that act as tab buttons */
.week-tab {
  -webkit-appearance: none;
  appearance: none;
  font: inherit;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.week-tab:hover { transform: translateY(-1px); }
.week-tab:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

/* The week currently being viewed */
.week-tab[aria-selected="true"] {
  background: linear-gradient(135deg, rgba(var(--accent-2-rgb), 0.38) 0%, rgba(var(--accent-rgb), 0.38) 100%);
  border-color: rgba(var(--accent-rgb), 0.55);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.3), 0 6px 18px rgba(var(--accent-rgb), 0.28);
  cursor: default;
}
.week-tab[aria-selected="true"]:hover { transform: none; }

/* ===== Card grid ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.card {
  /* Original compact card sizing (pre min-height: 320px era) */
  border-radius: 14px;
  padding: 16px 18px 18px;
  /* Solid fallback if gradient fails to paint */
  background-color: #2a56b9;
  border: 1px solid #fff;
}

/*
 * Flip faces use preserve-3d + backface-visibility. Many engines (esp. Safari /
 * Chrome) paint `background: var(--gradient)` as a single solid stop on those
 * layers. Fix: explicit background-image (not only a custom property) + a
 * pseudo-element fill that is forced onto its own composited layer.
 */
.card.glass,
.flip-face.card {
  position: relative;
  overflow: hidden;
  background-color: #2a56b9;
  background-image: linear-gradient(
    115deg,
    #004aad 0%,
    #054bad 18%,
    #2a56b9 38%,
    #7267cd 58%,
    #b879e1 78%,
    #da83eb 100%
  );
  background-repeat: no-repeat;
  background-size: 100% 100%;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 6px 22px rgba(5, 40, 120, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

/* Readable type on bright tile gradient */
.card .meta,
.card .card-desc,
.card .back-body,
.card .analysis li,
.card .back-hint,
.card .back-hint-desktop,
.card .back-hint-mobile {
  color: rgba(255, 255, 255, 0.88);
}
.card .pill {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.32);
}
.card .flip-hint,
.card .analysis-label {
  color: #ffe9ff;
}

.flip-face.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: 0;
  pointer-events: none;
  /* Matte paper grain (tiled, desaturated fractal noise) blended over the
     SAME GradientDemo stops — colors and stops unchanged, just a fine texture.
     Gradient stops duplicated so paint cannot collapse to one stop. */
  background-image:
    var(--paper-grain),
    linear-gradient(
      115deg,
      #004aad 0%,
      #054bad 18%,
      #2a56b9 38%,
      #7267cd 58%,
      #b879e1 78%,
      #da83eb 100%
    );
  background-repeat: repeat, no-repeat;
  background-size: 160px 160px, 100% 100%;
  background-blend-mode: overlay, normal;
  transform: translateZ(0.01px);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.flip-face.card > * {
  position: relative;
  z-index: 1;
}

/* visibility swaps at 0.325s = midpoint of the 0.65s rotation, when the face
   is edge-on. Safari ignores backface-visibility on composited children
   (the z-index gradient layers below), so without this hard swap the front
   and back text render blended mid- and post-flip. */
.flip-front {
  transition: border-color .18s, box-shadow .18s, visibility 0s linear 0.325s;
}
.flip-card.flipped .flip-front { visibility: hidden; }
.flip-card.flipped .flip-face.flip-back { visibility: visible; }
.flip-card:hover .flip-front {
  border-color: rgba(var(--accent-2-rgb), 0.55);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.25), 0 10px 34px rgba(6, 5, 12, 0.5), 0 0 28px rgba(var(--accent-rgb), 0.2);
}

.pill {
  display: inline-block;
  align-self: flex-start;
  width: fit-content;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent-2);
  background: rgba(var(--accent-rgb), 0.14);
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 14px;
}

.card-row {
  display: flex;
  align-items: center;
  gap: 13px;
}

.card-icon {
  flex: none;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
}

.icon-img {
  background: radial-gradient(circle at 35% 35%, #8e6fd6 0%, #475dc2 50%, #054bad 100%);
}

.icon-solid {
  background: #eef0f8;
  color: #3c2882;
  font-weight: 700;
  font-size: 17px;
}

.icon-x { background: #06102a; }

.card-text h3 {
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.meta {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

/* ===== Flip cards ===== */
.flip-card {
  position: relative;
  perspective: 1400px;
  cursor: pointer;
  outline: none;
  /* Original compact floor; height grows with content (not forced 320px) */
  min-height: 132px;
}

.flip-card:focus-visible .flip-front {
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.55);
}

/* Phone side chevrons (shown only in ≤680px media query). Outside .flip-inner
   so they do not reverse with the 3D face. pointer-events: none — hits go to zones. */
.flip-card::before,
.flip-card::after {
  display: none;
  content: none;
  pointer-events: none;
}

.flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.65s cubic-bezier(0.4, 0.1, 0.2, 1);
  transform-style: preserve-3d;
}

.flip-card.flipped .flip-inner { transform: rotateY(180deg); }

.flip-face {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.flip-front {
  position: relative;
  width: 100%;
  height: 100%;
  /* Tile size floor (~1.5x the natural ~250px content height). The front
     face is the in-flow element, so its min-height is what actually sizes
     the card; .flip-card's own min-height can't stretch the faces. */
  min-height: 380px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 8px;
}

/* .flip-face.flip-back (not .flip-back alone): needs to match the
   (.card.glass, .flip-face.card) specificity above so position/overflow
   here actually win instead of silently losing the position/overflow tie
   and leaving the back face in normal flow below the card. */
.flip-face.flip-back {
  position: absolute;
  inset: 0;
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: flex-start;
  overflow: auto;
  /* Hidden until the midpoint swap (see .flip-front's visibility note);
     backface-visibility alone is not reliable in Safari. */
  visibility: hidden;
  transition: visibility 0s linear 0.325s;
}

.flip-back h3 {
  font-size: 14.5px;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.back-body {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
}

/* front summary (visible by default) */
.card-desc {
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.flip-hint {
  margin-top: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-2);
}

/* Desktop / tablet / iPad: simple flip copy.
   Phone (≤680px): three-zone prev/flip/next copy (see media query). */
.flip-hint-mobile,
.back-hint-mobile {
  display: none;
}

/* share row — injected into .flip-front by js/main.js */
.tile-share {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: background-color .18s, opacity .18s;
}

.share-btn svg {
  width: 16px;
  height: 16px;
  fill: rgba(255, 255, 255, 0.85);
  pointer-events: none; /* clicks always land on the button, never a path */
}

.share-btn:hover,
.share-btn:focus-visible {
  background: rgba(255, 255, 255, 0.18);
}

.share-btn:hover svg,
.share-btn:focus-visible svg,
.share-btn.is-copied svg {
  fill: #fff;
}

.share-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* back analysis points */
.analysis {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.analysis li {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
}

.analysis-label {
  color: var(--accent-2);
  font-weight: 650;
}

.back-hint {
  margin-top: auto;
  font-size: 11px;
  color: var(--muted-2);
}

.back-hint-desktop,
.back-hint-mobile {
  margin-top: auto;
  font-size: 11px;
  color: var(--muted-2);
}

/* Newsletter */
.newsletter { display: flex; flex-wrap: wrap; gap: 10px; }

.newsletter input {
  flex: 1;
  min-width: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 9px;
  padding: 11px 14px;
  color: var(--text);
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  transition: border-color .15s;
}
.newsletter input::placeholder { color: var(--muted); }
.newsletter input:focus { border-color: rgba(var(--accent-rgb), 0.55); }
.newsletter input[aria-invalid="true"] { border-color: rgba(255, 120, 120, 0.7); }
.newsletter input[aria-invalid="true"]:focus { border-color: rgba(255, 120, 120, 0.9); }

/* Anti-bot honeypot: off-screen, out of the layout and tab order.
   Kept in the DOM (not display:none) so simple bots still fill it. */
.newsletter input.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  flex: 0 0 auto;
  opacity: 0;
  pointer-events: none;
}

.newsletter-msg {
  flex-basis: 100%;
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.35;
  text-align: right;
  color: var(--muted);
}
.newsletter-msg.is-error { color: #ff9090; }
.newsletter-msg.is-ok { color: #7fe0a8; }

.btn-arrow {
  flex: none;
  width: 44px;
  height: 42px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 9px;
  background: var(--btn-grad);
  cursor: pointer;
  transition: filter .15s;
}
.btn-arrow:hover { filter: brightness(1.08); }

/* ===== Contact CTA band ===== */
.contact-cta {
  margin-top: 44px;
  border-radius: 20px;
  padding: 22px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px 28px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.contact-cta-title {
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.contact-cta-sub {
  font-size: 14px;
  color: var(--muted);
  margin-top: 4px;
}

.contact-cta-btn {
  flex: none;
  white-space: nowrap;
}

.contact-cta-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ===== Contact band (matches the solutions page) ===== */
.sol-contact {
  margin-top: 44px;
  border-radius: 20px;
  padding: 46px 32px 42px;
  text-align: center;
  /* Dark scrim over the brand gradient: the bare --surface ramp peaks too
     bright for AA text (even #fff is ~3:1 on #b879e1). */
  background: linear-gradient(rgba(6, 16, 42, 0.55), rgba(6, 16, 42, 0.55)), var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 8px 32px rgba(4, 20, 60, 0.45);
}

.sol-contact-title {
  font-size: 30px;
  font-weight: 650;
  letter-spacing: -0.015em;
  margin-bottom: 10px;
}

.sol-contact-sub {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  max-width: 52ch;
  margin: 0 auto 24px;
}

.sol-contact .btn-primary {
  box-shadow: 0 6px 24px rgba(4, 12, 36, 0.45);
}

.sol-contact-mail {
  display: block;
  margin-top: 16px;
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--text);
}

@media (max-width: 680px) {
  .sol-contact-title { font-size: 26px; }
}

/* ===== Footer ===== */
.footer {
  margin-top: 44px;
  border-radius: 16px;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.footer .brand-name { font-size: 16px; }

.footer-copy {
  font-size: 12.5px;
  color: var(--muted-2);
  margin-left: 6px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.footer-links a,
.link-btn {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  transition: color .15s;
}
.footer-links a:hover, .link-btn:hover { color: var(--text); }

.link-btn {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font);
  cursor: pointer;
}

.footer-mail { color: var(--accent-2) !important; }
.footer-mail:hover { text-decoration: underline !important; }

.footer-newsletter {
  gap: 8px;
  align-items: center;
}

.footer-newsletter-label {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  margin-right: 2px;
}

.footer-newsletter input {
  width: 170px;
  flex: none;
  padding: 8px 12px;
}

.footer-newsletter .btn-arrow {
  width: 38px;
  height: 36px;
}

/* ===== Cookie banner ===== */
.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 50;
  width: min(880px, calc(100vw - 40px));
  border-radius: 14px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 20px;
  background: rgba(8, 24, 64, 0.92);
}

.cookie-banner p {
  flex: 1;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
}

.cookie-actions { display: flex; gap: 10px; flex: none; flex-wrap: wrap; }

/* ===== Cookie settings modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  background: rgba(4, 12, 36, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal {
  width: min(520px, calc(100vw - 40px));
  border-radius: 16px;
  padding: 28px;
  background: rgba(20, 48, 120, 0.94);
}

.modal h3 { font-size: 20px; font-weight: 650; margin-bottom: 8px; }

.modal-sub {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
  margin-bottom: 20px;
}

.cookie-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.cookie-option strong { font-size: 14.5px; }

.cookie-option p {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 3px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

/* toggle switch */
.switch {
  position: relative;
  flex: none;
  width: 44px;
  height: 24px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: background .2s;
}
.slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 2px;
  top: 2px;
  border-radius: 50%;
  background: #999fdc;
  transition: transform .2s, background .2s;
}
.switch input:checked + .slider {
  background: var(--btn-grad);
}
.switch input:checked + .slider::before { transform: translateX(20px); background: #fff; }
.switch.disabled .slider { cursor: not-allowed; opacity: 0.55; }

[hidden] { display: none !important; }

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .hero-title { font-size: 48px; }
}

@media (max-width: 680px) {
  .grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 36px; }
  .hero-tagline { font-size: 20px; }
  .footer { justify-content: center; }
  .cookie-banner { flex-direction: column; align-items: flex-start; }

  /* Footer newsletter: full-width field + 44px tap target on phones/tablets */
  .footer-newsletter {
    width: 100%;
    justify-content: center;
  }
  .footer-newsletter-label {
    width: 100%;
    text-align: center;
    margin-bottom: 2px;
  }
  .footer-newsletter input {
    width: auto;
    flex: 1 1 160px;
    min-width: 0;
    min-height: 44px;
  }
  .footer-newsletter .btn-arrow {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  /* Phone: show three-zone hints; hide desktop flip-only hints */
  .flip-hint-desktop,
  .back-hint-desktop {
    display: none;
  }
  .flip-hint-mobile,
  .back-hint-mobile {
    display: block;
  }

  /* Roomier thumb targets; icons sit inside the prev/next side zones but
     js/main.js lets the share click win over the zone. */
  .tile-share { gap: 14px; }
  .share-btn { width: 34px; height: 34px; }

  /* Small side arrows for prev / next (except first left / last right) */
  .flip-card::before,
  .flip-card::after {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 28px;
    height: 28px;
    margin-top: -14px;
    border-radius: 50%;
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
    color: var(--accent-2);
    background: rgba(10, 8, 18, 0.55);
    border: 1px solid rgba(var(--accent-rgb), 0.45);
    pointer-events: none;
    opacity: 0.85;
  }
  .flip-card::before {
    content: "\2039"; /* ‹ */
    left: 6px;
  }
  .flip-card::after {
    content: "\203A"; /* › */
    right: 6px;
  }
  .flip-card.is-first::before {
    display: none;
    content: none;
  }
  .flip-card.is-last::after {
    display: none;
    content: none;
  }
}

/* ===== Matte paper grain on chrome surfaces =====
   Same texture as the news tiles, blended over each surface's EXISTING
   background via background-blend-mode. Each element's base background is
   re-declared as the lower layer so colors, gradients, and behaviour are
   unchanged — the surfaces just gain a fine matte tooth instead of gloss. */

/* --surface gradient surfaces: nav bar + contact CTA band */
.nav,
.contact-cta {
  background-image: var(--paper-grain), var(--surface);
  background-repeat: repeat, no-repeat;
  background-size: 160px 160px, 100% 100%;
  background-blend-mode: overlay, normal;
}

/* --btn-grad buttons: primary + arrow */
.btn-primary,
.btn-arrow {
  background-image: var(--paper-grain), var(--btn-grad);
  background-repeat: repeat, no-repeat;
  background-size: 150px 150px, 100% 100%;
  background-blend-mode: overlay, normal;
}

/* NOTE: translucent "glass" surfaces (ghost buttons, .glass chrome such as the
   footer / month tag / week pills / sol-bridge, and the current-week pill) get
   NO grain on purpose. An opaque noise layer there kills their translucency and
   overlay-blends their light tint toward gray. They keep their original look. */

/* solid-fill chrome: cookie banner + settings modal (grain over their own color) */
.cookie-banner,
.modal {
  background-image: var(--paper-grain);
  background-repeat: repeat;
  background-size: 160px 160px;
  background-blend-mode: overlay;
}

/* =====================================================================
   ===== HIGH-CONTRAST THEME (html[data-theme="contrast"]) =============
   This is now the site's only theme: data-theme="contrast" is hardcoded
   on the <html> tag of every page, so these rules always match. The base
   :root tokens above remain as the fallback layer these override — do
   not delete them. Every pair below meets WCAG AA — worst text pair
   4.65:1 (#ffe9ff on #8a52b4), worst UI pair 3.5:1.
   ===================================================================== */

/* -- tokens. :root[data-theme="contrast"] (0,2,0) outranks :root (0,1,0).
      --bg stays #06102a on purpose: the WebGL canvases clear to 0x06102a
      and must keep matching the page behind them. */
:root[data-theme="contrast"] {
  --text: #ffffff;
  --muted: #ddd6f3;
  --muted-2: #c9bfe4;
  --accent: #6d93e8;
  --accent-2: #d9b3f2;
  /* darker glass tint so small text passes even over the brightest
     canvas ribbon (#da83eb) behind the panel */
  --accent-2-rgb: 138, 82, 180;
  --surface: linear-gradient(
    115deg,
    #003a87 0%,
    #24479a 40%,
    #52449e 70%,
    #71459e 100%
  );
  --tile-grad: linear-gradient(
    115deg,
    #003a87 0%,
    #04408f 18%,
    #24479a 38%,
    #52449e 58%,
    #7a4aa8 78%,
    #8a52b4 100%
  );
  --btn-grad: linear-gradient(135deg, #24479a 0%, #7a4aa8 100%);
  --glass-bg: linear-gradient(160deg, rgba(6, 16, 42, 0.85), rgba(24, 18, 52, 0.78));
  --glass-border: rgba(255, 255, 255, 0.38);
}

/* -- hero: colors hardcoded in the base rules. Re-declare BOTH clip
      properties — the background shorthand would reset background-clip.
      The tight dark drop-shadow halo keeps the glyph-adjacent pixels dark
      even when a bright animated canvas streak passes behind the text
      (streak peaks measure ~2.4:1 against bare white). */
[data-theme="contrast"] .hero-title {
  background: linear-gradient(180deg, #ffffff 55%, #e9c6f7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 1px 3px rgba(4, 8, 20, 0.95)) drop-shadow(0 0 10px rgba(4, 8, 20, 0.85));
}
[data-theme="contrast"] .hero-tagline,
[data-theme="contrast"] .hero-sub {
  text-shadow: 0 0 4px rgba(4, 8, 20, 0.95), 0 1px 12px rgba(4, 8, 20, 0.9), 0 0 28px rgba(4, 8, 20, 0.7);
}
[data-theme="contrast"] .hero-tagline { color: #f4efff; }
[data-theme="contrast"] .hero-sub { color: #ddd6f3; }
[data-theme="contrast"] .sol-eyebrow {
  text-shadow: 0 0 4px rgba(4, 8, 20, 0.95), 0 1px 10px rgba(4, 8, 20, 0.9);
}

/* -- ghost buttons sit almost transparent over the animated canvas;
      give them a real dark fill so their white label stays readable
      under the brightest streaks. */
[data-theme="contrast"] .btn-ghost {
  background: rgba(6, 16, 42, 0.75);
  border-color: #ffffff;
}
[data-theme="contrast"] .btn-ghost:hover { background: rgba(6, 16, 42, 0.9); }

/* -- matte paper grain, contrast-safe: the default theme's OVERLAY blend
      lightens single pixels on the gradient chrome enough to break AA
      locally (measured 3.2-3.6:1 vs white), so contrast mode blends the
      SAME --paper-grain with MULTIPLY instead. Multiply only darkens the
      verified gradient stops, and darker pixels under this theme's
      light-on-dark text only raise contrast, so the verified AA pairs
      stay worst cases. Measured texture ~10% of surface luminance vs
      ~12% in the default theme — near parity, for a slightly darker
      (~7%) matte average. */
[data-theme="contrast"] .nav,
[data-theme="contrast"] .contact-cta {
  background-image: var(--paper-grain), var(--surface);
  background-repeat: repeat, no-repeat;
  background-size: 160px 160px, 100% 100%;
  background-blend-mode: multiply, normal;
}
[data-theme="contrast"] .btn-primary,
[data-theme="contrast"] .btn-arrow {
  background-image: var(--paper-grain), var(--btn-grad);
  background-repeat: repeat, no-repeat;
  background-size: 150px 150px, 100% 100%;
  background-blend-mode: multiply, normal;
}

/* -- cards: the tile gradient is hardcoded in three places (Safari
      flip-face paint workaround), so all three get the darkened ramp. */
[data-theme="contrast"] .card {
  background-color: #24479a;
}
[data-theme="contrast"] .card.glass,
[data-theme="contrast"] .flip-face.card {
  background-color: #24479a;
  background-image: linear-gradient(
    115deg,
    #003a87 0%,
    #04408f 18%,
    #24479a 38%,
    #52449e 58%,
    #7a4aa8 78%,
    #8a52b4 100%
  );
}
/* tile grain (see the .nav note): the standard grain multiply-blended
   over the darkened gradient — stops duplicated so paint cannot collapse
   to one stop, and Safari's flip-face paint path keeps its own composited
   layer. */
[data-theme="contrast"] .flip-face.card::before {
  background-image:
    var(--paper-grain),
    linear-gradient(
      115deg,
      #003a87 0%,
      #04408f 18%,
      #24479a 38%,
      #52449e 58%,
      #7a4aa8 78%,
      #8a52b4 100%
    );
  background-repeat: repeat, no-repeat;
  background-size: 160px 160px, 100% 100%;
  background-blend-mode: multiply, normal;
}
[data-theme="contrast"] .card .meta,
[data-theme="contrast"] .card .card-desc,
[data-theme="contrast"] .card .back-body,
[data-theme="contrast"] .card .analysis li,
[data-theme="contrast"] .card .back-hint,
[data-theme="contrast"] .card .back-hint-desktop,
[data-theme="contrast"] .card .back-hint-mobile {
  color: #ffffff;
}
[data-theme="contrast"] .card .pill {
  color: #ffffff;
  background: rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.55);
}
[data-theme="contrast"] .share-btn svg { fill: #ffffff; }
[data-theme="contrast"] .share-btn:hover,
[data-theme="contrast"] .share-btn:focus-visible { background: rgba(0, 0, 0, 0.35); }
[data-theme="contrast"] .share-btn:focus-visible { outline-width: 3px; }
/* .card .flip-hint / .analysis-label keep #ffe9ff: 4.65:1 on the
   darkened gradient's brightest stop. */

/* -- focus visibility */
[data-theme="contrast"] .flip-card:focus-visible .flip-front {
  border-color: #fff;
  box-shadow: 0 0 0 3px #ffffff;
}
[data-theme="contrast"] .week-tab:focus-visible { outline-width: 3px; }

/* -- status text */
[data-theme="contrast"] .newsletter-msg.is-error { color: #ffb4b4; }
[data-theme="contrast"] .newsletter-msg.is-ok { color: #8ff0b8; }
[data-theme="contrast"] .newsletter input[aria-invalid="true"] { border-color: #ffb4b4; }
[data-theme="contrast"] .newsletter input[aria-invalid="true"]:focus { border-color: #ffb4b4; }

/* -- cookie-modal switch knob */
[data-theme="contrast"] .slider::before { background: #cdd2f5; }

/* -- phone side chevrons: base rule lives in the ≤680px media query;
      this outranks it there and is inert elsewhere (display: none). */
[data-theme="contrast"] .flip-card::before,
[data-theme="contrast"] .flip-card::after {
  background: rgba(4, 8, 20, 0.8);
  border-color: rgba(255, 255, 255, 0.5);
}

/* =====================================================================
   ===== CONTENT SUB-TABS + EXTRAS PANELS (new UI — additive only) =====
   Weeks with extras (research / repos / tools) get a second pill row and
   per-type panels — each a glass card with a linked list — rendered by
   scripts/generate-news.js. News is selected on load, so news-only weeks
   and the default view are unchanged.
   ===================================================================== */
.content-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 20px;
}

/* Buttons carry week-pill glass for the shared pill look; these overrides
   size them a step smaller than the week tabs. */
.content-tab {
  -webkit-appearance: none;
  appearance: none;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
  padding: 5px 15px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.content-tab:hover { transform: translateY(-1px); }
.content-tab:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}
.content-tab[aria-selected="true"] {
  background: linear-gradient(135deg, rgba(var(--accent-2-rgb), 0.38) 0%, rgba(var(--accent-rgb), 0.38) 100%);
  border-color: rgba(var(--accent-rgb), 0.55);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.3), 0 6px 18px rgba(var(--accent-rgb), 0.28);
  cursor: default;
}
.content-tab[aria-selected="true"]:hover { transform: none; }

/* Research / Repos / Tools: one glass card with a compact linked list */
.extras-card {
  max-width: 720px;
  margin: 0 auto;
}

.extras-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.extras-list li {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88);
}

.extra-name {
  font-weight: 650;
  color: #fff;
}

a.extra-name {
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.45);
  text-underline-offset: 2px;
}
a.extra-name:hover,
a.extra-name:focus-visible { text-decoration-color: #fff; }
a.extra-name:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

[data-theme="contrast"] .content-tab:focus-visible { outline-width: 3px; }
[data-theme="contrast"] .extras-list li { color: #ffffff; }
[data-theme="contrast"] .extra-name { color: #ffffff; }

/* =====================================================================
   ===== CONTENT-PROTECTION DETERRENTS (best-effort, always-on) ========
   Blocks casual select/copy/drag + blanks printed output. NOT security:
   view-source, curl, reader mode, and DevTools all bypass this.
   A page can opt out by setting data-copy-ok on <html> (none do today).
   ===================================================================== */
html:not([data-copy-ok]) body {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none; /* iOS long-press menu */
}
input, textarea, select, [contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
}
img { -webkit-user-drag: none; }

@media print {
  html:not([data-copy-ok]) body { background: #fff !important; }
  html:not([data-copy-ok]) body::after { display: none !important; }
  html:not([data-copy-ok]) body > * { display: none !important; }
  html:not([data-copy-ok]) body::before {
    content: "Printing is disabled. Read this content at zealvector.com.";
    display: block;
    padding: 48px 24px;
    font: 600 18px/1.5 system-ui, -apple-system, sans-serif;
    color: #000;
  }
}
