/* ────────────────────────────────────────────────────────────────────
   dashboard-hero.css — new visual identity for the dashboard hero.
   Layered on top of dashboard.css; the modal pickers, cloud deck grid,
   and auth gate keep their existing styles. Token system aligns to the
   mock at ~/Downloads/ocuport-dashboard (2).html.
   ──────────────────────────────────────────────────────────────────── */

:root {
  --brand: #45D0BD;
  --brand-deep: #44B6E9;
  /* Page palette — soft white → pale lavender-aqua diagonal.
     Rainy 2026-06-03: gave reference image (clean pale blue) +
     #F0FAFF target ("想要这个效果。 --color-bg-lavender: #f0faff").
     Top-left whitest, bottom-right hints of the lavender-aqua so the
     page reads as fresh-white with a subtle cool-blue drift. Per-
     section seam is already neutralized by the tile-mosaic / border
     fixes below, so the gradient flows cleanly across the whole
     page. --cream / --steel-pale legacy tokens stay defined for any
     caller that still references them. */
  --color-bg-lavender: #F0FAFF;
  --color-bg-lavender-deep: #DDEFFB;
  --cream: #F0F9F9;
  --steel-pale: #C9E2E7;
  --hero-bg: linear-gradient(
    145deg,
    #FAFCFD 0%,
    var(--color-bg-lavender) 55%,
    var(--color-bg-lavender-deep) 100%
  );
  --hero-text: #231F20;
  --hero-text-2: rgba(35, 31, 32, 0.70);
  --hero-text-3: rgba(35, 31, 32, 0.45);
  --hero-line: rgba(69, 208, 189, 0.15);
  --hero-r-md: 20px;
  --hero-r-lg: 25px;
  --hero-sans: 'Manrope', system-ui, sans-serif;
  --hero-brand-font: 'Quando', 'Manrope', serif;
}

/* ── Hero shell ────────────────────────────────────────────────── */
.dashboard.hero-style {
  background: var(--hero-bg);
  font-family: var(--hero-sans);
  color: var(--hero-text);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}
body.light-mode .dashboard.hero-style { background: var(--hero-bg); }

.hero-section {
  min-height: 100vh;
  position: relative;
  width: 100%;
  overflow: hidden;
  isolation: isolate;
}

/* Layer 1 — geometric tile mosaic backdrop.
   Previously closed with `var(--hero-bg)` as the bottommost layer,
   which made every .hero-section re-paint its own gradient base.
   Multiple sections on a long page = repeated gradient = visible
   horizontal seams between sections (Rainy 2026-06-03: "渐变还一截
   一截"). Drop the bottom layer so the tile decoration becomes a
   transparent overlay, and let the parent `.dashboard.hero-style`
   gradient paint once across the full page height. */
.hero-section .tile-mosaic {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(35,31,32,0.025), rgba(35,31,32,0.025)) 96px 96px / 96px 96px no-repeat,
    linear-gradient(rgba(35,31,32,0.025), rgba(35,31,32,0.025)) 1056px 96px / 96px 96px no-repeat,
    linear-gradient(rgba(35,31,32,0.025), rgba(35,31,32,0.025)) 768px 480px / 96px 96px no-repeat,
    linear-gradient(rgba(35,31,32,0.025), rgba(35,31,32,0.025)) 192px 768px / 96px 96px no-repeat,
    linear-gradient(rgba(35,31,32,0.045), rgba(35,31,32,0.045)) 1440px 192px / 96px 96px no-repeat,
    linear-gradient(rgba(35,31,32,0.045), rgba(35,31,32,0.045)) 1152px 384px / 96px 96px no-repeat,
    repeating-linear-gradient(135deg, rgba(35,31,32,0.06) 0 1px, transparent 1px 6px) 384px 192px / 96px 96px no-repeat,
    repeating-linear-gradient(135deg, rgba(35,31,32,0.06) 0 1px, transparent 1px 6px) 1248px 480px / 96px 96px no-repeat,
    linear-gradient(rgba(35,31,32,0.04) 1px, transparent 1px) 0 0 / 96px 96px,
    linear-gradient(90deg, rgba(35,31,32,0.04) 1px, transparent 1px) 0 0 / 96px 96px;
}

