/* ============================================================
   UI UPGRADE 2026 — A Normal Guy
   Modernization layer on top of style.css
   Loaded AFTER style.css to override.
   ============================================================ */

/* ===== 1. Modern Typography (Inter font) ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
}

/* ===== 2. Refined Color Palette ===== */
:root {
  --primary: #ea580c;
  --primary-dark: #c2410c;
  --primary-soft: #fff7ed;
  --primary-glow: rgba(234, 88, 12, 0.15);
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --green: #10b981;
  --green-soft: #ecfdf5;
  --red: #ef4444;
  --red-soft: #fef2f2;
  --text: #0a0a14;
  --text-soft: #1e293b;
  --text-muted: #64748b;
  --text-faint: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --card-bg: #ffffff;
  --bg: #fafbfc;
  --bg-soft: #f5f7fa;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 4px 12px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.08), 0 4px 8px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 24px 60px rgba(15, 23, 42, 0.12), 0 8px 16px rgba(15, 23, 42, 0.06);
  --shadow-hover: 0 16px 40px rgba(234, 88, 12, 0.12), 0 4px 12px rgba(15, 23, 42, 0.08);
  --transition: cubic-bezier(0.4, 0, 0.2, 1);
}

body { background: var(--bg); }

/* ===== 3. Header Refinement ===== */
header {
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
}
header > nav, header nav.container { height: 64px; }
.logo { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.02em; }
.nav-links a {
  font-size: .88rem; font-weight: 500;
  padding: 8px 14px; border-radius: 10px;
  transition: all .2s var(--transition);
}
.nav-links a:hover {
  color: var(--primary);
  background: var(--primary-soft);
  transform: translateY(-1px);
}

/* ===== 4. Hero Refinement ===== */
.hero {
  padding: 88px 0 80px;
  background: linear-gradient(135deg, #0a0a14 0%, #0f172a 50%, #1e1b4b 100%);
}
.hero::before {
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(234, 88, 12, 0.22) 0%, transparent 60%);
}
.hero h1 {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  letter-spacing: -0.03em;
  font-weight: 900;
  margin-bottom: 20px;
}
.hero h1 em {
  background: linear-gradient(135deg, #fb923c, #fbbf24);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-kicker {
  background: linear-gradient(135deg, rgba(234,88,12,.18), rgba(251,191,36,.08));
  border: 1px solid rgba(234,88,12,.3);
  font-weight: 700;
  letter-spacing: 0.1em;
  font-size: .76rem;
  padding: 7px 16px;
  box-shadow: 0 4px 16px rgba(234,88,12,.15);
}
.hero-pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  transition: all .3s var(--transition);
}
.hero-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(234, 88, 12, 0.4);
  transform: translateY(-2px);
}
.hero-float-card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 18px 20px;
  transition: all .35s var(--transition);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}
.hero-float-card:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(234, 88, 12, 0.45);
  transform: translateX(6px) translateY(-2px);
  box-shadow: 0 12px 40px rgba(234, 88, 12, 0.15), 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* ===== 5. Article Cards (Homepage) ===== */
.article-card,
.acard,
.compact-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all .3s var(--transition);
  box-shadow: var(--shadow-xs);
}
.article-card:hover,
.acard:hover,
.compact-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(234, 88, 12, 0.3);
}

/* ===== 6. Article Reading Experience ===== */
.article-layout {
  gap: 48px;
  padding: 32px 0 80px;
}
.article-main {
  max-width: 760px;
  margin: 0 auto;
}
.article-main section h2 {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  border-bottom: 3px solid var(--primary);
  padding-bottom: 12px;
  margin-bottom: 20px;
}
.article-main section h3 {
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 24px 0 12px;
}
.article-main section p {
  color: #334155;
  font-size: .98rem;
  line-height: 1.8;
  margin-bottom: 16px;
  letter-spacing: 0;
}
.article-main section p strong { color: var(--text); font-weight: 700; }
.article-main section ul,
.article-main section ol {
  margin: 8px 0 18px;
  padding-left: 28px;
}
.article-main section ul li,
.article-main section ol li {
  font-size: .95rem;
  line-height: 1.75;
  margin-bottom: 10px;
  padding-left: 6px;
  color: #334155;
}
.article-main section ul li::marker { color: var(--primary); font-size: 1.1em; }
.article-main section ol li::marker { color: var(--primary); font-weight: 800; }

