/* NZXT-ESC FAQ page stylesheet — shared by every generated FAQ locale page
   (dist/faq/index.html, dist/<code>/faq/index.html, ...). Not part of the
   Vite bundle: this file lives in public/ and is copied verbatim to
   dist/faq.css, referenced by the FAQ pages via an absolute <link>. Edit
   this file directly; scripts/generate-faq-pages.mjs does not touch it.

   Visual language borrowed from src/styles/root.css + src/styles/config.css:
   dark shell (#1a1c1e) with a centered panel (#121214), DMSans typography,
   purple accent (#a855f7 / #a900ff), squared corners (border-radius: 0
   everywhere except small circular status dots, per project convention). */

@font-face {
  font-family: 'DMSans';
  src: url('/fonts/DMSans-Variable.ttf') format('truetype-variations'),
       local('DM Sans'),
       local('sans-serif');
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'DMSans';
  src: url('/fonts/DMSans-Italic-Variable.ttf') format('truetype-variations'),
       local('DM Sans');
  font-weight: 100 1000;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #1a1c1e;
  --panel: #121214;
  --panel-raised: #1c1c20;
  --text: #e5e5ea;
  --text-secondary: #9ca3af;
  --text-muted: #8b8b95;
  --border: #3d3d43;
  --border-soft: #2c2c31;
  --accent: #a855f7;
  --accent-strong: #a900ff;
  --accent-on: #faf5ff;
  --shell-max-width: 860px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: DMSans, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  letter-spacing: 0.01em;
  line-height: 1.55;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: #c084fc;
  text-decoration: underline;
}

/* Every anchor target lands below the sticky header, not hidden under it */
[id] {
  scroll-margin-top: 84px;
}

.faq-shell {
  max-width: var(--shell-max-width);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--panel);
  border-left: 1px solid var(--border-soft);
  border-right: 1px solid var(--border-soft);
}

/* ---------- Header ---------- */

.faq-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  background: var(--panel);
  border-bottom: 1px solid var(--border-soft);
}

.faq-header__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.faq-header__brand a {
  font-weight: 700;
  font-size: 20px;
  color: var(--text);
  line-height: 1;
}

.faq-header__brand-tag {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
}

.faq-header__nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.faq-header__socials {
  display: flex;
  align-items: center;
  gap: 14px;
}

.faq-header__icon-link {
  display: inline-flex;
  color: var(--text-secondary);
}

.faq-header__icon-link:hover {
  color: var(--accent);
}

.faq-header__icon-link svg {
  width: 16px;
  height: 16px;
}

/* Language dropdown - native <details>, no JS required, mirrors the
   in-app LanguageSelector (flag + code trigger, flag + native-label rows) */
.faq-lang {
  position: relative;
  padding-left: 14px;
  border-left: 1px solid var(--border);
}

.faq-lang > summary {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  cursor: pointer;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  color: var(--text);
  font-size: 12px;
}

.faq-lang > summary::-webkit-details-marker {
  display: none;
}

.faq-lang > summary:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.faq-lang-flag {
  width: 18px;
  height: 13px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 0;
  outline: 1px solid rgba(255, 255, 255, 0.15);
  outline-offset: -0.5px;
}

.faq-lang-current {
  letter-spacing: 0.02em;
}

.faq-lang-arrow {
  font-size: 9px;
  opacity: 0.7;
}

.faq-lang[open] .faq-lang-arrow {
  transform: rotate(180deg);
}

.faq-lang-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 150px;
  background: rgba(12, 12, 14, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7);
  z-index: 1000;
  /* Up to 25 locales once every FAQ translation exists - scroll inside the
     dropdown instead of overflowing the viewport, same fix as the in-app
     LanguageSelector's .language-selector-dropdown (src/styles/config.css). */
  max-height: min(60vh, 340px);
  overflow-y: auto;
  overflow-x: hidden;
}

.faq-lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text);
}