/* Layer 2 — atmospheric brand halo (sky-blue, not mint).
   Mint version (rgba(165,239,239)) removed in iter 5 to chase
   reference image. Rainy then noted "光晕没有了。然后现在稍微再来一
   丢丢蓝" — wants the halo back AND slightly bluer overall. Use a
   soft sky-blue (~rgba(150,210,245)) so the glow exists without
   bringing the green back, plus a brighter white inner pop so the
   title area still has the bright central lift. */
.hero-section .gradient-wave {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 75% 65% at 50% 50%,
      rgba(150, 210, 245, 0.28) 0%,
      rgba(180, 220, 250, 0.16) 30%,
      rgba(210, 232, 252, 0.06) 55%,
      rgba(240, 250, 255, 0) 80%),
    radial-gradient(ellipse 50% 40% at 50% 35%,
      rgba(255, 255, 255, 0.65) 0%,
      rgba(255, 255, 255, 0) 70%);
}

/* Floating header overlay (auth + theme toggle) */
.hero-floating-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 12;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 28px;
  pointer-events: none;
}
.hero-floating-header > * { pointer-events: auto; }
.hero-floating-header .dash-logo { display: flex; align-items: center; gap: 10px; }
.hero-floating-header .dash-logo-img { height: 28px; width: auto; display: block; }
.hero-floating-header .dash-title {
  font-family: var(--hero-brand-font);
  font-weight: 400;
  font-size: 22px;
  color: var(--hero-text);
  margin: 0;
}
/* Build version badge — sits flush below the wordmark, 11px mono so it
   reads as metadata not part of the brand. Vercel deploy injects the
   git short SHA; local dev shows `dev`. (Rainy 2026-06-01) */
.hero-floating-header .dash-version {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--hero-text);
  opacity: 0.45;
  margin-left: 8px;
  align-self: flex-end;
  padding-bottom: 3px;
  user-select: all;
}
.hero-floating-header .hero-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Content layer */
.hero-section .content {
  position: relative;
  z-index: 10;
  width: 100%;
  height: 100%;
}

