:root {
  --bg: #040507;
  --surface: #0a0c11;
  --surface-2: #12151d;
  --text: #f4f5f7;
  --muted: #a7aebe;
  --line: #1c2230;
  --accent: #f2b21f;
  --accent-2: #d99700;
  --ok: #61d49f;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(242, 178, 31, 0.16), transparent 55%),
    radial-gradient(800px 500px at -20% 20%, rgba(66, 88, 143, 0.22), transparent 50%),
    var(--bg);
  color: var(--text);
  font-family: "Questrial", sans-serif;
  line-height: 1.6;
}

.container {
  width: min(1120px, 100% - 2rem);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(8px);
  background: rgba(4, 5, 7, 0.86);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.top-nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.brand img {
  display: block;
  width: 226px;
  height: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-left: auto;
}

.nav-item {
  position: relative;
}

.has-menu::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 18px;
}

.nav-parent,
.nav-links > a {
  color: var(--text);
  text-decoration: none;
  font: 500 0.88rem/1 "Questrial", sans-serif;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  white-space: nowrap;
}

.nav-links > a {
  display: inline-flex;
  align-items: center;
}

.nav-links > a.active,
.nav-links > a:hover,
.nav-parent:hover,
.has-menu:hover > .nav-parent {
  color: var(--accent);
}

.dropdown {
  position: absolute;
  top: calc(100% + 18px);
  right: 0;
  min-width: 290px;
  border-radius: 14px;
  background: rgba(8, 11, 18, 0.98);
  border: 1px solid var(--line);
  display: none;
  padding: 0.65rem 0;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.38);
}

.dropdown a {
  display: block;
  color: var(--text);
  text-decoration: none;
  font: 500 0.88rem/1.4 "Questrial", sans-serif;
  padding: 0.6rem 0.9rem;
}

.dropdown a:hover {
  color: var(--accent);
}

.has-menu:hover > .dropdown,
.has-menu:focus-within > .dropdown {
  display: block;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  background: var(--text);
}

.page-main {
  padding: 2.2rem 0 2.8rem;
}

.article-page article {
  width: min(860px, 100%);
  margin: 0 auto;
}

.article-page h1 {
  margin: 0 0 1rem;
  font: 600 clamp(1.8rem, 3.6vw, 3.35rem)/1.15 "Questrial", sans-serif;
  letter-spacing: -0.02em;
}

.article-byline {
  margin: 0 0 1rem;
  color: var(--muted);
  font: 500 0.92rem/1.35 "Questrial", sans-serif;
}

.article-byline a {
  color: #d8dde9;
  text-decoration: underline;
  text-decoration-color: rgba(242, 178, 31, 0.55);
  text-underline-offset: 0.14em;
}

.article-byline a:hover {
  color: #ffd77b;
  text-decoration-color: rgba(255, 215, 123, 0.95);
}

.article-hero {
  margin: 0 0 1.25rem;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(242, 178, 31, 0.35);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.32);
  background: linear-gradient(180deg, #0d1016 0%, #090b10 100%);
}

.article-hero img {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  object-position: center;
}

.article-content {
  font-size: 1.02rem;
}

.article-content > :first-child {
  margin-top: 0;
}

.article-content p,
.article-content ul,
.article-content ol {
  margin: 0 0 1rem;
}

.article-content ul,
.article-content ol {
  padding-left: 1.3rem;
}

.article-content li + li {
  margin-top: 0.35rem;
}

.article-content h2 {
  margin: 1.7rem 0 0.75rem;
  font: 600 clamp(1.45rem, 2.4vw, 2rem)/1.2 "Questrial", sans-serif;
}

.article-content h3 {
  margin: 1.3rem 0 0.55rem;
  font: 600 1.32rem/1.25 "Questrial", sans-serif;
}

.article-content a,
.related-card {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(242, 178, 31, 0.75);
  text-underline-offset: 0.14em;
}

.article-content a:hover,
.related-card:hover {
  color: #ffd77b;
  text-decoration-color: rgba(255, 215, 123, 0.95);
}

.related-articles {
  margin-top: 2.2rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}

.related-articles h2 {
  margin: 0 0 0.9rem;
  font: 600 1.35rem/1.2 "Questrial", sans-serif;
}

.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

.related-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(18, 21, 29, 0.72);
  padding: 0.7rem 0.8rem;
  text-decoration-thickness: 1px;
}

.page-title,
.coming-soon h1 {
  font-family: "Questrial", sans-serif;
  font-weight: 600;
  margin: 0 0 1rem;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
}

.post-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.post-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(180deg, #0d1016 0%, #090b10 100%);
}

.card-link {
  color: inherit;
  text-decoration: none;
  display: block;
  height: 100%;
}

