:root {
  --brand: #4f46e5;
  --brand-dark: #3730a3;
  --cyan: #06b6d4;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #172033;
  --muted: #64748b;
  --border: #e5e9f2;
  --shadow: 0 18px 50px rgba(44, 54, 92, .10);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--text); background: var(--surface); font-family: "DM Sans", system-ui, sans-serif; }
body[data-theme="dark"] { --surface: #0f172a; --surface-soft: #111c31; --text: #eef2ff; --muted: #aab6cc; --border: #26344d; }
body[data-theme="dark"] .public-navbar, body[data-theme="dark"] .card, body[data-theme="dark"] .learning-preview { background: #111c31; color: var(--text); }
a { color: var(--brand); text-decoration: none; }
.skip-link { position: absolute; left: -10000px; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 9999; background: white; padding: .75rem; }
.public-navbar { height: 76px; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--border); backdrop-filter: blur(18px); z-index: 1030; }
.brand-mark { display: flex; align-items: center; gap: .65rem; color: var(--text); font-family: "Manrope", sans-serif; font-weight: 800; }
.brand-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: white; background: linear-gradient(135deg, var(--brand), #7c3aed); box-shadow: 0 8px 20px rgba(79,70,229,.25); }
.navbar .nav-link { margin: 0 .15rem; color: var(--text); font-weight: 600; border-radius: 9px; }
.navbar .nav-link:hover { color: var(--brand); background: rgba(79,70,229,.06); }
.hero-section { position: relative; overflow: hidden; background: linear-gradient(145deg, #eef2ff 0%, #f8fafc 58%, #ecfeff 100%); }
body[data-theme="dark"] .hero-section { background: linear-gradient(145deg, #171c42 0%, #101827 58%, #102937 100%); }
.hero-orb { position: absolute; border-radius: 999px; filter: blur(2px); opacity: .6; }
.hero-orb-one { width: 250px; height: 250px; right: -80px; top: -100px; background: rgba(139,92,246,.16); }
.hero-orb-two { width: 180px; height: 180px; left: 42%; bottom: -110px; background: rgba(6,182,212,.12); }
.eyebrow, .section-kicker { display: inline-block; margin-bottom: 1rem; color: var(--brand); font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.hero-title { max-width: 720px; margin: 0; font-family: "Manrope", sans-serif; font-size: clamp(3rem, 6vw, 5.6rem); line-height: .99; letter-spacing: -.055em; }
.hero-title span { color: var(--brand); }
.hero-lead { max-width: 680px; margin: 1.5rem 0 2rem; color: var(--muted); font-size: 1.16rem; line-height: 1.75; }
.hero-search { max-width: 680px; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; height: 68px; padding: 7px; background: white; border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); }
.search-icon { text-align: center; color: var(--brand); font-size: 1.5rem; }
.hero-search input { width: 100%; height: 100%; border: 0; outline: 0; background: transparent; color: var(--text); }
.hero-search button { height: 52px; padding: 0 1.35rem; border: 0; border-radius: 13px; color: white; background: var(--brand); font-weight: 700; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 1.2rem; margin-top: 1.25rem; color: var(--muted); font-size: .86rem; }
.learning-preview { max-width: 430px; margin-inline: auto; border: 1px solid rgba(255,255,255,.8); border-radius: 24px; background: rgba(255,255,255,.92); box-shadow: 0 30px 70px rgba(52,64,116,.16); overflow: hidden; transform: rotate(1deg); }
.preview-top { height: 36px; display: flex; align-items: center; gap: 6px; padding: 0 16px; background: #eef2ff; }
.preview-top span { width: 7px; height: 7px; border-radius: 50%; background: #c7d2fe; }
.preview-toolbar { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px 12px; }
.preview-avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--brand); font-size: .7rem; }
.preview-progress { margin: 0 20px 16px; display: flex; justify-content: space-between; align-items: center; padding: 16px; border-radius: 16px; background: linear-gradient(135deg, #4f46e5, #7c3aed); color: white; }
.preview-progress > div:first-child { display: flex; align-items: center; gap: 10px; }
.preview-progress small, .preview-progress strong { display: block; }
.preview-icon { font-size: 1.6rem; }
.progress-ring { width: 54px; height: 54px; display: grid !important; place-items: center; border: 5px solid rgba(255,255,255,.28); border-top-color: white; border-radius: 50%; font-size: .72rem; }
.preview-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; padding: 0 20px 20px; }
.preview-grid div { display: flex; flex-direction: column; min-height: 118px; padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: white; }
.preview-grid span { font-size: 1.35rem; }
.preview-grid strong { margin-top: auto; font-size: .82rem; }
.preview-grid small { margin-top: 3px; color: var(--muted); line-height: 1.3; }
.quick-categories { background: var(--surface); border-bottom: 1px solid var(--border); }
.category-strip { display: grid; grid-template-columns: repeat(5,1fr); }
.category-strip a { min-height: 88px; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--text); border-right: 1px solid var(--border); }
.category-strip a:last-child { border: 0; }
.category-strip a:hover { color: var(--brand); background: var(--surface-soft); }
.category-strip span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: #eef2ff; color: var(--brand); }
.content-section { padding: 88px 0; }
.articles-section { background: var(--surface-soft); }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 28px; }
.section-heading h2 { margin: 0; font-family: "Manrope", sans-serif; font-size: clamp(2rem,4vw,3rem); letter-spacing: -.04em; }
.section-heading a { color: var(--brand); font-weight: 700; }
.section-kicker { margin-bottom: .35rem; }
.resource-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; }
.modern-resource-card { min-height: 300px; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); overflow: hidden; transition: transform .25s, box-shadow .25s; }
.modern-resource-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.resource-format { height: 92px; display: flex; align-items: end; padding: 16px; background: linear-gradient(135deg,#eef2ff,#dbeafe); }
.resource-format span { padding: 6px 9px; border-radius: 8px; background: white; color: var(--brand); font-size: .72rem; font-weight: 800; }
.format-pdf { background: linear-gradient(135deg,#fff1f2,#fee2e2); }
.format-pdf span { color: #dc2626; }
.format-doc, .format-docx { background: linear-gradient(135deg,#eff6ff,#dbeafe); }
.resource-card-body { flex: 1; padding: 18px; }
.resource-type { color: var(--brand); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.resource-card-body h3 { margin: 8px 0; font-size: 1.05rem; }
.resource-card-body h3 a { color: var(--text); }
.resource-card-body p { color: var(--muted); font-size: .88rem; line-height: 1.55; }
.resource-link { margin: 0 18px 16px; display: flex; justify-content: space-between; color: var(--text); border-top: 1px solid var(--border); padding-top: 12px; font-weight: 700; }
.resource-link span { color: var(--brand); }
.article-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.modern-article-card { position: relative; padding: 28px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); overflow: hidden; }
.article-accent { position: absolute; inset: 0 auto 0 0; width: 5px; background: linear-gradient(var(--brand),var(--cyan)); }
.article-label { color: var(--brand); font-size: .75rem; font-weight: 800; text-transform: uppercase; }
.modern-article-card h3 { margin: 12px 0; }
.modern-article-card h3 a { color: var(--text); }
.modern-article-card p { min-height: 70px; color: var(--muted); }
.text-link { font-weight: 700; }
.empty-state { grid-column: 1/-1; padding: 30px; border: 1px dashed var(--border); border-radius: 16px; text-align: center; }
.admin-sidebar { top: 5.5rem; border: 1px solid var(--border); box-shadow: var(--shadow); }
.admin-sidebar .btn { border-radius: 10px; }
.admin-mode { background: var(--surface-soft); }
.admin-mode main { min-height: calc(100vh - 76px); }
.admin-mode .card { border: 1px solid var(--border) !important; border-radius: 16px; }
.admin-mode .table { --bs-table-bg: transparent; --bs-table-color: var(--text); }
.admin-mode .table thead th { padding: .85rem 1rem; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; border-bottom: 1px solid var(--border); }
.admin-mode .table td { padding: 1rem; border-bottom-color: var(--border); }
.admin-mode .form-control, .admin-mode .form-select { border-radius: 10px; border-color: var(--border); background: var(--surface); color: var(--text); }
.audit-row { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 12px; min-height: 58px; border-top: 1px solid var(--border); }
.audit-row:first-of-type { border-top: 0; }
.audit-row strong, .audit-row small { display: block; }
.audit-row small, .audit-row time { color: var(--muted); font-size: .78rem; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.10); }
.security-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; color: #166534; background: #dcfce7; font-weight: 800; }
.security-summary { background: linear-gradient(145deg,var(--surface),#f0fdf4); }
.security-checks { margin: 18px 0; padding: 0; list-style: none; }
.security-checks li { position: relative; padding: 8px 0 8px 28px; border-bottom: 1px solid var(--border); color: var(--muted); }
.security-checks li:last-child { border-bottom: 0; }
.security-checks li::before { content: "✓"; position: absolute; left: 0; top: 8px; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; color: #166534; background: #dcfce7; font-size: .65rem; font-weight: 800; }
body[data-theme="dark"] .hero-search, body[data-theme="dark"] .preview-grid div { background: #18243a; }
body[data-theme="dark"] .preview-top { background: #101827; }
footer { background: var(--surface); }
@media (max-width: 992px) { .resource-grid { grid-template-columns: repeat(2,1fr); } .article-grid { grid-template-columns: repeat(2,1fr); } .learning-preview { max-width: 500px; } }
@media (max-width: 576px) {
  .public-navbar { height: auto; }
  .hero-title { font-size: 3.1rem; }
  .hero-lead { font-size: 1rem; }
  .hero-search { grid-template-columns: 38px 1fr; height: auto; }
  .hero-search button { grid-column: 1/-1; width: 100%; }
  .hero-trust { display: grid; }
  .learning-preview { transform: none; }
  .preview-grid { grid-template-columns: 1fr; }
  .preview-grid div { min-height: 82px; }
  .category-strip { grid-template-columns: repeat(2,1fr); }
  .category-strip a { border-bottom: 1px solid var(--border); }
  .resource-grid, .article-grid { grid-template-columns: 1fr; }
  .section-heading { align-items: start; flex-direction: column; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
