@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #000000;
  --bg-card: #121212;
  --bg-glass: rgba(18, 18, 18, 0.75);
  --bg-aside: #0d0d0d;
  --accent: #1a3a6b;
  --accent-mid: #2255a4;
  --accent-bright: #3d7de8;
  --accent-glow: rgba(61, 125, 232, 0.35);
  --text: #e8e8e8;
  --text-muted: #888;
  --text-faint: #555;
  --border: rgba(255,255,255,0.07);
  --border-accent: rgba(61, 125, 232, 0.4);
  --radius: 18px;
  --radius-sm: 10px;
  --sidebar-w: 240px;
  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-head: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --transition: 0.22s ease;
  color-scheme: dark;
}

html {
  font-size: 17px;
  line-height: 1.65;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-bright);
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition);
}

a:hover {
  color: #fff;
  opacity: 1;
}

a:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── Layout ── */
.layout-wrap {
  display: flex;
  min-height: 100vh;
}

.main-col {
  flex: 1;
  min-width: 0;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  padding: 2rem 2.5rem;
  max-width: 1100px;
  width: 100%;
}

/* ── Sidebar ── */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 1.75rem 1.25rem;
  overflow-y: auto;
  z-index: 200;
  gap: 1.5rem;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.brand-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-shadow: 0 0 10px var(--accent-glow);
}

.brand-name:hover {
  color: var(--accent-bright);
}

.sidebar nav {
  flex: 1;
}