.faq-lang-option:hover {
  background: rgba(255, 255, 255, 0.06);
  text-decoration: none;
}

.faq-lang-option--active {
  background: rgba(255, 255, 255, 0.08);
  font-weight: 500;
}

/* ---------- Breadcrumb ---------- */

.faq-breadcrumb {
  padding: 14px 24px 0;
  font-size: 12px;
  color: var(--text-muted);
}

.faq-breadcrumb a {
  color: var(--text-muted);
}

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

.faq-breadcrumb__sep {
  margin: 0 6px;
  color: var(--border);
}

.faq-breadcrumb__current {
  color: var(--text-secondary);
}

/* ---------- Main content ---------- */

.faq-main {
  padding: 0 24px 64px;
}

/* Hero */

.faq-hero {
  padding: 28px 0 32px;
  border-bottom: 1px solid var(--border-soft);
}

.faq-hero h1 {
  margin: 0 0 12px;
  font-size: 28px;
  line-height: 1.25;
  font-weight: 700;
  color: var(--text);
}

.faq-hero__lead {
  margin: 0 0 14px;
  font-size: 15px;
  color: var(--text-secondary);
}

.faq-hero__product-line {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

/* ---------- Setup question (own section, right after the hero) ---------- */

.faq-setup {
  padding: 28px 0;
  border-bottom: 1px solid var(--border-soft);
}

.faq-item--install summary h2 {
  font-size: 16px;
  font-weight: 700;
}

/* ---------- Install (Automatic / Manual) cards, live inside the setup <details> ---------- */

.faq-install__cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-install__card {
  display: flex;
  gap: 14px;
  border: 1px solid var(--border);
  background: var(--panel-raised);
  padding: 14px;
}

.faq-install__card--automatic {
  align-items: center;
}

.faq-install__card-text {
  flex: 1;
  min-width: 0;
}

.faq-install__card-text h3,
.faq-install__card-steps h3 {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.faq-install__card-text p {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-muted);
}

.faq-install__card--manual {
  align-items: stretch;
}

.faq-install__card-steps {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.faq-install__card-steps ol {
  margin: 0 0 10px;
  padding-left: 18px;
  font-size: 12.5px;
  color: var(--text-muted);
  flex: 1;
}

.faq-install__card-steps ol li {
  margin-bottom: 3px;
}

.faq-install__card-steps code {
  align-self: flex-start;
  background: #0c0c0e;
  border: 1px solid var(--border);
  padding: 4px 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

.faq-install__card-video {
  flex: 0 0 40%;
  max-width: 220px;
  align-self: stretch;
  background: #0c0c0e;
  border: 1px solid var(--border);
  overflow: hidden;
}

.faq-install__card-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 640px) {
  .faq-install__card--automatic {
    flex-direction: column;
    align-items: stretch;
  }

  .faq-install__card--manual {
    flex-direction: column;
  }

  .faq-install__card-video {
    max-width: none;
    width: 100%;
    min-height: 160px;
  }
}

.faq-cta-button {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-on);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 20px;
  border: 1px solid var(--accent-strong);
  border-radius: 0;
}

.faq-cta-button:hover {
  background: #b968fb;
  color: var(--accent-on);
  text-decoration: none;
}

/* Popular questions */

.faq-popular {
  padding: 28px 0;
  border-bottom: 1px solid var(--border-soft);
}

.faq-popular h2 {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.faq-popular__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.faq-popular__grid li {
  border: 1px solid var(--border);
  background: var(--panel-raised);
}

.faq-popular__grid a {
  display: block;
  padding: 12px 14px;
  font-size: 13px;
  color: var(--text);
}

.faq-popular__grid a:hover {
  color: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
}

/* Comparison table */

.faq-comparison {
  padding: 28px 0;
  border-bottom: 1px solid var(--border-soft);
}

.faq-comparison h2 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.faq-comparison__note {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--text-muted);
}

.faq-table-scroll {
  overflow-x: auto;
}

table.faq-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.faq-table th,
.faq-table td {
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--border);
  vertical-align: top;
}