.hero {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  padding: 96px 24px 64px;
}
.hero-inner {
  max-width: 1080px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

h1.hero-title {
  font-family: var(--hero-sans);
  font-weight: 600;
  font-size: clamp(28px, 3.4vw, 46px);
  line-height: 1.15;
  letter-spacing: -0.022em;
  color: var(--hero-text);
  margin-bottom: 72px;
  max-width: 18ch;
}
h1.hero-title .brand-word {
  color: var(--brand);
  font-family: var(--hero-brand-font);
  font-weight: 400;
}

/* Entry-card grid (4 primary actions) */
.entry-grid {
  width: 100%;
  max-width: 1080px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.entry-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 24px 22px 26px;
  min-height: 200px;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 1);
  border-radius: var(--hero-r-lg);
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  font-family: var(--hero-sans);
  color: var(--hero-text);
  box-shadow:
    0 1px 2px rgba(35, 31, 32, 0.02),
    0 2px 6px -2px rgba(35, 31, 32, 0.03),
    0 8px 16px -6px rgba(35, 31, 32, 0.04);
  transition:
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.3s ease,
    border-color 0.3s ease,
    background 0.3s ease;
}
.entry-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 2px 4px rgba(192, 192, 192, 0.15),
    0 8px 20px -4px rgba(192, 192, 192, 0.25);
}
.entry-card:active {
  transform: translateY(-1px);
  transition-duration: 0.12s;
}
.entry-card:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.entry-badge {
  display: block;
  width: 56px;
  height: 56px;
  margin-bottom: 22px;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.entry-badge svg {
  width: 100%;
  height: 100%;
  display: block;
  filter:
    drop-shadow(0 2px 4px rgba(35, 31, 32, 0.06))
    drop-shadow(0 6px 12px rgba(35, 31, 32, 0.05));
}
.entry-card:hover .entry-badge { transform: scale(1.04); }
.entry-title {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
  color: var(--hero-text);
  margin-bottom: 8px;
}
.entry-desc {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--hero-text-2);
  font-weight: 400;
}
/* Card-dark variant for the 4th tile (Biostate Interaction) */
.entry-card.card-dark { background: #1B3A3A; }
.entry-card.card-dark .entry-title { color: #ffffff; }
.entry-card.card-dark .entry-desc { color: rgba(255, 255, 255, 0.75); }

/* Secondary actions row (Convert / Open File) — page-centered chip pair.
   Spec aligned with Rainy's tokens: 8px gap · 28px margin-top · max 720px
   wide · centered on the page · reveal animation on entry. */
.hero-secondary {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 28px auto 0;
  width: 100%;
  max-width: 720px;
  opacity: 0;
  transform: translateY(12px);
  animation: heroReveal 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.32s forwards;
}
.secondary-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 24px;
  background: rgba(255, 255, 255, 0.65);
  border: 0;
  border-radius: 12px;
  font-family: var(--hero-sans);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1;
  color: #231F20;
  cursor: pointer;
  text-transform: uppercase;
  text-decoration: none;
  overflow: hidden;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.95),
    0 1px 2px rgba(35, 31, 32, 0.04),
    0 6px 16px -6px rgba(69, 208, 189, 0.18);
  transition:
    color 0.3s ease,
    background-color 0.3s ease,
    box-shadow 0.3s ease;
}
/* Hover — full inversion: dark fill, white text + icon. Drops the
   inset top-highlight (looks wrong on dark bg) and softens the outer
   teal glow into a deeper neutral shadow that suits the dark surface. */
.secondary-btn:hover {
  background-color: #231F20;
  color: #ffffff;
  box-shadow:
    0 1px 2px rgba(35, 31, 32, 0.10),
    0 8px 20px -6px rgba(35, 31, 32, 0.30);
}
.secondary-btn svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  color: var(--hero-text-2);
  transition: color 0.3s ease;
}
.secondary-btn:hover svg {
  color: #ffffff;
}

/* Text-roll on hover — dual-text vertical slide. The clipping window
   shows one line at a time; on hover the inner column shifts up so
   the visible label scrolls out the top and a fresh copy enters from
   below. ⚠ The clipping window MUST have a fixed 1em height —
   otherwise it stretches to fit its 2-line content and both copies
   become visible simultaneously. */
.secondary-btn .btn-roll {
  position: relative;
  display: inline-block;
  overflow: hidden;
  vertical-align: middle;
  line-height: 1;
  height: 1em;
}
.secondary-btn .btn-roll-inner {
  display: block;
  transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}
.secondary-btn .btn-roll-inner > span {
  display: block;
  height: 1em;
  line-height: 1;
  white-space: nowrap;
}
.secondary-btn:hover .btn-roll-inner {
  transform: translateY(-1em);
}

/* Hero recent / Your Decks */
.hero-recent {
  width: 100%;
  max-width: 1080px;
  margin-top: 80px;
  text-align: left;
}
.hero-recent-title {
  font-family: var(--hero-sans);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--hero-text);
  margin: 0 0 16px;
}
.recent-empty {
  text-align: center;
  padding: 24px 24px 8px;
  /* When the deck-grid has no cards, this empty-state div is the lone
     child of a 4-column grid — without spanning all columns it sits in
     the first cell (left 1/4) and the centered text just looks like
     left alignment. Span all columns so text-align:center actually
     centers across the row. (Rainy 2026-06-03 "提示语需要是居中".) */
  grid-column: 1 / -1;
}

