/* === ImpactMojo Law Guides — shared styles ===
   Brand chrome (topbar/footer) mirrors DeepDives/_template.html;
   lg-* classes are the law-guide editorial design. */

/* --- Brand chrome --- */
: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;
}
body { padding-top: 56px !important; margin: 0; }
.im-skip-link { position: absolute; left: -9999px; top: 0; background: #0EA5E9; color: #fff; padding: .5rem 1rem; z-index: 10000; border-radius: 0 0 6px 0; font-family: 'Inter', sans-serif; }
.im-skip-link:focus { left: 0; }
.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', 'Amaranth', 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; }
.im-premium-btn svg { width: 14px; height: 14px; }
.im-browse-btn { display: inline-flex; align-items: center; gap: 0.4rem; font-family: 'Inter', sans-serif; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: rgba(255,255,255,0.9); background: rgba(255,255,255,0.05); border: 1.5px solid rgba(255,255,255,0.18); padding: 0.5rem 1rem; border-radius: 0.5rem; text-decoration: none; transition: background 0.18s ease, border-color 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease; }
.im-browse-btn:hover { background: var(--im-accent); color: #FFFFFF; border-color: var(--im-accent); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(14, 165, 233, 0.25); }
.im-browse-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; }

.im-footer { background: var(--im-secondary-bg); border-top: 1px solid var(--im-border); padding: 2rem 1rem; margin-top: 4rem; font-family: 'Inter', 'Amaranth', 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); }
.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; transition: color 0.2s; text-decoration: none; }
.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); }

.im-paper-plane { position: fixed; bottom: 2rem; right: 2rem; width: 120px; height: 120px; opacity: 0.12; pointer-events: none; z-index: 0; animation: lg-float 6s ease-in-out infinite; }
@keyframes lg-float { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-15px) rotate(3deg); } }
@media (prefers-reduced-motion: reduce) { .im-paper-plane { animation: none; } }

/* --- Law Guide editorial design --- */
:root {
    --lg-bg: #FAF7F2;
    --lg-surface: #FFFFFF;
    --lg-border: #E8E0D5;
    --lg-text: #1C1C1C;
    --lg-text-soft: #4A4A4A;
    --lg-muted: #6B6560;
    --lg-accent: #1A6B5A;
    --lg-accent-soft: #EBF5F2;
    --lg-gold: #C8910A;
    --lg-gold-soft: #FFF8E6;
    --lg-red: #B4432F;
    --lg-red-soft: #FBEFEC;
    --lg-radius: 10px;
}
html.dark {
    --lg-bg: #0F172A;
    --lg-surface: #1E293B;
    --lg-border: #334155;
    --lg-text: #F1F5F9;
    --lg-text-soft: #CBD5E1;
    --lg-muted: #94A3B8;
    --lg-accent: #34D399;
    --lg-accent-soft: rgba(52, 211, 153, 0.10);
    --lg-gold: #F59E0B;
    --lg-gold-soft: rgba(245, 158, 11, 0.12);
    --lg-red: #F87171;
    --lg-red-soft: rgba(248, 113, 113, 0.10);
}
html, body { background: var(--lg-bg); color: var(--lg-text); font-family: 'Amaranth', Arial, sans-serif; line-height: 1.7; }
.lg-wrap { max-width: 780px; margin: 0 auto; padding: 2.5rem 1.25rem 4rem; position: relative; z-index: 1; }

.lg-back { display: inline-block; margin-bottom: 1.5rem; font-family: 'Inter', sans-serif; font-size: .85rem; color: var(--lg-muted); text-decoration: none; }
.lg-back:hover { color: var(--lg-accent); }

/* Hero */
.lg-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(--lg-accent); margin-bottom: 1rem; }
.lg-eyebrow::before { content: ""; width: 24px; height: 1px; background: var(--lg-accent); }
.lg-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(--lg-text); }
.lg-tagline { font-size: 1.15rem; color: var(--lg-muted); font-style: italic; margin-bottom: 1.5rem; }
.lg-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.75rem; }
.lg-chip { font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 600; padding: .25rem .65rem; border-radius: 999px; background: var(--lg-accent-soft); color: var(--lg-accent); }
.lg-chip.lg-chip-gold { background: var(--lg-gold-soft); color: var(--lg-gold); }

