:root {
  --bg: #0b1220;
  --bg-elevated: #121a2b;
  --bg-soft: #182338;
  --surface: #1c2740;
  --line: rgba(148, 163, 184, 0.18);
  --text: #e8eef9;
  --muted: #9fb0c9;
  --blue: #4ea1ff;
  --blue-deep: #2b7de9;
  --blue-soft: rgba(78, 161, 255, 0.14);
  --gold: #d7b36a;
  --success: #3ecf8e;
  --danger: #ff6b7a;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --container: 1160px;
  --header-h: 72px;
  --font-display: "Be Vietnam Pro", "Segoe UI", sans-serif;
  --font-body: "Be Vietnam Pro", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(78, 161, 255, 0.18), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(215, 179, 106, 0.08), transparent 45%),
    linear-gradient(180deg, #0a101c 0%, var(--bg) 40%, #0a1222 100%);
  min-height: 100vh;
  line-height: 1.7;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--blue);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: #8bc2ff;
}

ul,
ol {
  padding-left: 1.2rem;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.25;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(11, 18, 32, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
  color: var(--text);
}

.brand img {
  height: 40px;
  width: auto;
  max-height: 40px;
  object-fit: contain;
}

.brand-text {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-desktop a {
  color: var(--muted);
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: var(--text);
  background: var(--blue-soft);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0.65rem 1.1rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  color: #fff;
}

.btn-primary:hover {
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-weight: 600;
}

.menu-toggle svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.mobile-panel {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: rgba(12, 18, 32, 0.98);
  border-bottom: 1px solid var(--line);
  padding: 1rem;
  z-index: 999;
}

.mobile-panel.open {
  display: block;
  animation: slideDown 0.22s ease;
}

.mobile-panel a {
  display: block;
  padding: 0.85rem 0.75rem;
  color: var(--text);
  border-bottom: 1px solid var(--line);
}

.mobile-panel .mobile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-top: 1rem;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-main {
  padding-top: var(--header-h);
}

.hero {
  position: relative;
  min-height: clamp(420px, 78vh, 680px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(8, 14, 26, 0.92) 0%, rgba(8, 14, 26, 0.72) 42%, rgba(8, 14, 26, 0.35) 100%),
    linear-gradient(180deg, rgba(8, 14, 26, 0.2) 0%, rgba(8, 14, 26, 0.88) 100%);
}

.hero-content {
  width: min(100% - 2rem, var(--container));
  margin: 0 auto 4.5rem;
  max-width: 680px;
  animation: fadeUp 0.7s ease both;
}

.hero-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  color: #fff;
}

.hero-brand img {
  height: 48px;
  width: auto;
}

.hero h1 {
  font-size: clamp(1.55rem, 3.4vw, 2.35rem);
  margin-bottom: 0.85rem;
  color: #fff;
}

.hero p {
  font-size: 1.05rem;
  color: #c9d5ea;
  max-width: 54ch;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.4rem;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section {
  padding: 4.25rem 0;
}

.section-alt {
  background: linear-gradient(180deg, rgba(24, 35, 56, 0.45), transparent);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.section-head h2 {
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
}

.section-head p {
  margin: 0;
  max-width: 48ch;
}

.eyebrow {
  display: inline-block;
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.55rem;
}

.intro-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: center;
}

.intro-copy h2 {
  font-size: clamp(1.45rem, 2.5vw, 2rem);
}

.feature-list {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.25rem;
}

.feature-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 0.85rem;
  padding: 0.9rem;
  background: rgba(28, 39, 64, 0.55);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.feature-item img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.feature-item strong {
  display: block;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.feature-item span {
  color: var(--muted);
  font-size: 0.92rem;
}

.intro-visual {
  position: relative;
}

.intro-visual img {
  width: 100%;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.category-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  min-height: 210px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(78, 161, 255, 0.45);
}

.category-card img {
  width: 100%;
  height: 150px;
  object-fit: contain;
  background: radial-gradient(circle at center, #24324d 0%, #121a2b 70%);
  padding: 0.75rem;
}

.category-card .cat-body {
  padding: 0.9rem 1rem 1.1rem;
}

.category-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.category-card p {
  margin: 0;
  font-size: 0.9rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}

.article-card {
  background: rgba(28, 39, 64, 0.55);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: rgba(78, 161, 255, 0.4);
}

.article-card .thumb {
  aspect-ratio: 16 / 10;
  background: #101826;
  overflow: hidden;
}

.article-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.article-card:hover .thumb img {
  transform: scale(1.04);
}

.article-card .body {
  padding: 1.05rem 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  color: #7f92b0;
  font-size: 0.82rem;
  margin-bottom: 0.55rem;
}

.article-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.article-card h3 a {
  color: var(--text);
}

.article-card h3 a:hover {
  color: var(--blue);
}

.article-card .excerpt {
  font-size: 0.92rem;
  flex: 1;
}

.read-more {
  margin-top: 0.85rem;
  font-weight: 600;
  font-size: 0.92rem;
}

.brand-strip {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.75rem;
  align-items: center;
}

.brand-strip img {
  width: 100%;
  height: 48px;
  object-fit: contain;
  opacity: 0.85;
  filter: grayscale(0.15);
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.brand-strip img:hover {
  opacity: 1;
  filter: none;
}

.faq-list {
  display: grid;
  gap: 0.85rem;
  max-width: 860px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(28, 39, 64, 0.45);
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  padding: 1rem 1.1rem;
  font-weight: 600;
  list-style: none;
  color: var(--text);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  float: right;
  color: var(--blue);
  font-size: 1.2rem;
  line-height: 1;
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item .faq-a {
  padding: 0 1.1rem 1.05rem;
  color: var(--muted);
}

.page-hero {
  padding: 2.75rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(30, 48, 82, 0.35), transparent);
}

.page-hero h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  color: #7f92b0;
  font-size: 0.88rem;
  margin-bottom: 0.9rem;
}

.breadcrumb a {
  color: #9fb0c9;
}

.breadcrumb span {
  opacity: 0.6;
}

.content-wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  align-items: start;
}

.prose {
  background: rgba(18, 26, 43, 0.65);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem 1.7rem;
}

.prose h2 {
  margin-top: 1.6rem;
  font-size: 1.35rem;
}

.prose h3 {
  margin-top: 1.25rem;
  font-size: 1.12rem;
}

.prose img.cover {
  width: 100%;
  border-radius: 12px;
  margin: 0.5rem 0 1.2rem;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sidebar {
  display: grid;
  gap: 1rem;
  position: sticky;
  top: calc(var(--header-h) + 1rem);
}

.side-box {
  background: rgba(28, 39, 64, 0.55);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
}

.side-box h3 {
  font-size: 1rem;
  margin-bottom: 0.85rem;
}

.side-links {
  display: grid;
  gap: 0.65rem;
}

.side-links a {
  color: var(--muted);
  font-size: 0.92rem;
}

.side-links a:hover {
  color: var(--blue);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.25rem;
}

.cta-band {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(43, 125, 233, 0.22), rgba(28, 39, 64, 0.8)),
    var(--bg-elevated);
  border: 1px solid rgba(78, 161, 255, 0.28);
}

.cta-band img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
}

.error-page {
  min-height: calc(100vh - var(--header-h));
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 1rem;
}

.error-page .code {
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 800;
  color: var(--blue);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.site-footer {
  margin-top: 2rem;
  border-top: 1px solid var(--line);
  background: #080e18;
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.footer-brand img {
  height: 36px;
  width: auto;
  margin-bottom: 0.85rem;
}

.footer-brand p {
  font-size: 0.92rem;
}

.footer-col h4 {
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
}

.footer-col a {
  display: block;
  color: var(--muted);
  margin-bottom: 0.55rem;
  font-size: 0.92rem;
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  color: #7f92b0;
  font-size: 0.85rem;
}

.tag {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--blue-soft);
  color: #9ec8ff;
  font-size: 0.75rem;
  font-weight: 600;
}

.list-page .filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.list-page .filters a {
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

.list-page .filters a.active,
.list-page .filters a:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-soft);
}

.guide-list {
  display: grid;
  gap: 1rem;
}

.guide-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(28, 39, 64, 0.45);
}

.guide-item img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 10px;
  background: #101826;
}

.guide-item h3 {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.guide-item h3 a {
  color: var(--text);
}

.guide-item h3 a:hover {
  color: var(--blue);
}

@media (max-width: 1024px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-grid,
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .intro-grid,
  .content-wrap,
  .cta-band,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .brand-strip {
    grid-template-columns: repeat(4, 1fr);
  }

  .sidebar {
    position: static;
  }
}

@media (max-width: 860px) {
  .nav-desktop,
  .header-actions .desktop-only {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .hero {
    min-height: 520px;
  }

  .hero-content {
    margin-bottom: 3rem;
  }

  .section-head {
    flex-direction: column;
    align-items: start;
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 64px;
  }

  .brand img {
    height: 34px;
    max-height: 34px;
  }

  .category-grid,
  .card-grid,
  .related-grid,
  .brand-strip {
    grid-template-columns: 1fr 1fr;
  }

  .guide-item {
    grid-template-columns: 1fr;
  }

  .hero-cta,
  .mobile-panel .mobile-actions {
    grid-template-columns: 1fr;
    display: grid;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