.sidebar nav > p {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar nav > p > a {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
  line-height: 1.35;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.sidebar nav > p > a:hover,
.sidebar nav > p > a.active {
  background: var(--accent);
  color: #fff;
}

.sidebar nav > p > a.active {
  background: var(--accent-mid);
  color: #fff;
  text-shadow: 0 0 8px var(--accent-glow);
}

.sidebar-desc {
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.sidebar-desc small {
  font-size: 0.75rem;
  color: var(--text-faint);
  line-height: 1.5;
  display: block;
}

/* ── Page Hero ── */
.page-hero {
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.eyebrow-tag {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-bright);
  background: rgba(61, 125, 232, 0.12);
  border: 1px solid var(--border-accent);
  padding: 0.2rem 0.65rem;
  border-radius: 6px;
  margin-bottom: 0.9rem;
}

.page-hero h1 {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.pub-date, .mod-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: inline-block;
  margin-right: 1rem;
}

/* ── Home Hero ── */
.home-hero {
  min-height: 45vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
  position: relative;
}

.home-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(34, 85, 164, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  max-width: 700px;
  position: relative;
  z-index: 1;
}

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -0.04em;
  margin-bottom: 1rem;
  text-shadow: 0 0 10px rgba(61, 125, 232, 0.4);
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 1.5rem;
  background: var(--accent-mid);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-family: var(--font-head);
  font-size: 0.95rem;
  transition: background var(--transition), box-shadow var(--transition);
  min-height: 44px;
}

.btn-primary:hover {
  background: var(--accent-bright);
  box-shadow: 0 0 16px var(--accent-glow);
  color: #fff;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 1.5rem;
  background: transparent;
  color: var(--accent-bright);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-family: var(--font-head);
  font-size: 0.95rem;
  transition: background var(--transition), color var(--transition);
  min-height: 44px;
}

.btn-ghost:hover {
  background: var(--accent);
  color: #fff;
}

/* ── Page Content (aside + body) ── */
.page-content {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.content-aside {
  width: 190px;
  flex-shrink: 0;
  position: sticky;
  top: 1.5rem;
}

.aside-inner {
  background: var(--bg-aside);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
}

.aside-inner h3 {
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.aside-inner hr {
  border: none;
  border-top: 1px solid var(--border);
  margin-bottom: 0.75rem;
}

.aside-link {
  display: block;
  padding: 0.4rem 0.5rem;
  font-size: 0.83rem;
  color: var(--text-muted);
  border-radius: 6px;
  transition: background var(--transition), color var(--transition);
  margin-bottom: 0.2rem;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.aside-link:hover {
  background: var(--accent);
  color: #fff;
}

.content-body {
  flex: 1;
  min-width: 0;
  max-width: 72ch;
}

/* ── Glassmorphism Card ── */
.card-glass {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.card-glass:hover {
  border-color: var(--border-accent);
  box-shadow: 0 0 20px var(--accent-glow);
}

/* ── Featured Grid (Home) ── */
.featured-section {
  margin-top: 3rem;
}

.featured-section h2,
.quick-nav-section h2,
.rank-list h2 {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}

.featured-section > hr,
.quick-nav-section > hr {
  border: none;
  border-top: 1px solid var(--border-accent);
  margin-bottom: 1.75rem;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.featured-card {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.5s ease forwards;
  animation-delay: calc(var(--stagger, 0) * 80ms);
}

.featured-card .card-glass {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.card-body h3 {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.card-body h3 a {
  color: #fff;
}

.card-body h3 a:hover {
  color: var(--accent-bright);
}

.card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
}

.card-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 1rem;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  font-size: 0.83rem;
  font-weight: 600;
  transition: background var(--transition);
  align-self: flex-start;
  min-height: 40px;
}

.card-btn:hover {
  background: var(--accent-bright);
  color: #fff;
}

/* ── Quick Links ── */
.quick-nav-section {
  margin-top: 2.5rem;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.quick-link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  min-height: 40px;
}

.quick-link:hover {
  background: var(--accent);
  border-color: var(--accent-mid);
  color: #fff;
}

/* ── Ranking ── */
.rank-layout {
  align-items: flex-start;
}

.rank-list {
  margin-top: 2rem;
}

.rank-list h2 {
  margin-bottom: 0.4rem;
}

.rank-list > hr {
  border: none;
  border-top: 1px solid var(--border-accent);
  margin-bottom: 1.5rem;
}

.rank-cards-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.rank-card {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.45s ease forwards;
  animation-delay: calc(var(--stagger, 0) * 70ms);
}

.rank-card .card-glass {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
}

.rank-num {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-mid);
  line-height: 1;
  min-width: 2.5rem;
  text-shadow: 0 0 10px var(--accent-glow);
}

/* ── Compare ── */
.compare-notice {
  padding: 1rem 1.25rem;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  border-left: 3px solid var(--accent-bright);
}

/* ── Review ── */
.review-hero {
  text-align: left;
}

.review-hero-img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
}

.review-meta {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.review-body .content-body,
.faq-body,
.about-body,
.privacy-body {
  max-width: 68ch;
}

/* ── About banner ── */
.about-banner {
  padding: 1.25rem 1.5rem;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 2rem;
  border-left: 3px solid var(--accent-bright);
}

/* ── Typography in content ── */
.content-body h2,
.content-body h3,
.content-body h4 {
  font-family: var(--font-head);
  font-weight: 700;
  color: #fff;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.content-body h2 { font-size: 1.45rem; }
.content-body h3 { font-size: 1.2rem; }
.content-body h4 { font-size: 1rem; }

.content-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1rem 0 1.25rem;
}

.content-body p {
  margin-bottom: 1.1rem;
  color: var(--text);
  line-height: 1.75;
}

.content-body ul,
.content-body ol {
  margin: 0.75rem 0 1.25rem 1.5rem;
  line-height: 1.75;
}

.content-body li {
  margin-bottom: 0.4rem;
  color: var(--text);
}

.content-body strong {
  color: #fff;
  font-weight: 700;
}

.content-body em {
  color: var(--accent-bright);
  font-style: normal;
}

.content-body blockquote {
  border-left: 3px solid var(--accent-bright);
  padding: 0.75rem 1.25rem;
  margin: 1.25rem 0;
  background: var(--bg-card);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-muted);
  font-style: italic;
}

.content-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.content-body th {
  background: var(--accent);
  color: #fff;
  padding: 0.65rem 1rem;
  text-align: left;
  font-family: var(--font-head);
  font-weight: 600;
}

.content-body td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.content-body tr:hover td {
  background: var(--bg-card);
}

.content-body a {
  color: var(--accent-bright);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.content-body a:hover {
  color: #fff;
}

/* ── Home content ── */
.home-content {
  margin-bottom: 0.5rem;
}

.home-content .content-body {
  max-width: 78ch;
}

/* ── Footer ── */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 2.5rem 2.5rem 2rem;
  margin-top: auto;
}

.footer-cta {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
  text-shadow: 0 0 10px var(--accent-glow);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-bottom: 1.25rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.88rem;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--accent-bright);
}

.footer-copy {
  display: block;
  font-size: 0.78rem;
  color: var(--text-faint);
  line-height: 1.6;
}

/* ── HR decorative ── */
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1rem 0;
}

h2 + hr,
h3 + hr {
  border-color: var(--border-accent);
  margin-top: 0.3rem;
  margin-bottom: 1.25rem;
}

/* ── Stagger animation ── */
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Mobile nav bar ── */
.mobile-nav-bar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  z-index: 300;
  align-items: center;
  padding: 0 1rem;
  gap: 0.75rem;
}

.mobile-brand {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  flex: 1;
}

.mobile-nav-toggle {
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 0.5rem;
  flex-shrink: 0;
}

.mobile-nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.mobile-nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mobile-nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.mobile-nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav-menu {
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  z-index: 299;
  padding: 1rem;
  max-height: calc(100vh - 56px);
  overflow-y: auto;
}

.mobile-nav-menu nav > p {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mobile-nav-menu nav > p > a {
  display: flex;
  align-items: center;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  min-height: 44px;
  transition: background var(--transition), color var(--transition);
}

.mobile-nav-menu nav > p > a:hover,
.mobile-nav-menu nav > p > a.active {
  background: var(--accent-mid);
  color: #fff;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  :root {
    --sidebar-w: 0px;
  }

  .sidebar {
    display: none;
  }

  .main-col {
    margin-left: 0;
    padding-top: 56px;
  }

  .mobile-nav-bar {
    display: flex;
  }

  main {
    padding: 1.5rem 1.25rem;
  }

  .page-content {
    flex-direction: column;
  }

  .content-aside {
    width: 100%;
    position: static;
  }

  .aside-inner {
    border-radius: var(--radius-sm);
  }

  .home-hero {
    min-height: 55vw;
    padding: 3rem 1rem;
  }

  .hero-title {
    font-size: clamp(1.9rem, 8vw, 3rem);
  }

  .featured-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    padding: 2rem 1.25rem 1.5rem;
  }

  .rank-card .card-glass {
    flex-direction: row;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 16px;
  }

  main {
    padding: 1.25rem 1rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .btn-primary,
  .btn-ghost {
    width: 100%;
    justify-content: center;
  }

  .page-hero h1 {
    font-size: 1.5rem;
  }

  .hero-title {
    font-size: 1.9rem;
  }

  .content-body {
    max-width: 100%;
  }

  .footer-links {
    flex-direction: column;
    gap: 0.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .featured-card,
  .rank-card {
    animation: none;
    opacity: 1;
    transform: none;
  }

  * {
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}
