/* NerdSip fun facts pages.
 *
 * Loaded BEFORE /seo-theme.css, in the same slot the other pillar pages use for
 * their inline <style> block. That order matters: seo-theme.css re-declares the
 * palette to papyrus and gold, and it must win.
 *
 * The first block is the shared pillar shell, kept byte-identical in behaviour
 * to /general-knowledge/ and /become-interesting/ so the cluster does not look
 * like it came from a different site. Fun-facts-specific rules start at "fact
 * library" below.
 */

/* ---------------- shared pillar shell ---------------- */

:root { --bg-papyrus: #FAFAF7; --bg-white: #FFFFFF; --text-dark: #1E293B; --text-slate: #64748B; --border-color: #E2E8F0; --emerald-dark: #022C22; --emerald-accent: #10B981; --emerald-light: #D1FAE5; }
body { background-color: var(--bg-papyrus) !important; color: var(--text-dark); }
.pillar-page { padding-top: 0; }
.pillar-hero { width: 100%; box-sizing: border-box; margin: 0 0 1.25rem; padding: 7rem max(1.5rem, calc((100vw - 1120px) / 2)) 4.5rem; display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr); gap: 3rem; align-items: center; background: linear-gradient(180deg, var(--emerald-dark) 0%, #064E3B 100%); border-bottom-left-radius: 48px; border-bottom-right-radius: 48px; position: relative; overflow: hidden; }
.pillar-hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at top right, rgba(16,185,129,0.24), transparent 38%); pointer-events: none; }
.pillar-hero > * { position: relative; z-index: 1; }
.pillar-kicker { display: inline-flex; color: var(--emerald-light); font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem; margin-bottom: 1rem; }
.pillar-hero h1 { text-align: left; margin-bottom: 1rem; color: #fff; background: none; -webkit-text-fill-color: #fff; }
.pillar-lede { font-size: 1.22rem; color: rgba(255,255,255,0.88); max-width: 650px; margin-bottom: 1.5rem; }
.pillar-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 1.5rem; align-items: stretch; }
.pillar-actions .cta-btn, .pillar-actions .secondary-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; margin-top: 0; padding: 0.9rem 1.25rem; box-sizing: border-box; line-height: 1.15; }
.secondary-btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0.9rem 1.25rem; border: 1px solid rgba(16,185,129,0.28); border-radius: 0.75rem; color: #fff !important; text-decoration: none !important; font-weight: 800; }
.hero-card { background: #fff; border: 1px solid rgba(255,255,255,0.22); border-radius: 1rem; overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,0.28); min-width: 0; }
.hero-card img { width: 100%; aspect-ratio: 1200 / 630; height: auto; object-fit: cover; display: block; margin: 0; border-radius: 0; }
.hero-card-body { padding: 1.2rem; }
.hero-card-body p { color: var(--text-slate); margin: 0; }
.content { color: var(--text-dark); }
.content h2, .content h3 { color: var(--text-dark) !important; }
.content p, .content li { color: var(--text-slate); }
.content strong { color: var(--text-dark); }
.highlight-box, .resources-box, .references { background: var(--bg-white); border: 1px solid var(--border-color); border-left: 4px solid var(--emerald-accent); color: var(--text-dark) !important; box-shadow: 0 12px 32px rgba(15,23,42,0.05); }
.highlight-box h2 { margin-top: 0; }
.answer-grid, .cluster-grid, .steps-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 1.5rem 0 2.5rem; }
.answer-card, .cluster-card, .step-card { background: var(--bg-white); border: 1px solid var(--border-color); border-radius: 1rem; padding: 1.2rem; box-shadow: 0 10px 28px rgba(15,23,42,0.04); }
.answer-card h3, .cluster-card h3, .step-card h3 { margin-top: 0; font-size: 1.05rem; }
.answer-card p, .cluster-card p, .step-card p { color: var(--text-slate); font-size: 1rem; margin-bottom: 0; }
.cluster-card { color: var(--text-dark) !important; text-decoration: none !important; transition: transform 0.2s ease, border-color 0.2s ease; }
.cluster-card:hover { transform: translateY(-2px); border-color: rgba(16,185,129,0.45); }
.nav-pill { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 2rem 0 0; }
.nav-pill a { color: var(--emerald-dark); background: #ECFDF5; border: 1px solid rgba(16,185,129,0.22); border-radius: 999px; padding: 0.5rem 0.85rem; text-decoration: none; font-weight: 800; font-size: 0.9rem; }
.breadcrumbs { max-width: 1120px; margin: 0 auto 3rem; padding: 0 1.5rem; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 0; list-style: none; margin: 0; padding: 0; font-size: 0.82rem; line-height: 1.4; color: var(--text-slate); }
.breadcrumbs li { display: inline-flex; align-items: center; min-height: 1.25rem; }
.breadcrumbs li + li::before { content: "\203A"; margin: 0 0.45rem; color: #CBD5E1; }
.breadcrumbs a { color: var(--text-slate); text-decoration: none; }
.breadcrumbs a:hover { color: var(--emerald-accent); }
.breadcrumbs [aria-current="page"] { color: #059669; font-weight: 600; }
.cta-section { background: var(--emerald-dark); }
.content .cta-section h2, .content .cta-section h3 { color: #fff !important; }
.content .cta-section p { color: rgba(255,255,255,0.86) !important; }
.tiny-note { color: var(--text-slate); font-size: 0.95rem; }
footer { background: var(--bg-papyrus); }

/* ---------------- fact library ---------------- */

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

.ff-library { margin: 1.5rem 0 3rem; }

.ff-controls { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: stretch; margin-bottom: 1rem; }
.ff-search { flex: 1 1 260px; display: block; min-width: 0; }
.ff-search input { width: 100%; box-sizing: border-box; min-height: 48px; padding: 0.75rem 1rem; border: 1px solid var(--border-color); border-radius: 0.75rem; background: var(--bg-white); color: var(--text-dark); font: inherit; font-size: 1rem; }
.ff-search input:focus { outline: 2px solid rgba(16,185,129,0.45); outline-offset: 1px; border-color: rgba(16,185,129,0.45); }
.ff-shuffle, .ff-more { min-height: 48px; padding: 0.75rem 1.25rem; border: 1px solid rgba(16,185,129,0.28); border-radius: 0.75rem; background: #ECFDF5; color: var(--emerald-dark); font: inherit; font-weight: 800; cursor: pointer; transition: border-color 0.2s ease, background 0.2s ease; }
.ff-shuffle:hover, .ff-more:hover { border-color: rgba(16,185,129,0.6); background: #D1FAE5; }
.ff-more { display: block; width: 100%; margin-top: 1.25rem; }
.ff-more:disabled { opacity: 0.55; cursor: progress; }

.ff-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1rem; }
.ff-chip { padding: 0.45rem 0.85rem; border: 1px solid var(--border-color); border-radius: 999px; background: var(--bg-white); color: var(--text-slate); font: inherit; font-size: 0.9rem; font-weight: 700; cursor: pointer; transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease; }
.ff-chip:hover { border-color: rgba(16,185,129,0.45); color: var(--emerald-dark); }
.ff-chip.is-on { background: var(--emerald-dark); border-color: var(--emerald-dark); color: #fff; }

.ff-count { font-size: 0.88rem; font-weight: 700; color: var(--text-light, var(--text-slate)); margin: 0 0 0.75rem; }
.ff-empty { padding: 1.25rem; border: 1px dashed var(--border-color); border-radius: 0.75rem; text-align: center; }

.ff-fact-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; }
.ff-fact { display: flex; gap: 0.85rem; padding: 1.1rem; background: var(--bg-white); border: 1px solid var(--border-color); border-radius: 1rem; box-shadow: 0 10px 28px rgba(15,23,42,0.04); }
.ff-fact[hidden] { display: none; }
.ff-fact-emoji { font-size: 1.4rem; line-height: 1.3; flex: 0 0 auto; }
.ff-fact-body { min-width: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.ff-fact-body p { margin: 0; font-size: 1rem; line-height: 1.55; }
.ff-fact-meta { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-top: auto; }
.ff-fact-cat { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #059669; }

.ff-copy { padding: 0.35rem 0.7rem; border: 1px solid var(--border-color); border-radius: 999px; background: transparent; color: var(--text-slate); font: inherit; font-size: 0.8rem; font-weight: 700; cursor: pointer; transition: border-color 0.2s ease, color 0.2s ease; }
.ff-copy:hover { border-color: rgba(16,185,129,0.5); color: var(--emerald-dark); }
.ff-copy.is-done { border-color: #059669; color: #059669; }
.ff-copy-lg { padding: 0.6rem 1.15rem; font-size: 0.95rem; }

/* ---------------- daily teaser and daily page ---------------- */

.ff-daily-teaser { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; margin: 2.5rem 0; padding: 1.5rem 1.75rem; background: var(--bg-white); border: 1px solid var(--border-color); border-left: 4px solid var(--emerald-accent); border-radius: 1rem; box-shadow: 0 12px 32px rgba(15,23,42,0.05); }
.ff-daily-teaser h2 { margin-top: 0; margin-bottom: 0.5rem; }
.ff-daily-teaser p { margin: 0; }
.ff-daily-teaser .cta-btn { margin-top: 0; flex: 0 0 auto; }

.ff-daily-lede { font-size: 1.15rem; }

.ff-today { margin: 1.5rem 0 2.5rem; padding: 2rem 1.75rem; text-align: center; background: linear-gradient(180deg, var(--emerald-dark) 0%, #064E3B 100%); border-radius: 1.25rem; box-shadow: 0 24px 60px rgba(2,44,34,0.28); }
/* Two classes deep on purpose. seo-theme.css loads after this file and paints
   `.content p` with !important, which outranks a single-class selector even when
   that one is !important too. Anything sitting on the dark card has to clear
   (0,1,1) or it comes out slate-on-green. */
.content .ff-today-label { margin: 0 0 1rem; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #A7F3D0 !important; }
.content .ff-today-emoji { margin: 0 0 0.75rem; font-size: 2.5rem; line-height: 1; }
.content .ff-today-text { margin: 0 auto 1rem; max-width: 46rem; font-family: 'Playfair Display', Georgia, serif; font-size: 1.5rem; line-height: 1.45; color: #FFFFFF !important; }
.content .ff-today-cat { margin: 0 0 1.25rem; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255,255,255,0.72) !important; }
.ff-today .ff-copy { border-color: rgba(255,255,255,0.35); color: #fff; }
.ff-today .ff-copy:hover { border-color: #fff; color: #fff; }
.ff-today .ff-copy.is-done { border-color: #6EE7B7; color: #6EE7B7; }

.ff-recent { list-style: none; counter-reset: ffday; margin: 1.5rem 0 2.5rem; padding: 0; display: grid; gap: 0.75rem; }
.ff-recent li { padding: 1rem 1.15rem; background: var(--bg-white); border: 1px solid var(--border-color); border-radius: 0.85rem; }
.ff-recent time { display: block; margin-bottom: 0.35rem; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #059669; }
.ff-recent p { margin: 0; font-size: 0.98rem; line-height: 1.55; }

.ff-daily-back { margin: 2rem 0 0; font-weight: 700; }

/* ---------------- long-form bits ---------------- */

.ff-list { margin: 1rem 0 1.75rem; padding-left: 1.25rem; display: grid; gap: 0.5rem; }
.ff-group-h { margin-top: 2rem; }
.ff-group-lede { margin-top: 0.35rem; }
.ff-faq-item { margin-bottom: 1.5rem; }
.ff-faq-item h3 { margin-bottom: 0.4rem; }
.ff-review-note { margin-top: 2.5rem; font-size: 0.85rem; font-weight: 600; color: var(--text-light, var(--text-slate)); }

@media (max-width: 900px) {
  .pillar-hero, .answer-grid, .cluster-grid, .steps-grid { grid-template-columns: 1fr; }
  .pillar-hero h1 { text-align: center; }
  .pillar-hero { padding: 6.5rem 1rem 3rem; border-bottom-left-radius: 32px; border-bottom-right-radius: 32px; }
  .pillar-kicker, .pillar-lede, .pillar-actions { justify-content: center; text-align: center; margin-left: auto; margin-right: auto; }
  .breadcrumbs { padding: 0 1rem; }
  .ff-fact-list { grid-template-columns: 1fr; }
  .ff-daily-teaser { flex-direction: column; align-items: flex-start; }
  .ff-today { padding: 1.75rem 1.15rem; }
  .ff-today-text { font-size: 1.25rem; }
}