/* Disclaimer */
.lg-disclaimer { display: flex; gap: .75rem; align-items: flex-start; padding: .9rem 1.1rem; background: var(--lg-gold-soft); border: 1px solid var(--lg-gold); border-radius: var(--lg-radius); margin-bottom: 2rem; font-size: .9rem; color: var(--lg-text-soft); line-height: 1.6; }
.lg-disclaimer strong { color: var(--lg-gold); font-family: 'Inter', sans-serif; }

/* Stat tiles */
.lg-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .85rem; margin-bottom: 2.5rem; }
.lg-stat { padding: 1rem 1.1rem; background: var(--lg-surface); border: 1px solid var(--lg-border); border-radius: var(--lg-radius); }
.lg-stat-num { font-family: 'Inter', sans-serif; font-size: 1.35rem; font-weight: 700; color: var(--lg-accent); line-height: 1.25; }
.lg-stat-label { font-family: 'Inter', sans-serif; font-size: .78rem; color: var(--lg-muted); margin-top: .25rem; line-height: 1.45; }

/* Sections */
.lg-section { margin-bottom: 2.75rem; }
.lg-section-num { font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 700; color: var(--lg-gold); letter-spacing: .12em; text-transform: uppercase; margin-bottom: .25rem; }
.lg-section-title { font-family: 'Inter', sans-serif; font-size: 1.5rem; font-weight: 700; margin: 0 0 .5rem; color: var(--lg-text); }
.lg-section p { font-size: 1.02rem; color: var(--lg-text-soft); line-height: 1.75; margin: 0 0 1rem; }
.lg-section p:last-child { margin-bottom: 0; }
.lg-section ul { color: var(--lg-text-soft); padding-left: 1.25rem; margin: 0 0 1rem; }
.lg-section li { margin-bottom: .5rem; }
.lg-section a { color: var(--lg-accent); }

/* Key points list */
.lg-points { list-style: none; padding: 0; margin: 0; counter-reset: lgpt; }
.lg-points > li { position: relative; padding: 1rem 1.15rem 1rem 3.1rem; background: var(--lg-surface); border: 1px solid var(--lg-border); border-radius: var(--lg-radius); margin-bottom: .75rem; counter-increment: lgpt; }
.lg-points > li::before { content: counter(lgpt, decimal-leading-zero); position: absolute; left: 1.05rem; top: 1.05rem; font-family: 'Inter', sans-serif; font-size: .85rem; font-weight: 700; color: var(--lg-gold); }
.lg-points strong { font-family: 'Inter', sans-serif; color: var(--lg-text); }

/* Role / who's-who cards */
.lg-roles { display: grid; gap: .75rem; }
.lg-role { padding: 1rem 1.2rem; background: var(--lg-surface); border: 1px solid var(--lg-border); border-left: 3px solid var(--lg-accent); border-radius: 0 var(--lg-radius) var(--lg-radius) 0; }
.lg-role-name { font-family: 'Inter', sans-serif; font-weight: 700; font-size: .98rem; color: var(--lg-text); margin-bottom: .25rem; }
.lg-role-name em { font-style: normal; font-weight: 600; font-size: .82rem; color: var(--lg-muted); }
.lg-role p { font-size: .95rem; margin: 0; }