.card-cover {
  position: relative;
  height: 170px;
  min-height: 170px;
  padding: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  overflow: hidden;
  background:
    linear-gradient(125deg, rgba(242, 178, 31, 0.28) 0%, rgba(33, 41, 60, 0.6) 48%, rgba(9, 12, 18, 1) 100%);
  border-bottom: 1px solid var(--line);
}

.card-cover-image,
.card-cover-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.card-cover-image {
  object-fit: cover;
  object-position: center 42%;
  filter: saturate(1.08) contrast(1.04);
  transition: transform 220ms ease;
}

.card-cover-fallback {
  background:
    linear-gradient(125deg, rgba(242, 178, 31, 0.28) 0%, rgba(33, 41, 60, 0.6) 48%, rgba(9, 12, 18, 1) 100%);
}

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 9, 16, 0.08) 0%, rgba(6, 9, 16, 0.30) 100%);
}

.chip {
  font: 700 0.72rem/1 "Questrial", sans-serif;
  color: #f7d583;
  background: rgba(9, 12, 18, 0.72);
  border: 1px solid rgba(247, 213, 131, 0.45);
  padding: 0.35rem 0.45rem;
  border-radius: 8px;
  position: relative;
  z-index: 1;
  backdrop-filter: blur(2px);
}

.date {
  color: #e8ecf7;
  font: 500 0.78rem/1 "Questrial", sans-serif;
  background: rgba(9, 12, 18, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 0.28rem 0.42rem;
  position: relative;
  z-index: 1;
  backdrop-filter: blur(2px);
}

.card-link:hover .card-cover-image {
  transform: scale(1.04);
}

.card-body {
  padding: 0.9rem;
}

.card-body h2 {
  margin: 0;
  font: 600 1rem/1.35 "Questrial", sans-serif;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 4.05em;
}

.card-body p {
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 5.6em;
}

@media (min-width: 768px) {
  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .card-cover {
    height: 180px;
    min-height: 180px;
  }
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .post-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .card-cover {
    height: 200px;
    min-height: 200px;
  }
}

.coming-soon {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.2rem;
  background: linear-gradient(160deg, rgba(18, 22, 32, 0.95) 0%, rgba(10, 12, 18, 0.95) 100%);
}

.coming-soon p {
  margin: 0;
  color: var(--muted);
  max-width: 72ch;
}

.coming-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.coming-grid div {
  border: 1px solid rgba(242, 178, 31, 0.25);
  border-radius: 12px;
  padding: 0.8rem;
  background: rgba(242, 178, 31, 0.04);
}

.coming-grid strong {
  display: block;
  font-family: "Questrial", sans-serif;
  margin-bottom: 0.35rem;
}

.coming-grid span {
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #06080d;
  margin-top: 2rem;
  padding-top: 1.4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.site-footer h3 {
  margin: 0 0 0.55rem;
  font: 600 0.95rem/1 "Questrial", sans-serif;
  color: var(--accent);
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li { margin: 0.3rem 0; }

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--text);
}

.site-footer p {
  margin: 0.35rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.support-logo-wrap {
  margin: 0.65rem 0 0.2rem;
}

.support-logo-link {
  display: inline-flex;
  max-width: 100%;
  opacity: 0.94;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.support-logo-link:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.support-logo {
  display: block;
  width: min(100%, 300px);
  height: auto;
}

.age-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0.6rem 0 0.45rem;
}

.age-badge {
  display: block;
  width: 92px;
  height: auto;
  opacity: 0.92;
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.08));
}

.trust-line {
  color: var(--ok) !important;
}

.footer-bottom {
  margin-top: 1rem;
  padding: 0.9rem 0 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom p {
  margin: 0;
  color: #7e8798;
  font-size: 0.82rem;
}

@media (max-width: 900px) {
  .brand img { width: 180px; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: #080b12;
    border-bottom: 1px solid var(--line);
    margin-left: 0;
  }
  .nav-links.open { display: flex; }
  .nav-links > a,
  .nav-parent {
    width: 100%;
    padding: 0.85rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    text-align: left;
  }
  .nav-item {
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
  }
  .has-menu::after {
    display: none;
  }
  .dropdown {
    position: static;
    min-width: 0;
    width: 100%;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 0;
    background: #0b0f19;
    box-shadow: none;
    padding: 0;
  }
  .has-menu:hover > .dropdown,
  .has-menu:focus-within > .dropdown {
    display: none;
  }
  .nav-item.open > .dropdown {
    display: block;
  }
  .dropdown a {
    padding: 0.75rem 1.4rem;
  }
  .age-badges {
    gap: 0.5rem;
    margin-top: 0.5rem;
  }
  .age-badge {
    width: 80px;
  }
  .support-logo {
    width: min(100%, 250px);
  }
}