/* Lead paragraph emphasis */
.article-main section:first-of-type > p:first-of-type {
  font-size: 1.08rem;
  color: var(--text);
  line-height: 1.7;
  font-weight: 500;
  letter-spacing: -0.005em;
}

/* ===== 7. Callout Blocks Refinement ===== */
.expert-note {
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
  border-left: 4px solid var(--green);
  border-radius: 0 12px 12px 0;
  padding: 18px 22px;
  margin: 28px 0;
  font-size: .95rem;
  line-height: 1.75;
  color: #064e3b;
  box-shadow: var(--shadow-xs);
}
.expert-note strong { color: #047857; font-weight: 700; }

.verdict-box {
  background: linear-gradient(135deg, #fff7ed 0%, #fffbeb 100%);
  border: 1px solid #fed7aa;
  border-left: 4px solid var(--primary);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 24px 0 32px;
  font-size: .96rem;
  line-height: 1.75;
  color: #7c2d12;
  box-shadow: var(--shadow-xs);
}
.verdict-box strong { color: #9a3412; font-weight: 700; }

.verdict-final {
  background: linear-gradient(135deg, #0a0a14 0%, #1e293b 50%, #312e81 100%);
  color: #f1f5f9;
  border-radius: 16px;
  padding: 26px 30px;
  margin: 28px 0 12px;
  font-size: .98rem;
  line-height: 1.85;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.verdict-final::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.1) 0%, transparent 60%);
  pointer-events: none;
}
.verdict-final strong { color: var(--accent); font-weight: 700; }
.article-main section .verdict-final p,
.article-main section .verdict-final { color: #f1f5f9; }

/* ===== 8. Improved TOC ===== */
.article-main > nav.toc,
.toc {
  background: linear-gradient(135deg, #fff7ed, #fffbeb);
  border: 1px solid #fed7aa;
  border-left: 4px solid var(--primary);
  border-radius: 14px;
  padding: 22px 26px;
  margin: 28px 0 36px;
  box-shadow: var(--shadow-xs);
}
.toc h3 {
  font-weight: 800;
  color: #7c2d12;
  font-size: 1rem;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.toc h3::before { content: '📑'; font-size: 1.1em; }
.toc ul {
  column-count: 2;
  column-gap: 32px;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
.toc ul li {
  break-inside: avoid;
  margin-bottom: 8px !important;
  padding: 0 !important;
  font-size: .9rem;
}
.toc ul li a {
  color: #c2410c;
  font-size: .9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color .15s var(--transition);
  display: inline-block;
  padding: 2px 0;
}
.toc ul li a:hover { color: var(--primary-dark); text-decoration: underline; }
@media (max-width: 600px) {
  .toc ul { column-count: 1; }
}

/* ===== 9. Comparison Table Polish ===== */
.pct-wrap {
  margin: 32px 0;
  border-radius: 14px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}
.pct-wrap > div { overflow-x: auto; }
.pct {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
  background: #fff;
}
.pct thead tr th {
  padding: 16px 18px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: linear-gradient(180deg, #fafbfc, #f5f7fa);
  border-bottom: 2px solid var(--border);
  text-align: center;
  position: sticky; top: 0;
}
.pct thead tr th:first-child {
  text-align: left;
  width: 180px;
  background: linear-gradient(135deg, #fafbfc, #f5f7fa);
}
.pct tbody tr { transition: background .15s var(--transition); }
.pct tbody tr:hover { background: #fffbf5; }
.pct tbody tr:nth-child(even) td { background: rgba(248, 250, 252, 0.5); }
.pct td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
  text-align: center;
  color: var(--text-soft);
  line-height: 1.55;
}
.pct td:first-child {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-faint);
  text-align: left;
  background: rgba(248, 250, 252, 0.7) !important;
  border-right: 1px solid var(--border-light);
}
.pct-win {
  background: linear-gradient(135deg, #fff7ed, #ffedd5) !important;
  font-weight: 600;
  color: #9a3412;
  position: relative;
}
.pct-win::after {
  content: '✓';
  position: absolute;
  top: 6px; right: 8px;
  width: 16px; height: 16px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  font-size: .65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  line-height: 1;
}

/* ===== 10. FAQ Refinement ===== */
.faq-item {
  border-bottom: 1px solid var(--border-light);
  padding: 6px 0;
  transition: background .15s var(--transition);
}
.faq-item:hover { background: rgba(255, 247, 237, 0.4); }
.faq-item:first-of-type { border-top: 1px solid var(--border-light); }
.article-main section h3.faq-question,
.faq-question {
  background: none;
  padding: 14px 8px 6px;
  margin: 0 !important;
  font-size: .96rem;
  font-weight: 700;
  color: var(--text);
  cursor: default;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  line-height: 1.5;
}
.faq-question::before {
  content: 'Q';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  background: linear-gradient(135deg, var(--primary), var(--accent-dark));
  color: #fff;
  font-size: .72rem;
  font-weight: 900;
  border-radius: 50%;
  margin-top: 1px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.25);
}
.faq-answer {
  padding: 0 8px 14px 48px;
  margin: 0;
}
.article-main section .faq-answer p,
.faq-answer p {
  color: #475569 !important;
  margin: 0 !important;
  font-size: .92rem;
  line-height: 1.75;
}

/* ===== 11. Sidebar Refinement ===== */
.article-sidebar { gap: 18px; }
.sidebar-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: all .25s var(--transition);
}
.sidebar-card:hover { box-shadow: var(--shadow); }
.sidebar-head {
  background: linear-gradient(135deg, #fafbfc, #f5f7fa);
  border-bottom: 1px solid var(--border);
  padding: 13px 18px;
  font-size: .82rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
}
.sidebar-body { padding: 16px 18px; }
.toc-list a {
  font-size: .85rem;
  color: var(--text-soft);
  padding: 8px 12px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all .15s var(--transition);
}
.toc-list a:hover {
  background: var(--primary-soft);
  color: var(--primary);
}
.toc-list a.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
}
.toc-list .toc-num {
  background: var(--primary);
  color: #fff;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  font-weight: 800;
  flex-shrink: 0;
}

/* ===== 12. Reading Progress Bar (top of article pages) ===== */
.reading-progress {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(234, 88, 12, 0.08);
  z-index: 99;
  pointer-events: none;
}
.reading-progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width .1s linear;
  box-shadow: 0 0 8px rgba(234, 88, 12, 0.4);
}

/* ===== 13. Hero Split Image (Article) ===== */
.article-hero-thumb {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-bottom: 28px;
}
.article-hero-thumb .vs-badge {
  background: #fff;
  color: var(--primary);
  border: 3px solid var(--primary);
  width: 44px; height: 44px;
  font-size: .85rem;
  box-shadow: 0 6px 20px rgba(234, 88, 12, 0.4);
}

/* ===== 14. Mobile Improvements ===== */
@media (max-width: 768px) {
  .hero { padding: 56px 0 48px; }
  .hero h1 { font-size: 1.9rem; }
  .article-main { max-width: 100%; padding: 0 4px; }
  .article-main section h2 { font-size: 1.3rem; }
  .article-main section p { font-size: .95rem; }
  .toc { padding: 18px 20px; }
  .toc ul { column-count: 1; }
  .pct { font-size: .85rem; }
  .pct td { padding: 10px 12px; }
  .pct thead tr th { padding: 10px 12px; }
  .verdict-final { padding: 20px 22px; font-size: .94rem; }
  .article-layout { gap: 28px; padding: 20px 0 56px; }
}

@media (max-width: 480px) {
  .nav-links { display: none; }
  .hamburger { display: block; }
  .article-main section h2 { font-size: 1.2rem; }
  .article-main section p { font-size: .92rem; line-height: 1.7; }
  .pct { font-size: .8rem; }
  .pct thead tr th { padding: 8px 10px; }
  .pct td { padding: 8px 10px; }
}

/* ===== 15. Smooth Scroll & Animations ===== */
html { scroll-behavior: smooth; scroll-padding-top: 80px; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.article-main section { animation: fadeInUp .5s var(--transition) both; }
.article-main section:nth-child(1) { animation-delay: 0s; }
.article-main section:nth-child(2) { animation-delay: .05s; }
.article-main section:nth-child(3) { animation-delay: .1s; }

/* Selection color */
::selection { background: var(--primary-glow); color: var(--text); }

/* Scrollbar polish */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ===== 16. Image Loading Placeholder ===== */
img { background: var(--bg-soft); }

/* ===== 17. Link Hover Subtle Underline ===== */
.article-main p a,
.article-main li a {
  color: var(--primary);
  border-bottom: 1px solid rgba(234, 88, 12, 0.3);
  transition: border-color .15s var(--transition);
}
.article-main p a:hover,
.article-main li a:hover {
  border-bottom-color: var(--primary);
}

/* ===== 18. Print Friendly ===== */
@media print {
  header, .article-sidebar, .reading-progress, .filter-bar { display: none; }
  .article-layout { grid-template-columns: 1fr; }
  .article-main { max-width: 100%; }
}

/* ===== 19. Pagination Refinement (homepage) ===== */
#pagination { padding: 40px 0 24px; }
.pag-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pag-btn {
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text-soft);
  font-size: .92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s var(--transition);
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', system-ui, sans-serif;
  letter-spacing: -0.005em;
}
.pag-btn:hover:not([disabled]) {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.12);
}
.pag-btn.pag-active {
  background: linear-gradient(135deg, var(--primary), var(--accent-dark));
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(234, 88, 12, 0.3);
}
.pag-btn.pag-active:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(234, 88, 12, 0.4);
}
.pag-btn[disabled] {
  opacity: .35;
  cursor: not-allowed;
  transform: none;
}
.pag-btn.pag-prev, .pag-btn.pag-next {
  font-size: 1.2rem;
  font-weight: 700;
  min-width: 42px;
  padding: 0;
}
.pag-ellipsis {
  color: var(--text-faint);
  padding: 0 4px;
  font-weight: 700;
  user-select: none;
}
.pag-info {
  font-size: .85rem;
  color: var(--text-muted);
  margin-left: 16px;
  padding-left: 16px;
  border-left: 1px solid var(--border);
  font-weight: 500;
}
@media (max-width: 600px) {
  #pagination { padding: 28px 0 16px; }
  .pag-btn { min-width: 36px; height: 36px; font-size: .85rem; padding: 0 10px; }
  .pag-info { display: none; }
}

/* Hide empty category-sections (now unused) */
#category-sections { display: none !important; }

/* ===== DROPDOWN MENU ===== */
.nav-links .has-dropdown {
  position: relative;
}
.nav-links .has-dropdown > a {
  cursor: pointer;
}
.nav-links .dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  padding: 8px 0;
  margin: 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .2s, transform .2s, visibility .2s;
  z-index: 1000;
}
.nav-links .has-dropdown:hover .dropdown,
.nav-links .has-dropdown:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-links .dropdown li {
  list-style: none;
}
.nav-links .dropdown a {
  display: block;
  padding: 10px 18px;
  color: #334155;
  text-decoration: none;
  font-size: .95rem;
  transition: background .15s;
}
.nav-links .dropdown a:hover {
  background: #fff7ed;
  color: #ea580c;
}
@media (max-width: 768px) {
  .nav-links .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: #f8fafc;
    border-radius: 0;
    padding: 4px 0 4px 20px;
  }
}