/* ── Cached-data banner ────────────────────────────────────────────
   Shown above the deck grid when the dashboard is rendering decks from
   IndexedDB because Supabase was unreachable on the live fetch. Cleared
   the moment a fresh listUserDecks() succeeds. Amber accent to read as
   "warning, not error" — the data is real, just possibly stale.
   (Rainy 2026-06-03 — Supabase auth outage resilience.) */
.cloud-deck-stale-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin: 0 0 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 184, 0, 0.10), rgba(255, 138, 0, 0.10));
  border: 1px solid rgba(255, 138, 0, 0.30);
  color: #7a4500;
  font-size: 13px;
  line-height: 1.45;
}
.cloud-deck-stale-icon {
  font-size: 15px;
  flex-shrink: 0;
  line-height: 1;
}
.recent-empty-illustration {
  width: 80px;
  height: 80px;
  margin: 0 auto 14px;
}
.recent-empty-illustration svg { width: 100%; height: 100%; }
.recent-empty-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--hero-text);
}
.recent-empty-desc {
  font-size: 13px;
  margin-bottom: 16px;
  color: var(--hero-text-2);
}
/* "Browse templates" CTA — frosted-glass chip with diagonal-slide
   arrow animation (mirrors the .see-more-btn pattern). */
.recent-empty-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  font-family: var(--hero-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--hero-text);
  cursor: pointer;
  overflow: hidden;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.95),
    0 1px 2px rgba(35, 31, 32, 0.04),
    0 6px 16px -6px rgba(69, 208, 189, 0.18);
  transition:
    background 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}
.recent-empty-cta:hover {
  transform: translateY(-1px);
  background: #ffffff;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 1),
    0 1px 2px rgba(35, 31, 32, 0.04),
    0 10px 22px -6px rgba(69, 208, 189, 0.30);
}
/* Diagonal-slide arrow (same dual-SVG pattern as .see-more-btn) */
.recent-empty-cta .arrow-icon {
  position: relative;
  display: inline-block;
  width: 14px;
  height: 14px;
  overflow: hidden;
}
.recent-empty-cta .arrow-inner {
  position: absolute;
  inset: 0;
  transition: transform 0.32s cubic-bezier(0.65, 0, 0.35, 1);
}
.recent-empty-cta .arrow-inner svg {
  position: absolute;
  width: 14px;
  height: 14px;
}
.recent-empty-cta .arrow-inner svg:first-child { top: 0; left: 0; }
.recent-empty-cta .arrow-inner svg:last-child { top: 100%; left: -100%; }
.recent-empty-cta:hover .arrow-inner {
  transform: translate(100%, -100%);
}

/* Your Decks — strict 4-col grid (responsive at narrower viewports) */
.hero-recent .deck-grid {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 960px) {
  .hero-recent .deck-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .hero-recent .deck-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .hero-recent .deck-grid { grid-template-columns: 1fr; }
}

/* See-more pagination CSS cap RETIRED (2026-07-15) — the deck grid is
   paginated by dashboard.js's Show-more/pager footer now; this rule was
   silently hiding cards 9+ on every page ("现在还是8个啊"). */

/* Reveal animation timings */
.reveal { opacity: 0; transform: translateY(12px); animation: heroReveal 0.7s cubic-bezier(0.22,1,0.36,1) forwards; }
.reveal.d1 { animation-delay: 0.05s; }
.reveal.d2 { animation-delay: 0.18s; }
.reveal.d3 { animation-delay: 0.32s; }
@keyframes heroReveal {
  to { opacity: 1; transform: translateY(0); }
}

/* Tablet */
@media (max-width: 960px) {
  .entry-grid { gap: 14px; }
  .entry-card { min-height: 200px; padding: 22px 20px 24px; }
  .entry-title { font-size: 17px; }
  .entry-desc { font-size: 12.5px; }
}
/* Phone */
@media (max-width: 560px) {
  .entry-grid { grid-template-columns: 1fr; gap: 14px; }
  .entry-card { min-height: 0; padding: 20px 20px 22px; }
  .entry-badge { margin-bottom: 16px; }
  .hero { padding: 80px 18px 48px; }
  .hero-floating-header { padding: 14px 18px; }
}

