:root {
  --blue: #2E86AB;
  --gold: #F6AE2D;
  --bg: #F8F9FA;
  --text: #212529;
  --muted: #64717D;
  --line: #DDE4EA;
  --white: #FFFFFF;
  --soft-blue: #EAF5F9;
  --shadow: 0 14px 34px rgba(33, 37, 41, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

a {
  color: inherit;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 5vw, 72px);
  border-bottom: 1px solid rgba(221, 228, 234, 0.8);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 1.12rem;
  text-decoration: none;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--blue);
  color: var(--white);
  font-size: 0.82rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-weight: 700;
}

.main-nav a {
  color: var(--muted);
  text-decoration: none;
}

.main-nav a:hover {
  color: var(--blue);
}

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--text);
}

.hero {
  display: grid;
  min-height: 560px;
  align-items: center;
  padding: 76px clamp(18px, 5vw, 72px);
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(20, 41, 55, 0.84), rgba(46, 134, 171, 0.52)),
    url("https://images.unsplash.com/photo-1506973035872-a4ec16b8e8d9?auto=format&fit=crop&w=1800&q=82") center/cover;
}

.hero-copy {
  max-width: 820px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1 {
  margin: 0;
  max-width: 850px;
  font-size: clamp(2.45rem, 7vw, 5.5rem);
  line-height: 1;
  letter-spacing: 0;
}

.hero-subtitle,
.page-hero p {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1.04rem, 2vw, 1.3rem);
}

.hero-search {
  display: flex;
  width: min(760px, 100%);
  padding: 7px;
  border-radius: 12px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.hero-search input,
.forum-controls input,
.forum-controls select,
.ask-form input,
.ask-form select,
.ask-form textarea {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  color: var(--text);
  font: inherit;
  outline: none;
}

.hero-search input {
  flex: 1;
  border: 0;
}

.hero-search button,
.primary-link,
.ask-form button,
.feedback-box button,
.share-row button,
.share-row a,
.filter-row button,
.trigger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  text-decoration: none;
}

.hero-search button,
.primary-link,
.ask-form button {
  padding: 0 22px;
  background: var(--gold);
  color: #1E252B;
}

.primary-link {
  margin-top: 18px;
}

.section {
  padding: 68px clamp(18px, 5vw, 72px);
}

.compact-section {
  padding-top: 44px;
  padding-bottom: 44px;
}

.section-white {
  background: var(--white);
}

.section-heading,
.split-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 26px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.1;
}

.text-link {
  color: var(--blue);
  font-weight: 900;
  text-decoration: none;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.article-card,
.category-card,
.question-card,
.sidebar-note,
.toc,
.feedback-box,
.ask-form {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.article-card {
  display: flex;
  flex-direction: column;
  min-height: 272px;
  padding: 22px;
}

.card-topline,
.article-meta,
.question-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.category-badge,
.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--soft-blue);
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
}

.status-badge.pending {
  background: #FFF5DF;
  color: #9B6409;
}

.status-badge.answered {
  background: #E7F6EF;
  color: #147A52;
}

.status-badge.review,
.status-badge.off_topic {
  background: #FFE9E9;
  color: #A51F1F;
}

.article-card h3,
.question-card h3 {
  margin: 16px 0 10px;
  font-size: 1.2rem;
  line-height: 1.28;
}

.article-card h3 a,
.card-footer a,
.category-card,
.question-card a {
  text-decoration: none;
}

.article-card p,
.category-card small,
.question-card p {
  color: var(--muted);
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: auto;
  color: var(--muted);
  font-size: 0.9rem;
}

