/* === ImpactMojo Deep Dives — shared styles === */

/* ImpactMojo Brand Topbar / Footer */
:root {
    --im-gradient: linear-gradient(135deg, #0EA5E9 0%, #6366F1 100%);
    --im-accent: #0EA5E9;
    --im-nav-bg: rgba(15, 23, 42, 0.95);
    --im-border: #334155;
    --im-text-primary: #F1F5F9;
    --im-text-secondary: #94A3B8;
    --im-text-muted: #64748B;
    --im-card-bg: #1E293B;
    --im-hover-bg: #334155;
    --im-secondary-bg: #1E293B;
    /* Editorial palette */
    --dd-bg: #FAF7F2;
    --dd-surface: #FFFFFF;
    --dd-border: #E8E0D5;
    --dd-text: #1C1C1C;
    --dd-text-soft: #4A4A4A;
    --dd-muted: #6B6560;
    --dd-accent: #C8910A;
    --dd-accent-soft: #FFF8E6;
    --dd-teal: #1A6B5A;
    --dd-teal-soft: #EBF5F2;
    --dd-radius: 10px;
}
html.dark {
    --dd-bg: #0F172A;
    --dd-surface: #1E293B;
    --dd-border: #334155;
    --dd-text: #F1F5F9;
    --dd-text-soft: #CBD5E1;
    --dd-muted: #94A3B8;
    --dd-accent: #F59E0B;
    --dd-accent-soft: rgba(245, 158, 11, 0.12);
    --dd-teal: #38BDF8;
    --dd-teal-soft: rgba(56, 189, 248, 0.10);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { padding-top: 56px; background: var(--dd-bg); color: var(--dd-text); font-family: 'Amaranth', Arial, sans-serif; line-height: 1.7; }

.im-topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 9999; background: var(--im-nav-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid var(--im-border); padding: 0.5rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; font-family: 'Inter', sans-serif; }
.im-topbar a { text-decoration: none; }
.im-topbar-left { display: flex; align-items: center; gap: 0.75rem; }
.im-topbar-home { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1rem; color: #0EA5E9; }
.im-topbar-home img { width: 24px; height: 24px; border-radius: 4px; }
.im-topbar-right { display: flex; align-items: center; gap: 0.5rem; }
.im-premium-btn { background: var(--im-gradient); color: #fff; padding: 0.35rem 0.85rem; border-radius: 6px; font-size: 0.8rem; font-weight: 600; display: flex; align-items: center; gap: 0.35rem; text-decoration: none; }
.im-premium-btn svg { width: 14px; height: 14px; }
.im-theme-selector { display: flex; gap: 2px; background: var(--im-card-bg); border: 1px solid var(--im-border); border-radius: 8px; padding: 2px; }
.im-theme-btn { background: transparent; border: none; color: var(--im-text-secondary); padding: 6px; border-radius: 5px; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; }
.im-theme-btn:hover { background: var(--im-hover-bg); color: var(--im-text-primary); }
.im-theme-btn.active { background: var(--im-accent); color: #fff; }
.im-theme-btn svg { width: 16px; height: 16px; }

/* Editorial body */
.dd-wrap { max-width: 760px; margin: 0 auto; padding: 2.5rem 1.25rem 4rem; }
.dd-back { display: inline-block; margin-bottom: 1.5rem; font-family: 'Inter', sans-serif; font-size: .85rem; color: var(--dd-muted); text-decoration: none; }
.dd-back:hover { color: var(--dd-accent); }

.dd-eyebrow { display: inline-flex; align-items: center; gap: .5rem; font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--dd-accent); margin-bottom: 1rem; }
.dd-eyebrow::before { content: ""; width: 24px; height: 1px; background: var(--dd-accent); }
.dd-title { font-family: 'Inter', sans-serif; font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; margin: 0 0 .75rem; color: var(--dd-text); }
.dd-tagline { font-size: 1.15rem; color: var(--dd-muted); font-style: italic; margin-bottom: 1.75rem; }
.dd-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.dd-chip { font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 600; padding: .25rem .65rem; border-radius: 999px; background: var(--dd-accent-soft); color: var(--dd-accent); }
.dd-chip.dd-chip-teal { background: var(--dd-teal-soft); color: var(--dd-teal); }

/* Curator card */
.dd-curator { display: flex; gap: 1rem; align-items: flex-start; padding: 1.25rem; border: 1px solid var(--dd-border); border-radius: var(--dd-radius); background: var(--dd-surface); margin-bottom: 2rem; }
.dd-curator-avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--dd-accent); color: #fff; display: flex; align-items: center; justify-content: center; font-family: 'Inter', sans-serif; font-weight: 700; font-size: 1.25rem; flex-shrink: 0; }
.dd-curator-body { flex: 1; }
.dd-curator-name { font-family: 'Inter', sans-serif; font-weight: 700; font-size: 1rem; margin-bottom: .15rem; color: var(--dd-text); }
.dd-curator-role { font-family: 'Inter', sans-serif; font-size: .85rem; color: var(--dd-muted); margin-bottom: .5rem; }
.dd-curator-bio { font-size: .95rem; color: var(--dd-text-soft); line-height: 1.6; }
.dd-curator-badge { display: inline-block; margin-top: .6rem; font-family: 'Inter', sans-serif; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: .2rem .55rem; border-radius: 4px; background: var(--dd-teal-soft); color: var(--dd-teal); }

/* Editor's note */
.dd-note { padding: 1.5rem 1.75rem; background: var(--dd-surface); border-left: 3px solid var(--dd-accent); border-radius: 0 var(--dd-radius) var(--dd-radius) 0; margin-bottom: 2.5rem; }
.dd-note-label { font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--dd-accent); margin-bottom: .75rem; }
.dd-note p { font-size: 1.05rem; line-height: 1.75; color: var(--dd-text-soft); margin: 0 0 1rem; }
.dd-note p:last-child { margin-bottom: 0; }

/* Themed sections */
.dd-section { margin-bottom: 2.75rem; }
.dd-section-num { font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 700; color: var(--dd-accent); letter-spacing: .12em; text-transform: uppercase; margin-bottom: .25rem; }
.dd-section-title { font-family: 'Inter', sans-serif; font-size: 1.5rem; font-weight: 700; margin: 0 0 .35rem; color: var(--dd-text); }
.dd-section-intro { font-size: 1rem; color: var(--dd-muted); margin-bottom: 1.25rem; line-height: 1.65; }

/* Reading items */
.dd-item { padding: 1.1rem 1.25rem; border: 1px solid var(--dd-border); border-radius: var(--dd-radius); background: var(--dd-surface); margin-bottom: .85rem; transition: border-color .2s; }
.dd-item:hover { border-color: var(--dd-accent); }
.dd-item-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; flex-wrap: wrap; }
.dd-type { font-family: 'Inter', sans-serif; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: .2rem .55rem; border-radius: 4px; background: var(--dd-accent-soft); color: var(--dd-accent); white-space: nowrap; }
.dd-type[data-t="paper"] { background: rgba(99, 102, 241, .12); color: #6366F1; }
.dd-type[data-t="podcast"] { background: rgba(168, 85, 247, .12); color: #A855F7; }
.dd-type[data-t="film"] { background: rgba(239, 68, 68, .12); color: #EF4444; }
.dd-type[data-t="dataset"] { background: rgba(16, 185, 129, .12); color: #10B981; }
.dd-type[data-t="article"] { background: rgba(14, 165, 233, .12); color: #0EA5E9; }
.dd-type[data-t="web"] { background: rgba(100, 116, 139, .12); color: #64748B; }
html.dark .dd-type[data-t="paper"] { background: rgba(99, 102, 241, .25); color: #A5B4FC; }
html.dark .dd-type[data-t="podcast"] { background: rgba(168, 85, 247, .25); color: #C4B5FD; }
html.dark .dd-type[data-t="film"] { background: rgba(239, 68, 68, .25); color: #FCA5A5; }
html.dark .dd-type[data-t="dataset"] { background: rgba(16, 185, 129, .25); color: #6EE7B7; }
html.dark .dd-type[data-t="article"] { background: rgba(14, 165, 233, .25); color: #7DD3FC; }
html.dark .dd-type[data-t="web"] { background: rgba(148, 163, 184, .25); color: #CBD5E1; }
.dd-cite { font-family: 'Inter', sans-serif; font-weight: 600; font-size: 1rem; color: var(--dd-text); }
.dd-cite a { color: var(--dd-text); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color .2s, color .2s; }
.dd-cite a:hover { color: var(--dd-accent); border-bottom-color: var(--dd-accent); }
.dd-cite a::after { content: " ↗"; font-size: .8em; color: var(--dd-muted); }
.dd-annot { font-size: .98rem; color: var(--dd-text-soft); line-height: 1.65; margin: 0; }

/* Related */
.dd-related { padding: 1.5rem 1.75rem; background: var(--dd-teal-soft); border-radius: var(--dd-radius); margin: 2.5rem 0; }
.dd-related-label { font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--dd-teal); margin-bottom: .85rem; }
.dd-related ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.dd-related li { font-family: 'Inter', sans-serif; font-size: .95rem; }
.dd-related a { color: var(--dd-text); text-decoration: none; border-bottom: 1px dotted var(--dd-teal); transition: color .2s; }
.dd-related a:hover { color: var(--dd-teal); }

/* Cite block */
.dd-cite-block { padding: 1.25rem 1.5rem; background: var(--dd-surface); border: 1px dashed var(--dd-border); border-radius: var(--dd-radius); margin: 2rem 0; }
.dd-cite-label { font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--dd-muted); margin-bottom: .5rem; }
.dd-cite-text { font-family: 'Inter', sans-serif; font-size: .9rem; color: var(--dd-text-soft); line-height: 1.6; }

/* CTA */
.dd-cta { padding: 1.75rem; background: var(--dd-accent-soft); border-radius: var(--dd-radius); text-align: center; }
.dd-cta h3 { font-family: 'Inter', sans-serif; font-size: 1.25rem; margin: 0 0 .5rem; color: var(--dd-accent); }
.dd-cta p { font-size: .95rem; color: var(--dd-text-soft); margin: 0 0 1rem; }
.dd-cta a { display: inline-block; background: var(--dd-accent); color: #fff !important; font-family: 'Inter', sans-serif; font-weight: 600; padding: .65rem 1.5rem; border-radius: 8px; text-decoration: none; }
.dd-cta a:hover { opacity: .9; }

/* Footer */
.im-footer { background: var(--im-secondary-bg); border-top: 1px solid var(--im-border); padding: 2rem 1rem; margin-top: 4rem; font-family: 'Inter', sans-serif; color: var(--im-text-secondary); }
.im-footer-content { max-width: 1100px; margin: 0 auto; }
.im-footer-made { text-align: center; margin-bottom: 1.5rem; font-size: 0.9rem; color: var(--im-text-muted); }
.im-footer-made a { color: var(--im-accent); text-decoration: none; }
.im-footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; margin-bottom: 1.5rem; }
.im-footer-section h4 { color: var(--im-text-primary); font-size: 0.9rem; margin-bottom: 0.75rem; font-weight: 600; }
.im-footer-section ul { list-style: none; padding: 0; margin: 0; }
.im-footer-section li { margin-bottom: 0.4rem; }
.im-footer-section a { color: var(--im-text-secondary); font-size: 0.85rem; text-decoration: none; transition: color 0.2s; }
.im-footer-section a:hover { color: var(--im-accent); }
.im-footer-bottom { text-align: center; padding-top: 1rem; border-top: 1px solid var(--im-border); font-size: 0.8rem; color: var(--im-text-muted); }
.im-footer-bottom a { color: var(--im-accent); text-decoration: none; }
.im-footer-made svg { width: 14px; height: 14px; vertical-align: middle; color: #EF4444; }
.im-footer-section h4 svg, .im-footer-section a svg { width: 14px; height: 14px; vertical-align: middle; margin-right: 4px; }

/* Skip link */
.im-skip-link { position: absolute; top: -40px; left: 0; background: var(--im-accent); color: #fff; padding: 8px 16px; z-index: 10000; text-decoration: none; font-family: 'Inter', sans-serif; font-size: 0.85rem; font-weight: 600; }
.im-skip-link:focus { top: 0; }

/* Sargam type icons inside reading items */
.dd-type svg { width: 12px; height: 12px; vertical-align: -1px; margin-right: 3px; }
.dd-related-icon { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin-right: 6px; vertical-align: middle; color: var(--dd-teal); }
.dd-related-icon svg { width: 16px; height: 16px; }

/* Paper plane (decorative, fixed bottom-right). Subtle, never dominant. */
.im-paper-plane { position: fixed; bottom: 1.5rem; right: 1.5rem; width: 48px; height: 48px; opacity: 0.10; pointer-events: none; z-index: 0; animation: imFloat 6s ease-in-out infinite; }
html.dark .im-paper-plane { opacity: 0.18; }
@keyframes imFloat { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-10px) rotate(2deg); } }
@media (prefers-reduced-motion: reduce) { .im-paper-plane { animation: none; } }

@media (max-width: 640px) {
    .dd-wrap { padding: 1.5rem 1rem 3rem; }
    .dd-curator { flex-direction: column; }
    .dd-note, .dd-related, .dd-cta { padding: 1.25rem; }
    .im-paper-plane { width: 32px; height: 32px; bottom: 1rem; right: 1rem; }
}
