:root {
  --bg: #07090a;
  --bg2: #0b0e0d;
  --card: #0e1210;
  --text: #edf2e4;
  --muted: #8a9484;
  --dim: #47523f;
  /* ---- 60-30-10 colour system ----
     60% DOMINANT neutral: --bg / --bg2 / --card / --text / --muted / --dim / borders.
         The page field, all surfaces and all body copy live here.
     30% SECONDARY brand (cyan): --brand. Carries identity — labels, headings accents,
         tags, scores, links, hover states, the WebGL field tint.
     10% ACCENT (acid lime): --acid. Reserved for call-to-action and focus ONLY —
         primary buttons, active state, progress, focus rings. Never decorative.
     Keeping the accent scarce is what makes it read as "click here". */
  --brand: #6be4ff;
  --brand-dim: rgba(107, 228, 255, 0.12);
  --acid: #c9f24e;
  --acid-dim: rgba(201, 242, 78, 0.14);
  --border: rgba(210, 240, 250, 0.07);
  --border-hi: rgba(210, 240, 250, 0.16);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  /* Height of the fixed navbar — sticky elements offset by this so they don't slide under it. */
  --nav-h: 66px;
  /* Type system: Syne for display (Secular One covers Hebrew headings),
     Rubik for body (native Latin + Hebrew), JetBrains Mono for labels/code
     (Rubik fallback supplies Hebrew glyphs mono lacks). */
  --font-display: 'Bricolage Grotesque', 'Secular One', sans-serif;
  --font-body: 'Rubik', 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', 'Rubik', monospace;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }
.lenis.lenis-stopped { overflow: hidden; }
::selection { background: var(--acid); color: #0a0c07; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); }
a:hover { color: var(--text); }
.mono { font-family: var(--font-mono); }

#gl { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
#gl canvas { display: block; }
.noise {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 200; }
.progress-bar { height: 100%; width: 100%; background: var(--acid); transform-origin: 0 50%; transform: scaleX(0); }

/* Nav */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 1.4rem 4vw; display: flex; justify-content: space-between; align-items: center;
  background: linear-gradient(180deg, rgba(7,9,10,0.85), rgba(7,9,10,0));
}
.nav-logo {
  font-family: var(--font-mono); font-size: 1rem; font-weight: 700;
  letter-spacing: -0.02em; color: var(--text); text-decoration: none;
}
.nav-logo em { font-style: normal; color: var(--brand); }
.nav-links { display: flex; gap: 2.2rem; list-style: none; }
.nav-links a {
  font-family: var(--font-mono); color: var(--muted); text-decoration: none;
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
  transition: color 0.4s var(--ease); position: relative;
}
.nav-links a:hover, .nav-links a.active { color: var(--brand); }
.nav-links a::before { content: '['; opacity: 0; margin-right: 2px; transition: opacity 0.3s; color: var(--brand); }
.nav-links a::after { content: ']'; opacity: 0; margin-left: 2px; transition: opacity 0.3s; color: var(--brand); }
.nav-links a:hover::before, .nav-links a:hover::after,
.nav-links a.active::before, .nav-links a.active::after { opacity: 1; }

/* Layout */
main { position: relative; z-index: 2; will-change: transform; }
.section { position: relative; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 0 4vw; border-bottom: 1px solid var(--border); }
.page-hero { min-height: 72vh; display: flex; flex-direction: column; justify-content: flex-end; padding: 10rem 4vw 5rem; border-bottom: 1px solid var(--border); position: relative; z-index: 2; }
.content { position: relative; z-index: 2; padding: 5rem 4vw; }

.label {
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 500;
  letter-spacing: 0.25em; text-transform: uppercase; color: var(--brand);
  margin-bottom: 1.6rem; display: flex; align-items: center; gap: 1rem;
}
.label::before { content: ''; width: 36px; height: 1px; background: var(--brand); }
h1 { font-family: var(--font-display); font-size: clamp(2.9rem, 7.4vw, 6rem); font-weight: 700; line-height: 1; letter-spacing: -0.025em; max-width: 1100px; text-wrap: balance; }
h1 .accent, h2 .accent { color: var(--brand); }
.section h2, .content h2 { font-family: var(--font-display); font-size: clamp(2.2rem, 5vw, 4.2rem); font-weight: 700; line-height: 1.04; letter-spacing: -0.02em; margin-bottom: 1.4rem; }
.desc { font-size: 1.05rem; color: var(--muted); max-width: 520px; line-height: 1.65; margin-bottom: 3rem; text-wrap: pretty; }
.page-hero p { font-size: 1.05rem; color: var(--muted); max-width: 520px; line-height: 1.65; margin-top: 1.6rem; text-wrap: pretty; }
/* Horizontal hero: title block and description sit side by side on a shared baseline,
   and the title reads on one line instead of stacking. */
/* Sized to its content — the tall stacked-hero min-height would leave dead space here. */
.page-hero.horizontal {
  flex-direction: row; align-items: flex-end; gap: clamp(2rem, 5vw, 5rem); flex-wrap: wrap;
  min-height: 0; padding-top: calc(var(--nav-h) + 2.5rem); padding-bottom: 2.5rem;
}
.page-hero.horizontal .hero-main { flex: 1 1 min(100%, 520px); min-width: 0; }
.page-hero.horizontal .label { margin-bottom: 1.1rem; }
/* Smaller than the stacked hero so the title fits on one line beside the description. */
.page-hero.horizontal h1 { max-width: none; font-size: clamp(2.2rem, 5vw, 4.4rem); }
.page-hero.horizontal h1 .line { display: inline-block; vertical-align: bottom; }
.page-hero.horizontal h1 .line + .line { margin-inline-start: 0.28em; }
.page-hero.horizontal p { flex: 1 1 340px; max-width: 560px; margin-top: 0; margin-bottom: 0.5rem; }

/* Hero title line reveal */
.line { display: block; overflow: hidden; }
.line span { display: inline-block; transform: translateY(110%); filter: blur(6px); animation: revealUp 1.1s var(--ease) forwards; }
.line:nth-child(2) span { animation-delay: 0.12s; }
.line:nth-child(3) span { animation-delay: 0.24s; }
@keyframes revealUp { to { transform: translateY(0); filter: blur(0); } }
.fade-in { opacity: 0; animation: fadeIn 1s 0.6s var(--ease) forwards; }
.fade-in.d2 { animation-delay: 0.85s; }
@keyframes fadeIn { to { opacity: 1; } }

/* Buttons */
.btn {
  font-family: var(--font-mono); padding: 1rem 2.2rem; border-radius: 3px;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  text-decoration: none; transition: all 0.4s var(--ease); cursor: pointer; border: none;
  display: inline-flex; align-items: center; gap: 0.6rem;
}
.btn-primary { background: var(--acid); color: #0a0c05; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(201,242,78,0.28); color: #0a0c05; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border-hi); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-dim); }

.hero { padding-top: 7rem; padding-bottom: 8rem; }
@media (max-height: 700px) { .hero-scroll { display: none; } .hero { padding-bottom: 5rem; } }
.hero-scroll {
  position: absolute; bottom: 3rem; left: 4vw; display: flex; align-items: center; gap: 1rem;
  color: var(--dim); font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase;
}
.hero-scroll-line { width: 60px; height: 1px; background: var(--dim); position: relative; overflow: hidden; }
.hero-scroll-line::after { content: ''; position: absolute; inset: 0; left: -100%; background: var(--brand); animation: scrollLine 2.2s ease-in-out infinite; }
@keyframes scrollLine { 0% { left: -100%; } 60%, 100% { left: 100%; } }

/* Category grid (home) */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); }
.cat-item { background: var(--bg); padding: 2.4rem 1.8rem; transition: background 0.5s var(--ease); cursor: pointer; position: relative; text-decoration: none; color: var(--text); display: block; }
.cat-item::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--brand); transform: scaleX(0); transform-origin: 0 50%; transition: transform 0.5s var(--ease); }
.cat-item:hover { background: var(--card); color: var(--text); }
.cat-item:hover::before { transform: scaleX(1); }
.cat-num { font-family: var(--font-mono); font-size: 0.68rem; color: var(--dim); margin-bottom: 1.4rem; }
.cat-item:hover .cat-num { color: var(--brand); }
.cat-item h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.7rem; letter-spacing: -0.01em; }
.cat-item p { font-size: 0.85rem; color: var(--muted); line-height: 1.55; margin-bottom: 1.4rem; }
.cat-meta { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.cat-meta span { font-family: var(--font-mono); font-size: 0.65rem; padding: 0.3rem 0.7rem; border-radius: 2px; background: var(--bg2); color: var(--muted); border: 1px solid var(--border); }

/* Marquee */
.marquee-wrap { overflow: hidden; padding: 2.6rem 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); position: relative; z-index: 2; background: rgba(7,9,10,0.4); }
.marquee-track { display: flex; gap: 3rem; width: max-content; will-change: transform; }
.marquee-item { font-size: clamp(1.4rem, 2.8vw, 2.3rem); font-weight: 300; color: var(--dim); white-space: nowrap; letter-spacing: -0.02em; }
.marquee-item strong { color: var(--brand); font-weight: 500; }