/* ── Section 2 · Style picker (inline) ─────────────────────────── */
/* border-top removed so there's no visible hairline at the seam.
   Section-specific gradient-wave override matched to the base layer
   (white-only, no mint) so the page reads as one continuous fresh
   pale-blue gradient instead of taking on green near "Pick the style".
   (Rainy 2026-06-03 iteration 5.) */
.section-styles .gradient-wave {
  background:
    radial-gradient(ellipse 70% 55% at 50% 65%,
      rgba(150, 210, 245, 0.20) 0%,
      rgba(180, 220, 250, 0.10) 35%,
      rgba(240, 250, 255, 0) 75%);
}
.section-styles .hero {
  padding: 80px 24px 64px;
}
.section-headline {
  width: 100%;
  max-width: 1080px;
  text-align: left;
  margin-bottom: 36px;
}
.section-eyebrow {
  display: inline-block;
  font-family: var(--hero-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 16px;
}
.section-title-big {
  font-family: var(--hero-sans);
  font-weight: 600;
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--hero-text);
  margin: 0;
}
.section-title-big .brand-word {
  color: var(--brand);
  font-family: var(--hero-brand-font);
  font-weight: 400;
}
.section-title-sub {
  display: block;
  margin-top: 4px;
  color: var(--hero-text-2);
  font-weight: 400;
  font-size: clamp(20px, 2.2vw, 28px);
}

/* Style grid — let dashboard.js's OCUPORT_buildStyleCard populate cards.
   We just provide the responsive layout and a soft frosted shell. */
.section-styles .style-grid {
  width: 100%;
  max-width: 1080px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 960px) {
  .section-styles .style-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
@media (max-width: 560px) {
  .section-styles .style-grid { grid-template-columns: 1fr; gap: 14px; }
  .section-styles .hero { padding: 64px 18px 48px; }
}

/* ── Frosted-glass style card — wraps the preview rendered by dashboard.js.
   Only scoped under .section-styles so the gen-AI modal's #genStylePicker
   (which uses .gen-style-card) is untouched. The inner .style-preview
   keeps its original aurora canvas / SVG / animation rendering — we only
   restyle the OUTER frame and add a .style-foot row at the bottom. ──── */
.section-styles .style-card {
  position: relative;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.80);
  border-radius: 18px;
  padding: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.95),
    0 1px 2px rgba(35, 31, 32, 0.03),
    0 8px 20px -8px rgba(69, 208, 189, 0.14),
    0 18px 36px -16px rgba(35, 31, 32, 0.07);
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1),
              box-shadow 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
  overflow: hidden;
}
/* Subtle frosted-glass noise overlay (matches mock) */
.section-styles .style-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.25;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.5' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  border-radius: inherit;
  z-index: 0;
}
.section-styles .style-card > * {
  position: relative;
  z-index: 1;
}

/* Whole-card lift on hover — override dashboard.css's preview-only lift */
.section-styles .style-card:hover {
  transform: translateY(-4px);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 1),
    0 1px 2px rgba(35, 31, 32, 0.04),
    0 20px 40px -12px rgba(69, 208, 189, 0.32),
    0 32px 64px -20px rgba(35, 31, 32, 0.12);
}
.section-styles .style-card:hover .style-preview {
  transform: none;
  box-shadow: none;
}

/* Inner preview — keep dashboard.js's rendering, just trim the radius
   so it nests cleanly inside the card padding (mock uses 14px). */
.section-styles .style-card .style-preview {
  border-radius: 14px;
  border: none;
}

/* Footer row: title left, action icon right */
.section-styles .style-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px 2px 6px;
}
.section-styles .style-foot .style-name {
  font-family: var(--hero-sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--hero-text);
  text-align: left;
}
.section-styles .style-action {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  color: rgba(35, 31, 32, 0.55);
  cursor: pointer;
  background: transparent;
  border: 0;
  padding: 0;
  transition: color 0.2s ease;
}
.section-styles .style-action svg {
  width: 13px;
  height: 13px;
}
.section-styles .style-action:hover {
  color: var(--brand);
}