/* Interactive checklist */
.lg-checklist { background: var(--lg-surface); border: 1px solid var(--lg-border); border-radius: var(--lg-radius); padding: 1.25rem 1.4rem; }
.lg-checklist-progress { font-family: 'Inter', sans-serif; font-size: .82rem; font-weight: 600; color: var(--lg-muted); margin-bottom: .9rem; }
.lg-checklist-bar { height: 6px; background: var(--lg-border); border-radius: 999px; overflow: hidden; margin-bottom: 1.1rem; }
.lg-checklist-fill { height: 100%; width: 0; background: var(--lg-accent); border-radius: 999px; transition: width .3s ease; }
.lg-check { display: flex; gap: .7rem; align-items: flex-start; padding: .55rem 0; border-bottom: 1px dashed var(--lg-border); cursor: pointer; }
.lg-check:last-child { border-bottom: none; }
.lg-check input { margin-top: .3rem; width: 17px; height: 17px; accent-color: var(--lg-accent); cursor: pointer; flex-shrink: 0; }
.lg-check span { font-size: .97rem; color: var(--lg-text-soft); line-height: 1.6; }
.lg-check input:checked + span { color: var(--lg-muted); text-decoration: line-through; text-decoration-color: var(--lg-accent); }
.lg-checklist-note { font-size: .82rem; color: var(--lg-muted); margin-top: .85rem; font-family: 'Inter', sans-serif; }

/* Gray areas */
.lg-gray { padding: 1.1rem 1.25rem; background: var(--lg-surface); border: 1px solid var(--lg-border); border-left: 3px solid var(--lg-red); border-radius: 0 var(--lg-radius) var(--lg-radius) 0; margin-bottom: .85rem; }
.lg-gray-title { font-family: 'Inter', sans-serif; font-weight: 700; font-size: .98rem; color: var(--lg-red); margin-bottom: .3rem; }
.lg-gray p { font-size: .95rem; margin: 0; }

/* FAQ */
.lg-faq { border: 1px solid var(--lg-border); border-radius: var(--lg-radius); background: var(--lg-surface); margin-bottom: .75rem; overflow: hidden; }
.lg-faq summary { padding: .95rem 1.2rem; font-family: 'Inter', sans-serif; font-weight: 600; font-size: .98rem; color: var(--lg-text); cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.lg-faq summary::-webkit-details-marker { display: none; }
.lg-faq summary::after { content: "+"; font-size: 1.2rem; color: var(--lg-accent); flex-shrink: 0; }
.lg-faq[open] summary::after { content: "−"; }
.lg-faq summary:hover { color: var(--lg-accent); }
.lg-faq-body { padding: 0 1.2rem 1rem; font-size: .97rem; color: var(--lg-text-soft); line-height: 1.7; }
.lg-faq-body p { margin: 0 0 .75rem; }
.lg-faq-body p:last-child { margin-bottom: 0; }

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

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

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

/* Hub index cards */
.lg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.25rem; margin: 2rem 0; }
.lg-card { display: flex; flex-direction: column; padding: 1.4rem 1.5rem; background: var(--lg-surface); border: 1px solid var(--lg-border); border-radius: 16px; box-shadow: 0 4px 6px rgba(0,0,0,0.06); text-decoration: none; transition: border-color .2s, transform .2s, box-shadow .2s; }
.lg-card:hover { border-color: var(--lg-accent); transform: translateY(-3px); box-shadow: 0 8px 18px rgba(0,0,0,0.10); }
.lg-card-tag { font-family: 'Inter', sans-serif; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--lg-gold); margin-bottom: .5rem; }
.lg-card-title { font-family: 'Inter', sans-serif; font-size: 1.12rem; font-weight: 700; color: var(--lg-text); margin: 0 0 .45rem; line-height: 1.35; }
.lg-card p { font-size: .93rem; color: var(--lg-text-soft); line-height: 1.6; margin: 0 0 .85rem; flex: 1; }
.lg-card-go { font-family: 'Inter', sans-serif; font-size: .85rem; font-weight: 600; color: var(--lg-accent); }
.lg-wrap-wide { max-width: 1100px; }

@media (max-width: 640px) {
    .lg-wrap { padding: 1.5rem 1rem 3rem; }
    .lg-related, .lg-cta, .lg-checklist { padding: 1.25rem; }
    .im-paper-plane { width: 80px; height: 80px; }
}