/* Stats */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; padding-top: 2.4rem; border-top: 1px solid var(--border); }
.stat-value { font-size: clamp(2.2rem, 4.5vw, 4rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1; margin-bottom: 0.6rem; color: var(--brand); font-variant-numeric: tabular-nums; }
.stat-label { font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted); letter-spacing: 0.12em; text-transform: uppercase; }

/* Showcase / code */
.showcase-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.code-block {
  background: rgba(14, 18, 16, 0.85); border: 1px solid var(--border-hi); border-radius: 6px;
  padding: 1.6rem; font-family: var(--font-mono); font-size: 0.78rem; line-height: 1.75;
  color: var(--muted); overflow-x: auto; backdrop-filter: blur(8px); white-space: pre;
}
.code-block .kw { color: var(--brand); }
.code-block .fn { color: #7dd3fc; }
.code-block .str { color: #f0abfc; }
.code-block .cm { color: var(--dim); font-style: italic; }
.code-head { display: flex; align-items: center; gap: 0.5rem; padding-bottom: 1rem; margin-bottom: 1rem; border-bottom: 1px solid var(--border); font-size: 0.68rem; color: var(--dim); letter-spacing: 0.1em; }
.code-head i { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); font-style: normal; }
.code-head i.g { background: var(--brand); }

/* Prompt cards */
.filters { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; margin-bottom: 3rem; }
.filter-btn {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.6rem 1.1rem; border-radius: 2px; background: transparent; border: 1px solid var(--border-hi);
  color: var(--muted); cursor: pointer; transition: all 0.35s var(--ease);
}
.filter-btn:hover { color: var(--text); border-color: var(--brand); }
.filter-btn.active { background: var(--acid); border-color: var(--acid); color: #0a0c05; }
.search {
  font-family: var(--font-mono); margin-left: auto; padding: 0.6rem 1.1rem; width: 240px;
  background: var(--card); border: 1px solid var(--border-hi); border-radius: 2px; color: var(--text); font-size: 0.75rem;
}
.search:focus { outline: none; border-color: var(--acid); }
.search::placeholder { color: var(--dim); }
.prompts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.prompt-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 6px; padding: 1.8rem;
  transition: all 0.5s var(--ease); display: flex; flex-direction: column; gap: 0.9rem;
}
.prompt-card:hover { border-color: var(--brand); transform: translateY(-4px); box-shadow: 0 16px 48px rgba(0,0,0,0.5); }
.prompt-tag { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand); align-self: flex-start; padding: 0.3rem 0.7rem; border: 1px solid var(--brand-dim); background: var(--brand-dim); border-radius: 2px; }
.prompt-card h3 { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; }
.prompt-card p { font-size: 0.85rem; color: var(--muted); line-height: 1.6; flex: 1; }
.prompt-meta { display: flex; justify-content: space-between; align-items: center; padding-top: 0.9rem; border-top: 1px solid var(--border); font-family: var(--font-mono); font-size: 0.68rem; color: var(--dim); }
.copy-btn { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; background: transparent; border: 1px solid var(--border-hi); color: var(--text); padding: 0.45rem 1rem; border-radius: 2px; cursor: pointer; transition: all 0.3s var(--ease); }
.copy-btn:hover { background: var(--acid); border-color: var(--acid); color: #0a0c05; }
.copy-btn.done { background: var(--acid); border-color: var(--acid); color: #0a0c05; }

/* Category list (categories page) */
.cat-list { border-top: 1px solid var(--border); }
.cat-row {
  display: grid; grid-template-columns: 80px 1fr auto; gap: 2rem; align-items: center;
  padding: 2.2rem 0.5rem; border-bottom: 1px solid var(--border); cursor: pointer; transition: all 0.4s var(--ease);
}
.cat-row:hover { background: var(--brand-dim); padding-left: 1.2rem; }
.cat-row .cat-num { margin: 0; font-size: 0.8rem; }
.cat-row h3 { font-size: clamp(1.3rem, 2.6vw, 2rem); font-weight: 600; letter-spacing: -0.02em; margin-bottom: 0.4rem; }
.cat-row p { font-size: 0.88rem; color: var(--muted); line-height: 1.55; max-width: 560px; }
.cat-count { text-align: right; font-family: var(--font-mono); color: var(--muted); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; }
.cat-count strong { display: block; font-size: 1.8rem; color: var(--brand); font-weight: 600; letter-spacing: -0.02em; }
.sub-prompts { max-height: 0; overflow: hidden; transition: max-height 0.6s var(--ease); border-bottom: 0 solid var(--border); }
.sub-prompts.active { max-height: 400px; border-bottom: 1px solid var(--border); }
.sub-prompts ul { list-style: none; padding: 1.6rem 0.5rem 1.6rem 80px; display: flex; flex-direction: column; gap: 0.9rem; }
.sub-prompts li { font-size: 0.85rem; color: var(--muted); line-height: 1.5; display: flex; flex-direction: column; gap: 0.15rem; }
.sub-prompts strong { color: var(--text); font-weight: 600; font-size: 0.95rem; }

/* MCP */
.banner { background: var(--card); border: 1px solid var(--border-hi); border-left: 3px solid var(--brand); border-radius: 4px; padding: 2.4rem; margin-bottom: 4rem; max-width: 860px; }
.banner h2 { font-size: 1.5rem !important; margin-bottom: 0.8rem !important; }
.banner p { color: var(--muted); line-height: 1.65; font-size: 0.95rem; }
.mcp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.mcp-card { background: var(--card); border: 1px solid var(--border); border-radius: 6px; padding: 2.2rem; transition: all 0.5s var(--ease); }
.mcp-card:hover { border-color: var(--brand); transform: translateY(-4px); }
.mcp-card h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 0.8rem; letter-spacing: -0.01em; }
.mcp-card p { font-size: 0.88rem; color: var(--muted); line-height: 1.6; margin-bottom: 1.4rem; }
.mcp-meta { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.mcp-meta span { font-family: var(--font-mono); font-size: 0.65rem; padding: 0.3rem 0.7rem; border-radius: 2px; background: var(--bg2); color: var(--muted); border: 1px solid var(--border); }

/* SaaS */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin-bottom: 7rem; }
.feature-card { background: var(--card); border: 1px solid var(--border); border-radius: 6px; padding: 2.2rem; transition: all 0.5s var(--ease); }
.feature-card:hover { border-color: var(--brand); transform: translateY(-4px); }
.step { font-family: var(--font-mono); width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--brand); color: var(--brand); border-radius: 2px; font-size: 0.8rem; margin-bottom: 1.3rem; }
.feature-card h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.7rem; }
.feature-card p { font-size: 0.85rem; color: var(--muted); line-height: 1.6; }
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; max-width: 1000px; margin: 0 auto; }
/* One-time-purchase layout: free tier + a dominant lifetime card. */
.pricing.two { grid-template-columns: 1fr 1.35fr; max-width: 820px; align-items: start; }
.pricing-card { background: var(--card); border: 1px solid var(--border); border-radius: 6px; padding: 2.4rem; display: flex; flex-direction: column; gap: 1.4rem; transition: all 0.5s var(--ease); }
.pricing-card.featured { border-color: var(--acid); background: linear-gradient(180deg, var(--acid-dim), var(--card) 45%); }
.pricing-card:hover { transform: translateY(-4px); }
.pricing-card h3 { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); }
.price { font-family: var(--font-display); font-size: 3rem; font-weight: 700; letter-spacing: -0.02em; }
.price span { font-size: 1rem; color: var(--muted); font-weight: 400; }
.pricing-card ul { list-style: none; display: flex; flex-direction: column; gap: 0.7rem; flex: 1; }
.pricing-card li { font-size: 0.88rem; color: var(--muted); padding-left: 1.4rem; position: relative; }
.pricing-card li::before { content: '+'; position: absolute; left: 0; color: var(--brand); font-family: var(--font-mono); }
.pricing-btn { font-family: var(--font-mono); padding: 0.9rem; border-radius: 2px; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; background: transparent; border: 1px solid var(--border-hi); color: var(--text); cursor: pointer; transition: all 0.35s var(--ease); }
.pricing-btn:hover { border-color: var(--brand); color: var(--brand); }
.pricing-btn.primary { background: var(--acid); border-color: var(--acid); color: #0a0c05; font-weight: 700; }
.pricing-btn.primary:hover { color: #0a0c05; box-shadow: 0 8px 28px rgba(201,242,78,0.3); }

/* Footer */
.footer { padding: 6rem 4vw 3rem; border-top: 1px solid var(--border); position: relative; z-index: 2; background: rgba(7,9,10,0.5); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; margin-bottom: 4rem; }
.footer-brand { font-family: var(--font-mono); font-size: 1.15rem; font-weight: 700; margin-bottom: 1rem; }
.footer-brand span { color: var(--brand); }
.footer-desc { font-size: 0.88rem; color: var(--muted); line-height: 1.65; max-width: 300px; }
.footer-col h4 { font-family: var(--font-mono); font-size: 0.65rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--dim); margin-bottom: 1.4rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.footer-col a { color: var(--muted); text-decoration: none; font-size: 0.88rem; transition: color 0.3s; }
.footer-col a:hover { color: var(--brand); }
.footer-bottom { display: flex; justify-content: space-between; padding-top: 2rem; border-top: 1px solid var(--border); font-family: var(--font-mono); font-size: 0.7rem; color: var(--dim); }

/* ============ Prompt library / copy-paste ============ */
/* Long reading pages opt out of the global velocity skew — it makes prompt text unreadable. */
body.lib main { transform: none !important; }

.lib-toolbar {
  position: sticky; top: var(--nav-h); z-index: 60; margin: 0 0 2.4rem;
  padding: 1.1rem 0 1.1rem; background: rgba(7, 9, 10, 0.92);
  backdrop-filter: blur(14px); border-bottom: 1px solid var(--border);
}
.lib-toolbar-row { display: flex; gap: 0.7rem; align-items: center; flex-wrap: wrap; }
.lib-search {
  font-family: var(--font-mono); flex: 1; min-width: 220px;
  padding: 0.75rem 1rem; background: var(--card); border: 1px solid var(--border-hi);
  border-radius: 3px; color: var(--text); font-size: 0.8rem;
}
.lib-search:focus { outline: none; border-color: var(--acid); box-shadow: 0 0 0 3px var(--acid-dim); }
.lib-search::placeholder { color: var(--dim); }
.lib-sort {
  font-family: var(--font-mono); padding: 0.75rem 0.9rem; background: var(--card);
  border: 1px solid var(--border-hi); border-radius: 3px; color: var(--text); font-size: 0.75rem; cursor: pointer;
}
.lib-sort:focus { outline: none; border-color: var(--acid); }
.lib-chips { display: flex; gap: 0.45rem; flex-wrap: wrap; margin-top: 0.9rem; }
.lib-chip {
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.05em;
  padding: 0.45rem 0.85rem; border-radius: 2px; background: transparent;
  border: 1px solid var(--border-hi); color: var(--muted); cursor: pointer;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.lib-chip i { font-style: normal; color: var(--dim); margin-left: 0.35rem; }
.lib-chip:hover { color: var(--text); border-color: var(--brand); }
.lib-chip.active { background: var(--acid); border-color: var(--acid); color: #0a0c05; }
.lib-chip.active i { color: rgba(10, 12, 5, 0.55); }
.lib-count {
  font-family: var(--font-mono); font-size: 0.7rem; color: var(--dim);
  letter-spacing: 0.08em; margin-bottom: 1.4rem; display: block;
}
.lib-hint { font-family: var(--font-mono); font-size: 0.68rem; color: var(--dim); }
.lib-hint kbd {
  background: var(--card); border: 1px solid var(--border-hi); border-radius: 3px;
  padding: 0.1rem 0.4rem; color: var(--brand); font-size: 0.68rem;
}
.lib-empty { color: var(--muted); font-size: 0.95rem; padding: 3rem 0; grid-column: 1 / -1; }
.lib-more { display: flex; justify-content: center; padding: 3rem 0 1rem; }

.pgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; align-items: start; }
.pcard {
  background: var(--card); border: 1px solid var(--border); border-radius: 6px; padding: 1.5rem;
  display: flex; flex-direction: column; gap: 0.75rem;
  transition: border-color 0.4s var(--ease), transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.pcard:hover { border-color: var(--border-hi); transform: translateY(-3px); box-shadow: 0 14px 40px rgba(0,0,0,0.45); }
/* Outer glow halo: sits behind the opaque card, so only the spill beyond the
   edges is visible. Breathes at rest, flares on hover. */
.pcard { position: relative; isolation: isolate; }
.pcard::before {
  content: '';
  position: absolute;
  inset: -2px;
  z-index: -1;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), #a78bfa 50%, var(--brand) 100%);
  filter: blur(13px);
  opacity: 0.08;
  transition: opacity 0.45s var(--ease), filter 0.45s var(--ease);
  animation: glowBreathe 6s var(--ease) infinite;
  pointer-events: none;
}
.pcard:hover::before { opacity: 0.3; filter: blur(19px); }
.pcard.open::before { opacity: 0.28; filter: blur(20px); }
@keyframes glowBreathe {
  0%, 100% { opacity: 0.065; }
  50%      { opacity: 0.13; }
}
/* Stagger the breathing so the grid shimmers instead of pulsing in lockstep. */
.pcard:nth-child(3n+2)::before { animation-delay: -2s; }
.pcard:nth-child(3n+3)::before { animation-delay: -4s; }
@media (prefers-reduced-motion: reduce) {
  .pcard::before { animation: none; opacity: 0.09; }
}
.pcard.open { grid-column: 1 / -1; border-color: var(--brand); transform: none; }
.pcard.flash { animation: flashBorder 1.6s var(--ease); }
@keyframes flashBorder { 0%, 40% { border-color: var(--acid); box-shadow: 0 0 0 4px var(--acid-dim); } 100% { border-color: var(--acid); box-shadow: none; } }
.pcard-top { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; }
.pcard-cat {
  font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--brand); padding: 0.28rem 0.6rem;
  border: 1px solid var(--brand-dim); background: var(--brand-dim); border-radius: 2px;
}
.pcard-score { font-family: var(--font-mono); font-size: 0.68rem; color: var(--brand); font-weight: 700; }
.pcard-likes {
  font-family: var(--font-mono); font-size: 0.66rem; font-weight: 600; color: var(--muted);
  display: inline-flex; align-items: center; gap: 0.2rem;
}
.pcard-likes::before { content: '♥'; color: var(--brand); font-size: 0.72rem; }
.pcard-likes[hidden] { display: none; }
.pcard h3 { font-size: 1.02rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.pcard-sum { font-size: 0.84rem; color: var(--muted); line-height: 1.6; }
.pcard-use { font-size: 0.78rem; color: var(--dim); line-height: 1.5; }
.pcard-use b { color: var(--muted); font-weight: 500; }
.pcard-tags { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-top: auto; }
.pcard-tags span {
  font-family: var(--font-mono); font-size: 0.6rem; padding: 0.24rem 0.55rem;
  border-radius: 2px; background: var(--bg2); color: var(--muted); border: 1px solid var(--border);
}
.pcard-body { border-top: 1px solid var(--border); padding-top: 1rem; }
.pcard-text {
  font-family: var(--font-mono); font-size: 0.76rem; line-height: 1.72; color: var(--text);
  white-space: pre-wrap; word-break: break-word; max-height: 60vh; overflow-y: auto;
  background: rgba(0, 0, 0, 0.28); border: 1px solid var(--border); border-radius: 4px; padding: 1.1rem;
}
.pcard-text .slot { background: var(--brand-dim); color: var(--brand); border-radius: 2px; padding: 0 2px; }
.pcard-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 0.6rem;
  padding-top: 0.85rem; border-top: 1px solid var(--border);
}
.pcard-len { font-family: var(--font-mono); font-size: 0.65rem; color: var(--dim); }
.pcard-actions { display: flex; gap: 0.45rem; }
.btn-mini {
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.07em;
  text-transform: uppercase; background: transparent; border: 1px solid var(--border-hi);
  color: var(--text); padding: 0.45rem 0.9rem; border-radius: 2px; cursor: pointer;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.btn-mini:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-dim); }
/* Outlined at rest: 24 solid-accent buttons in a grid would spend the whole 10%
   budget and stop reading as an accent. Fills on hover/success instead. */
.btn-mini.primary { background: transparent; border-color: var(--acid); color: var(--acid); font-weight: 700; }
.btn-mini.primary:hover { background: var(--acid); border-color: var(--acid); color: #0a0c05; box-shadow: 0 6px 20px rgba(201, 242, 78, 0.28); }
.btn-mini.done { background: var(--acid); border-color: var(--acid); color: #0a0c05; }

.toast {
  position: fixed; left: 50%; bottom: 2.2rem; z-index: 300; transform: translate(-50%, 140%);
  background: var(--acid); color: #0a0c05; font-family: var(--font-mono);
  font-size: 0.74rem; font-weight: 600; letter-spacing: 0.04em; padding: 0.8rem 1.4rem;
  border-radius: 3px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5); transition: transform 0.5s var(--ease);
  pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); }

/* Steps strip on the copy-paste page */
.howto { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); margin-bottom: 3.4rem; }
.howto div { background: var(--bg); padding: 1.6rem 1.4rem; }
.howto b { display: block; font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.2em; color: var(--brand); margin-bottom: 0.7rem; }
.howto p { font-size: 0.85rem; color: var(--muted); line-height: 1.6; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(48px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0s); }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1024px) {
  .cat-grid, .prompts-grid, .pgrid, .howto, .reviews-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .showcase-grid, .mcp-grid { grid-template-columns: 1fr; }
  .feature-grid, .pricing, .pricing.two { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
/* Deep-linked cards scroll into view under a fixed navbar and a sticky toolbar —
   scroll-margin keeps the card heading clear of both. */
.pcard { scroll-margin-top: calc(var(--nav-h) + 5.5rem); }

/* Card header actions: quality score, save, share link */
.pcard-rt { display: flex; align-items: center; gap: 0.4rem; }
.pcard-icon {
  font-size: 0.85rem;
  line-height: 1;
  background: transparent;
  border: 1px solid var(--border-hi);
  color: var(--muted);
  width: 1.7rem;
  height: 1.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  cursor: pointer;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.pcard-icon:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-dim); }
.pcard-icon.on { color: var(--brand); border-color: var(--brand); background: var(--brand-dim); }
.pcard-icon:focus-visible, .lib-chip:focus-visible, .btn-mini:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
}
.lib-chip[hidden] { display: none; }