/* ── Section 3 · Template picker (inline, same shell as section-styles) ─── */
.section-templates .template-grid {
  width: 100%;
  max-width: 1080px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.section-templates .template-card {
  background: #ffffff;
  border: 1px solid rgba(255,255,255,1);
  border-radius: var(--hero-r-lg);
  padding: 28px 26px;
  cursor: pointer;
  font-family: var(--hero-sans);
  color: var(--hero-text);
  box-shadow:
    0 1px 2px rgba(35,31,32,0.02),
    0 8px 16px -6px rgba(35,31,32,0.04);
  transition: transform 0.3s cubic-bezier(0.22,1,0.36,1), box-shadow 0.3s;
}
.section-templates .template-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 2px 4px rgba(192,192,192,0.15),
    0 8px 20px -4px rgba(192,192,192,0.25);
}
.section-templates .template-name {
  font-family: var(--hero-sans);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--hero-text);
  margin-bottom: 8px;
}
.section-templates .template-desc {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--hero-text-2);
  margin-bottom: 14px;
}
.section-templates .template-slides {
  display: inline-block;
  font-family: var(--hero-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
}
@media (max-width: 960px) {
  .section-templates .template-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
@media (max-width: 560px) {
  .section-templates .template-grid { grid-template-columns: 1fr; gap: 14px; }
}

/* ── "See more" pagination for style-grid (default 9 visible, expand all) ── */
.section-styles .style-grid:not(.expanded) > *:nth-child(n+10) { display: none; }

/* Hide the slide-structure template grid — the 3 fallback templates
   (Analysis Report / Conference Talk / Lab Meeting) currently 404 when
   clicked. Visual styles below carry the picker. (Rainy 2026-05-08) */
.section-templates #templateGrid { display: none !important; }
.see-more-row {
  width: 100%;
  max-width: 1080px;
  display: flex;
  justify-content: center;
  margin-top: 28px;
}
.see-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--hero-text-2);
  font-family: var(--hero-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.25s ease, background 0.25s ease;
}
.see-more-btn:hover {
  color: var(--hero-text);
  background: rgba(35, 31, 32, 0.04);
}

/* Arrow-icon clipping window — overflow hidden so the dual-SVG slide
   animation never bleeds outside the button. */
.see-more-btn .arrow-icon {
  position: relative;
  display: inline-block;
  width: 13px;
  height: 13px;
  overflow: hidden;
}
.see-more-btn .arrow-inner {
  position: absolute;
  inset: 0;
  transition: transform 0.32s cubic-bezier(0.65, 0, 0.35, 1);
}
/* Two SVGs absolutely-positioned: first at (0,0), second at (−100%,+100%)
   i.e. lower-left of the visible window. On hover the whole inner slides
   diagonally up-right by (+100%,−100%) — first arrow exits toward the
   upper-right (its own pointing direction), second enters from the
   lower-left to take its place. */
.see-more-btn .arrow-inner svg {
  position: absolute;
  width: 13px;
  height: 13px;
}
.see-more-btn .arrow-inner svg:first-child {
  top: 0;
  left: 0;
}
.see-more-btn .arrow-inner svg:last-child {
  top: 100%;
  left: -100%;
}
.see-more-btn:hover .arrow-inner {
  transform: translate(100%, -100%);
}
/* Expanded state: rotate the icon 180° so it points down-left
   (visually communicates "collapse"). */
.see-more-btn.is-expanded .arrow-icon { transform: rotate(180deg); }

/* ── Sub-headline (smaller scale than main section-title-big) ─────────── */
.section-headline-sub { margin-top: 0; margin-bottom: 28px; }
.section-headline-sub .section-eyebrow { margin-bottom: 10px; }
.section-title-mid {
  font-family: var(--hero-sans);
  font-weight: 600;
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.25;
  letter-spacing: -0.018em;
  color: var(--hero-text);
  margin: 0;
}
.section-title-mid .brand-word {
  color: var(--brand);
  font-family: var(--hero-brand-font);
  font-weight: 400;
}

/* ──────────────────────────────────────────────────────────────────────
   Style-preview modal — Figma-style template gallery
   Triggered by clicking the duplicate-icon (.style-action) on a card.
   Shows a 4-col grid of slide thumbnails for the selected style.
   Modal card uses Rainy's exact frosted-glass spec (.prompt values).
   ────────────────────────────────────────────────────────────────────── */
.style-modal[hidden] { display: none; }
.style-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  font-family: var(--hero-sans);
  animation: styleModalFadeIn 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.style-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(35, 31, 32, 0.32);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
}
.style-modal-card {
  position: relative;
  width: 100%;
  max-width: 1080px;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--hero-r-lg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.95),
    inset 0 -1px 1px rgba(69, 208, 189, 0.10),
    0 1px 2px rgba(35, 31, 32, 0.04),
    0 12px 32px -8px rgba(69, 208, 189, 0.18),
    0 24px 56px -20px rgba(35, 31, 32, 0.12);
  overflow: hidden;
  animation: styleModalLift 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