.faq-table thead th {
  background: var(--panel-raised);
  color: var(--text);
  font-weight: 600;
}

.faq-table tbody td:first-child {
  color: var(--text-secondary);
  font-weight: 500;
}

.faq-table tbody td {
  color: var(--text-muted);
}

.faq-table--compare td:nth-child(2),
.faq-table--compare td:nth-child(3) {
  text-align: center;
  width: 90px;
  font-size: 15px;
}

.faq-table--continued {
  border-top: none;
}

.faq-compare-legend {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

.faq-compare-more {
  margin-top: 2px;
}

.faq-compare-more > summary {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  cursor: pointer;
  padding: 10px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
  border: 1px solid var(--border);
  border-top: none;
}

.faq-compare-more > summary::-webkit-details-marker {
  display: none;
}

.faq-compare-more > summary::before {
  content: '\25be';
  font-size: 10px;
}

.faq-compare-more[open] > summary::before {
  content: '\25b4';
}

/* FAQ category sections */

.faq-category {
  padding: 32px 0;
  border-bottom: 1px solid var(--border-soft);
}

.faq-category h2 {
  margin: 0 0 16px;
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
}

.faq-model-table-wrap {
  margin: 0 0 20px;
}

.faq-model-table-wrap p {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--text-muted);
}

/* Accordion items */

details.faq-item {
  border: 1px solid var(--border);
  background: var(--panel-raised);
  margin-bottom: 8px;
}

details.faq-item + details.faq-item {
  margin-top: 0;
}

details.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 44px 14px 16px;
  position: relative;
  outline-offset: -2px;
}

details.faq-item summary::-webkit-details-marker {
  display: none;
}

details.faq-item summary h3,
details.faq-item summary h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

details.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  font-weight: 400;
  color: var(--text-muted);
  width: 18px;
  text-align: center;
}

details.faq-item[open] summary::after {
  content: '\2212'; /* minus sign */
  color: var(--accent);
}

details.faq-item[open] summary h3,
details.faq-item[open] summary h2 {
  color: var(--accent);
}

details.faq-item summary:hover h3,
details.faq-item summary:hover h2 {
  color: var(--accent);
}

.faq-answer {
  padding: 0 16px 16px 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.faq-answer p {
  margin: 0 0 10px;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

.faq-answer code {
  display: inline-block;
  background: #0c0c0e;
  border: 1px solid var(--border);
  padding: 5px 10px;
  font-size: 12.5px;
  color: var(--text-secondary);
  margin: 2px 0 10px;
}

/* Final CTA */

.faq-final-cta {
  padding: 36px 0;
  border-bottom: 1px solid var(--border-soft);
  text-align: left;
}

.faq-final-cta h2 {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.faq-final-cta p {
  margin: 0 0 18px;
  font-size: 14px;
  color: var(--text-secondary);
}

/* ---------- Footer ---------- */

.faq-footer {
  padding: 18px 24px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
}

.faq-footer__coffee {
  max-width: 480px;
  color: var(--text-muted);
}

.faq-footer__coffee:hover {
  color: var(--accent);
}

.faq-footer__links {
  display: flex;
  align-items: center;
  gap: 14px;
}

.faq-footer__links a {
  display: inline-flex;
  color: var(--text-secondary);
}

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

.faq-footer__links a svg {
  width: 16px;
  height: 16px;
}

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
  .faq-header {
    padding: 12px 16px;
    flex-wrap: wrap;
    row-gap: 10px;
  }

  .faq-header__nav {
    gap: 10px;
    flex-wrap: wrap;
  }

  .faq-header__socials {
    gap: 12px;
  }

  .faq-breadcrumb,
  .faq-main {
    padding-left: 16px;
    padding-right: 16px;
  }

  .faq-popular__grid {
    grid-template-columns: 1fr;
  }

  .faq-hero h1 {
    font-size: 22px;
  }

  .faq-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