/* ============ Reviews / testimonials ============ */
.reviews-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; margin-top: 2.6rem; align-items: start;
}
.review {
  background: var(--card); border: 1px solid var(--border); border-radius: 6px; padding: 1.7rem;
  display: flex; flex-direction: column; gap: 1rem; transition: border-color 0.4s var(--ease), transform 0.4s var(--ease);
}
.review:hover { border-color: var(--border-hi); transform: translateY(-3px); }
.review-stars { color: var(--brand); font-size: 0.9rem; letter-spacing: 0.15em; }
.review blockquote { font-size: 1rem; line-height: 1.55; color: var(--text); text-wrap: pretty; }
.review figcaption { display: flex; flex-direction: column; gap: 0.15rem; margin-top: auto; }
.review-name { font-weight: 600; font-size: 0.9rem; }
.review-role { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.04em; color: var(--muted); }

/* ============ Payment chooser dialog ============ */
.pay-dialog {
  background: var(--card); color: var(--text);
  border: 1px solid var(--border-hi); border-radius: 8px;
  padding: 2rem; width: min(92vw, 420px);
}
.pay-dialog::backdrop { background: rgba(7, 9, 10, 0.72); backdrop-filter: blur(4px); }
.pay-head h3 { font-family: var(--font-display); font-size: 1.3rem; margin-bottom: 0.4rem; }
.pay-head p { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.4rem; }
.pay-options { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 1.4rem; }
.pay-opt {
  display: flex; align-items: center; gap: 0.8rem;
  padding: 0.95rem 1.1rem; border: 1px solid var(--border-hi); border-radius: 4px;
  color: var(--text); text-decoration: none; cursor: pointer;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.pay-opt:hover { border-color: var(--acid); background: var(--acid-dim); color: var(--text); }
.pay-opt.disabled { opacity: 0.45; cursor: not-allowed; }
.pay-opt.disabled:hover { border-color: var(--border-hi); background: transparent; }
.pay-name { font-weight: 600; font-size: 0.95rem; }
.pay-hint { font-family: var(--font-mono); font-size: 0.66rem; color: var(--muted); margin-inline-start: auto; }
.pay-go { color: var(--acid); font-weight: 700; }
[dir="rtl"] .pay-go { transform: scaleX(-1); }
.pay-license { border-top: 1px solid var(--border); padding-top: 1.2rem; margin-bottom: 1.2rem; }
.pay-license label { display: block; font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.55rem; }
.pay-license-row { display: flex; gap: 0.5rem; }
.pay-license-row input {
  flex: 1; min-width: 0; background: var(--bg2); border: 1px solid var(--border-hi); border-radius: 2px;
  color: var(--text); font-family: var(--font-mono); font-size: 0.78rem; padding: 0.55rem 0.7rem;
}
.pay-license-row input:focus { outline: none; border-color: var(--acid); }
.pay-license-msg { font-size: 0.78rem; margin-top: 0.5rem; min-height: 1.1em; color: var(--muted); }
.pay-license-msg.ok { color: var(--acid); }
.pay-license-msg.bad { color: #ff7a7a; }
.pay-unlocked {
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: #0a0c05; background: var(--acid); border-radius: 2px; padding: 0.3rem 0.6rem;
  align-self: flex-start;
}

/* ============ i18n: language switcher + RTL ============ */
.nav-links { margin-inline-start: auto; }
.lang-switch { display: flex; gap: 2px; flex: 0 0 auto; margin-inline-start: 1.4rem; }
.lang-btn {
  font-family: var(--font-mono); font-size: 0.62rem; font-weight: 600; letter-spacing: 0.06em;
  padding: 0.3rem 0.5rem; min-width: 2rem; background: transparent;
  border: 1px solid var(--border-hi); color: var(--muted); border-radius: 2px; cursor: pointer;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.lang-btn:hover { color: var(--text); border-color: var(--brand); }
.lang-btn.active { background: var(--acid); border-color: var(--acid); color: #0a0c05; }
.lang-btn:focus-visible { outline: 2px solid var(--acid); outline-offset: 2px; }

/* Hebrew: Syne has no Hebrew glyphs — use Secular One for display, Rubik for the rest. */
:root[lang="he"] {
  --font-display: 'Secular One', 'Rubik', sans-serif;
  --font-body: 'Rubik', sans-serif;
  --font-mono: 'Rubik', 'JetBrains Mono', monospace;
}
:root[lang="he"] h1, :root[lang="he"] .section h2, :root[lang="he"] .content h2 { letter-spacing: 0; }

/* RTL: flip the few pieces that are absolutely positioned or edge-anchored. */
[dir="rtl"] .progress-bar { transform-origin: 100% 50%; }
[dir="rtl"] .hero-scroll { left: auto; right: 4vw; }
[dir="rtl"] .pricing-card li { padding-left: 0; padding-right: 1.4rem; }
[dir="rtl"] .pricing-card li::before { left: auto; right: 0; }
[dir="rtl"] .pcard-use, [dir="rtl"] .lib-count, [dir="rtl"] .lib-empty { text-align: right; }
[dir="rtl"] .code-block, [dir="rtl"] .pcard-text { direction: ltr; text-align: left; }

@media (max-width: 768px) {
  /* Keep navigation reachable on phones: a scrollable link row rather than hiding it
     outright (or a hamburger, which the house design rules treat as an anti-pattern). */
  :root { --nav-h: 53px; }
  .nav { padding: 1rem 4vw; gap: 0.9rem; }
  .nav-links {
    display: flex;
    gap: 1.15rem;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links li { flex: 0 0 auto; }
  .nav-links a { font-size: 0.62rem; letter-spacing: 0.08em; }
  .lib-hint { display: none; }
  /* Comfortable touch targets for the card icon buttons. */
  .pcard-icon { width: 2.1rem; height: 2.1rem; font-size: 0.95rem; }
  /* Switcher stays visible next to the scrollable link row. */
  /* Horizontal hero stacks back to a column on phones. */
  .page-hero.horizontal { flex-direction: column; align-items: stretch; gap: 0; }
  .page-hero.horizontal p { margin-top: 1.4rem; }
  .page-hero.horizontal h1 .line + .line { margin-inline-start: 0.22em; }
  .lang-switch { margin-inline-start: 0.5rem; gap: 1px; }
  .lang-btn { font-size: 0.56rem; padding: 0.28rem 0.36rem; min-width: 1.7rem; }
  [dir="rtl"] .hero-scroll { right: 6vw; }
  .cat-grid, .prompts-grid, .feature-grid, .pricing, .pricing.two, .pgrid, .howto, .reviews-grid { grid-template-columns: 1fr; }
  .lib-sort { flex: 1; }
  .pcard-text { font-size: 0.72rem; max-height: 50vh; }
  .pcard-foot { flex-direction: column; align-items: stretch; }
  .pcard-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .section, .page-hero, .content { padding-left: 6vw; padding-right: 6vw; }
  .hero-scroll { left: 6vw; }
  .search { width: 100%; margin: 0.6rem 0 0; }
  .cat-row { grid-template-columns: 48px 1fr; }
  .cat-count { display: none; }
  .sub-prompts ul { padding-left: 0.5rem; }
}