@keyframes styleModalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes styleModalLift {
  from { transform: translateY(12px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ── Header (back / title / close) ──────────────────────────────────── */
.style-modal-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(35, 31, 32, 0.06);
  flex-shrink: 0;
}
.style-modal-back,
.style-modal-close {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--hero-text-2);
  cursor: pointer;
  border-radius: 10px;
  transition: background 0.18s ease, color 0.18s ease;
}
.style-modal-back:hover,
.style-modal-close:hover {
  background: rgba(35, 31, 32, 0.06);
  color: var(--hero-text);
}
.style-modal-back svg,
.style-modal-close svg {
  width: 18px;
  height: 18px;
}
.style-modal-title {
  flex: 1;
  font-size: 15px;
  font-weight: 500;
  color: var(--hero-text-2);
  letter-spacing: -0.01em;
}
.style-modal-title strong {
  color: var(--hero-text);
  font-weight: 600;
}
.style-modal-title .by {
  color: var(--hero-text-3);
  font-weight: 400;
  margin-left: 6px;
  font-size: 13.5px;
}

/* ── Body (scrollable thumbnail grid) ──────────────────────────────── */
.style-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 22px;
}
.style-modal-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 1024px) {
  .style-modal-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .style-modal-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .style-modal { padding: 16px; }
}

/* ── Single thumbnail (16:9 box, scaled slide inside) ──────────────── */
.style-modal-thumb {
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  background: #fafafa;
  border: 1px solid rgba(35, 31, 32, 0.08);
  box-shadow: 0 4px 12px -4px rgba(35, 31, 32, 0.08);
  cursor: default;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.style-modal-thumb:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -4px rgba(35, 31, 32, 0.12);
}
/* 1920×1080 stage scaled to fit thumbnail width */
.style-modal-thumb-stage {
  position: absolute;
  top: 0;
  left: 0;
  width: 1920px;
  height: 1080px;
  transform-origin: top left;
  pointer-events: none;
}
.style-modal-thumb-stage .slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 1920px;
  height: 1080px;
  margin: 0;
  display: block;
  overflow: hidden;
}
/* HTML-path: a single big iframe spanning all 4 cols */
.style-modal-thumb-html {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 9;
}
.style-modal-thumb-html iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Gallery-mode iframe (static design-system gallery files):
   No aspect-ratio constraint — the gallery's own grid drives height.
   Iframe fills the available modal body minus header/footer.       */