.card-footer a {
  color: var(--blue);
  font-weight: 900;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.category-card {
  display: grid;
  gap: 8px;
  min-height: 170px;
  padding: 22px;
}

.category-card span {
  font-size: 2rem;
}

.category-card strong {
  font-size: 1.06rem;
}

.category-card-wide {
  grid-column: span 2;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.trust-grid div {
  display: grid;
  gap: 6px;
  padding: 18px 0;
  border-top: 2px solid var(--line);
}

.trust-grid strong {
  font-size: 1.05rem;
}

.trust-grid span {
  color: var(--muted);
}

.page-hero {
  padding: 104px clamp(18px, 5vw, 72px) 72px;
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(20, 41, 55, 0.9), rgba(46, 134, 171, 0.7)),
    url("https://images.unsplash.com/photo-1523050854058-8df90110c9f1?auto=format&fit=crop&w=1800&q=82") center/cover;
}

.page-hero p:last-child {
  margin-bottom: 0;
}

.page-search {
  margin-top: 24px;
}

.search-suggestions {
  display: grid;
  width: min(760px, 100%);
  margin-top: 10px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.search-suggestion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.search-suggestion:last-child {
  border-bottom: 0;
}

.search-suggestion strong {
  line-height: 1.25;
}

.search-suggestion span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.search-summary {
  margin-bottom: 18px;
  color: var(--muted);
  font-weight: 800;
}

.no-results-panel {
  grid-column: 1 / -1;
  max-width: 760px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.no-results-panel h2 {
  margin: 0 0 8px;
  font-size: 1.45rem;
  line-height: 1.2;
}

.no-results-panel p {
  margin: 0 0 16px;
  color: var(--muted);
}

.filter-row,
.forum-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.filter-row button {
  padding: 0 14px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--text);
}

.filter-row button.is-active {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--white);
}

.question-list {
  display: grid;
  gap: 16px;
}

.question-list.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.question-card {
  padding: 20px;
}

.question-answer {
  margin-top: 14px;
  color: var(--text);
}

.form-section {
  display: grid;
  place-items: start center;
}

.ask-form {
  display: grid;
  gap: 12px;
  width: min(760px, 100%);
  padding: 24px;
}

.ask-form label {
  font-weight: 800;
}

.field-note {
  margin: -4px 0 6px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.form-message {
  margin: 0;
  color: var(--blue);
  font-weight: 800;
}

.article-page {
  display: grid;
  grid-template-columns: minmax(0, 720px) 300px;
  gap: 42px;
  align-items: start;
  justify-content: center;
  padding: 56px clamp(18px, 5vw, 72px);
}

.article-shell {
  min-width: 0;
}

.article-header h1 {
  margin: 18px 0 16px;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.article-intro {
  color: var(--muted);
  font-size: 1.16rem;
}

.share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.share-row button,
.share-row a,
.feedback-box button {
  padding: 0 14px;
  border: 1px solid var(--line);
  background: var(--white);
}

.toc {
  margin: 26px 0;
  padding: 18px;
}

.toc div {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.toc a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

.article-body {
  font-size: 1.05rem;
}

.article-body h2,
.article-body h3 {
  margin: 34px 0 10px;
  line-height: 1.22;
}

.article-body p,
.article-body li {
  margin-bottom: 14px;
}

.adsense-slot {
  display: grid;
  place-items: center;
  min-height: 250px;
  border: 1px dashed #AFC3CE;
  border-radius: 12px;
  background: #EEF6F9;
  color: #657A85;
  font-size: 0.85rem;
  font-weight: 900;
  text-transform: uppercase;
}

.adsense-inline {
  min-height: 112px;
  margin: 24px 0;
}

.article-sidebar {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 18px;
}

.sidebar-note,
.feedback-box {
  padding: 20px;
}

.official-links {
  padding-left: 18px;
  margin: 12px 0 0;
}

.official-links a {
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.feedback-box {
  margin-top: 34px;
}

.feedback-box h2,
.related-section h2,
.sidebar-note h2 {
  margin: 0 0 12px;
  font-size: 1.25rem;
}

.feedback-box div {
  display: flex;
  gap: 10px;
}

.related-section {
  margin-top: 44px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.empty-state {
  grid-column: 1 / -1;
  color: var(--muted);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(18px, 5vw, 72px);
  border-top: 1px solid var(--line);
  background: var(--white);
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer p {
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 18px;
  font-weight: 800;
}

.footer-links a {
  color: var(--blue);
  text-decoration: none;
}

@media (max-width: 1020px) {
  .article-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .article-page {
    grid-template-columns: minmax(0, 720px);
  }

  .article-sidebar {
    position: static;
  }
}

@media (max-width: 767px) {
  .site-header {
    align-items: center;
    flex-wrap: wrap;
    padding: 12px 18px;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding-top: 12px;
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    min-height: 44px;
    padding: 10px 0;
  }

  .hero,
  .page-hero,
  .section,
  .article-page {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero {
    min-height: 540px;
  }

  .hero-search {
    flex-direction: column;
  }

  .hero-search button {
    width: 100%;
  }

  .section-heading,
  .split-hero,
  .site-footer {
    display: block;
  }

  .footer-links {
    justify-content: flex-start;
    margin-top: 16px;
  }

  .article-grid,
  .related-grid,
  .question-list.compact,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .category-card-wide {
    grid-column: auto;
  }

  .article-card {
    min-height: 0;
  }

  .forum-controls {
    display: grid;
  }
}
