
:root {
  /* Colors derived from landing page HSL tokens in index.css */
  --navy: #1a3366; --navy-dark: #122549; --navy-light: #364d7d;
  --gold: #e8b430; --gold-light: #e8ca7d;
  --text: #1b2232; --text-light: #676f7e;
  --bg: #fff; --bg-light: #f3f4f7;
  --border: #e0e4eb;
  --radius: 0.5rem;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; line-height: 1.6; color: var(--text); background: var(--bg); padding-top: 4rem; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: 'Merriweather', Georgia, serif; }
a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }

/* Header — matches landing page Navbar (fixed, backdrop blur, border) */
.header { background: rgba(26,51,102,0.95); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); position: fixed; top: 0; left: 0; right: 0; z-index: 100; border-bottom: 1px solid rgba(255,255,255,0.1); }
.header .container { display: flex; justify-content: space-between; align-items: center; height: 4rem; }
.logo { color: #fff; font-weight: 700; font-size: 1.125rem; text-decoration: none; display: flex; align-items: center; gap: 0.5rem; }
.logo:hover { text-decoration: none; }
.logo-mark { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.logo-mark svg { width: 32px; height: 32px; }
.header nav { display: flex; gap: 2rem; align-items: center; }
.nav-link { color: rgba(255,255,255,0.8); font-size: 0.875rem; text-decoration: none; transition: color 0.15s; }
.nav-link:hover { color: #fff; text-decoration: none; }
.nav-cta { background: var(--gold); color: var(--text); padding: 0.4rem 1rem; border-radius: 6px; font-weight: 600; font-size: 0.875rem; transition: background 0.15s; }
.nav-cta:hover { background: var(--gold-light); text-decoration: none; }

/* Badges */
.badge { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 4px; font-size: 0.75rem; font-weight: 600; line-height: 1.5; }
.badge-sustained { background: #dcfce7; color: #166534; }
.badge-dismissed { background: #fee2e2; color: #991b1b; }
.badge-remanded { background: #fef9c3; color: #854d0e; }
.badge-visa { background: #dbeafe; color: #1e40af; }
.criteria-tag { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 99px; font-size: 0.7rem; background: var(--bg-light); color: var(--text-light); border: 1px solid var(--border); }

/* Footer — matches landing page Footer (navy bg, multi-column) */
.footer { background: var(--navy); padding: 4rem 0; color: #fff; margin-top: 3rem; }
.footer a { color: rgba(255,255,255,0.7); transition: color 0.15s; }
.footer a:hover { color: #fff; text-decoration: none; }
.footer .logo { margin-bottom: 1rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 3rem; }
.footer-desc { color: rgba(255,255,255,0.7); max-width: 320px; font-size: 0.9rem; line-height: 1.6; }
.footer-col h4 { font-family: 'Inter', sans-serif; font-weight: 600; margin-bottom: 1rem; font-size: 0.95rem; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col li a { font-size: 0.9rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.2); padding-top: 2rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer-bottom p { color: rgba(255,255,255,0.6); font-size: 0.85rem; }

/* CTA */
.cta { background: linear-gradient(135deg, var(--navy), var(--navy-light)); color: #fff; padding: 2.5rem 2rem; border-radius: 12px; text-align: center; margin: 3rem 0; }
.cta h2 { color: #fff; margin-bottom: 0.5rem; font-size: 1.5rem; }
.cta p { opacity: 0.9; margin-bottom: 1.25rem; max-width: 520px; margin-left: auto; margin-right: auto; line-height: 1.5; }
.cta-btn { display: inline-block; background: var(--gold); color: var(--text); padding: 0.85rem 2.25rem; border-radius: var(--radius); font-weight: 700; font-size: 1.05rem; text-decoration: none; transition: transform 0.15s, box-shadow 0.15s; }
.cta-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); text-decoration: none; }
.cta-sub { font-size: 0.8rem; opacity: 0.7; margin-top: 0.75rem; }

/* Sticky sidebar (detail pages only, wide screens) */
.sticky-sidebar { position: fixed; right: 2rem; top: 5.5rem; width: 200px; background: var(--navy); color: #fff; padding: 1.25rem; border-radius: 10px; font-size: 0.82rem; line-height: 1.5; box-shadow: 0 4px 20px rgba(0,0,0,0.15); z-index: 40; display: none; }
@media (min-width: 1280px) { .sticky-sidebar { display: block; } }
.sticky-sidebar strong { display: block; font-size: 0.85rem; margin-bottom: 0.5rem; }
.sticky-sidebar p { color: rgba(255,255,255,0.8); margin-bottom: 1rem; }
.sidebar-cta-btn { display: block; background: var(--gold); color: var(--text); padding: 0.5rem 0.75rem; border-radius: 6px; font-weight: 600; font-size: 0.8rem; text-align: center; text-decoration: none; }
.sidebar-cta-btn:hover { background: var(--gold-light); text-decoration: none; }

/* Inline CTA banner (between result cards) */
.inline-cta-banner { display: block; background: linear-gradient(135deg, var(--navy), var(--navy-light)); color: #fff; padding: 0.85rem 1.25rem; border-radius: var(--radius); font-size: 0.85rem; font-weight: 500; text-decoration: none; transition: opacity 0.15s; }
.inline-cta-banner:hover { opacity: 0.9; text-decoration: none; color: var(--gold); }

/* PDF micro-CTA */
.pdf-micro-cta { display: inline-block; font-size: 0.8rem; color: var(--navy); margin: 0 0 1.5rem 0.25rem; text-decoration: underline; }
.pdf-micro-cta:hover { color: var(--navy-light); }

/* Cards grid */
.cards-grid { display: grid; gap: 1rem; }
.card { display: block; padding: 1.25rem; border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: var(--text); transition: box-shadow 0.15s, border-color 0.15s; }
.card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); border-color: var(--navy); text-decoration: none; }
.card-badges { display: flex; gap: 0.5rem; margin-bottom: 0.5rem; align-items: center; }
.card h3 { font-family: 'Inter', sans-serif; font-size: 0.95rem; font-weight: 600; color: var(--navy); margin-bottom: 0.35rem; }
.card-meta { font-size: 0.8rem; color: var(--text-light); margin-bottom: 0.5rem; }
.card-excerpt { font-size: 0.85rem; color: var(--text-light); line-height: 1.5; margin-bottom: 0.5rem; }
.card-criteria { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.card .score { font-size: 0.75rem; color: var(--gold); font-weight: 600; margin-left: auto; }
.hidden-card { display: none; }

/* Category hubs + pagination */
.section-kicker { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--navy); font-weight: 700; margin-bottom: 0.5rem; }
.section-lead { color: var(--text-light); margin-bottom: 1rem; max-width: 720px; }
.category-hubs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.category-hub { display: block; border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.1rem; background: #fff; color: var(--text); text-decoration: none; transition: box-shadow 0.15s, border-color 0.15s, transform 0.15s; }
.category-hub:hover { text-decoration: none; border-color: var(--navy); box-shadow: 0 6px 18px rgba(26,51,102,0.08); transform: translateY(-1px); }
.category-hub strong { display: block; color: var(--navy); margin-bottom: 0.25rem; }
.category-hub span { color: var(--text-light); font-size: 0.9rem; }
.category-nav { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0 1.5rem; }
.category-nav a { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.45rem 0.75rem; border: 1px solid var(--border); border-radius: 999px; color: var(--text); font-size: 0.85rem; text-decoration: none; background: #fff; }
.category-nav a:hover, .category-nav a.active { border-color: var(--navy); color: var(--navy); background: #f8fbff; text-decoration: none; }
.pagination { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; justify-content: space-between; margin-top: 1.5rem; }
.pagination-links { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.pagination-link { display: inline-flex; align-items: center; justify-content: center; min-width: 2.5rem; padding: 0.55rem 0.85rem; border: 1px solid var(--border); border-radius: 8px; color: var(--text); text-decoration: none; background: #fff; }
.pagination-link:hover, .pagination-link.active { border-color: var(--navy); color: var(--navy); text-decoration: none; }
.pagination-summary { color: var(--text-light); font-size: 0.9rem; }

/* Related decisions */
.related-section { margin: 2rem 0 0.5rem; }
.related-links { display: grid; gap: 0.75rem; margin-top: 1rem; }
.related-link { display: block; padding: 0.9rem 1rem; border: 1px solid var(--border); border-radius: 10px; text-decoration: none; color: var(--text); background: #fff; transition: border-color 0.15s, box-shadow 0.15s; }
.related-link:hover { border-color: var(--navy); box-shadow: 0 4px 12px rgba(0,0,0,0.06); text-decoration: none; }
.related-link strong { display: block; color: var(--navy); margin-bottom: 0.2rem; }
.related-link span { color: var(--text-light); font-size: 0.85rem; }

@media (max-width: 768px) {
  .header nav { gap: 1rem; }
  .nav-link:not(.nav-cta) { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