.style-modal-thumb-gallery {
  grid-column: 1 / -1;
  min-height: 360px;
  height: clamp(360px, 52vh, 540px);
  border-radius: 14px;
  overflow: hidden;
  background: transparent;   /* let modal frosted-glass show through */
  border: 0;
}
.style-modal-thumb-gallery iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: transparent;   /* iframe defaults to white — kill it */
}
.style-modal-thumb-caption {
  position: absolute;
  left: 10px;
  bottom: 8px;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.32);
  padding: 3px 8px;
  border-radius: 6px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  pointer-events: none;
  z-index: 5;
}
.style-modal-empty-note {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 13px;
  color: var(--hero-text-3);
  padding: 16px 0 4px;
  font-style: italic;
}

/* ── Footer (action buttons) ───────────────────────────────────────── */
.style-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 14px 22px;
  border-top: 1px solid rgba(35, 31, 32, 0.06);
  flex-shrink: 0;
}
.style-modal-secondary,
.style-modal-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  font-family: var(--hero-sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.18s ease;
}
.style-modal-secondary {
  background: rgba(255, 255, 255, 0.7);
  color: var(--hero-text);
  border: 1px solid rgba(35, 31, 32, 0.10);
}
.style-modal-secondary:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: translateY(-1px);
}
.style-modal-primary {
  background: var(--hero-text);
  color: #fff;
  border: 0;
}
.style-modal-primary:hover {
  background: #000;
  transform: translateY(-1px);
}

/* ──────────────────────────────────────────────────────────────────────
   Biostate Integrations section — compact strip below the style picker.
   Overrides .hero-section's default 100vh min-height since this section
   is content-driven (3 cards in a row, ~140px tall).
   ────────────────────────────────────────────────────────────────────── */
.section-integrations {
  min-height: auto;
}
.section-integrations .hero {
  min-height: auto;
  padding: 64px 24px 96px;
}
.section-integrations .hero-inner {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.section-integrations .integration-cards {
  width: 100%;
  max-width: 1080px;
  gap: 18px;
}
@media (max-width: 960px) {
  .section-integrations .integration-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .section-integrations .integration-cards { grid-template-columns: 1fr; }
}

/* Frosted-glass integration cards — match the modal-card aesthetic
   (Rainy's `.prompt` glass spec). Scoped to .section-integrations so
   the original .integration-card style stays intact elsewhere. */
.section-integrations .integration-card {
  position: relative;
  background: rgba(255, 255, 255, 0.55) !important;
  border: 1px solid rgba(255, 255, 255, 0.85) !important;
  border-radius: var(--hero-r-lg) !important;
  padding: 22px 24px;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.95),
    inset 0 -1px 1px rgba(69, 208, 189, 0.10),
    0 1px 2px rgba(35, 31, 32, 0.04),
    0 12px 32px -8px rgba(69, 208, 189, 0.18),
    0 24px 56px -20px rgba(35, 31, 32, 0.12) !important;
  transition:
    transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.2, 0.7, 0.2, 1) !important;
  overflow: hidden;
}
.section-integrations .integration-card[data-product="ocupath"]:hover,
.section-integrations .integration-card[data-product="ocuseq"]:hover {
  transform: translateY(-3px) !important;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 1),
    inset 0 -1px 1px rgba(69, 208, 189, 0.18),
    0 1px 2px rgba(35, 31, 32, 0.05),
    0 18px 40px -10px rgba(69, 208, 189, 0.30),
    0 32px 64px -20px rgba(35, 31, 32, 0.16) !important;
}

/* My-decks pager chips (built by dashboard.js _renderDeckFooter). */
.dk-page-btn {
  min-width: 34px; height: 32px; padding: 0 10px;
  border-radius: 8px; border: 1px solid rgba(30,51,71,.14);
  background: #fff; color: var(--text-secondary, #4a5568);
  font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.dk-page-btn:disabled { opacity: .4; cursor: default; }
.dk-page-btn.is-active { background: var(--color-accent, #45d0bd); border-color: var(--color-accent, #45d0bd); color: #fff; }
.dk-page-dots { color: #8795a3; padding: 0 2px; }
