/* ==========================================================================
   Q789 Game — q789login.pk shared stylesheet
   Dark navy + electric purple, matching the Q789 app's own visual identity.
   Zero external requests: system font stack only.
   ========================================================================== */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
img, picture, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; width: 100%; }

/* ---------- Design tokens ---------- */
:root {
  --bg: #080d1e;
  --bg-soft: #0c1330;
  --surface: #111a38;
  --surface-2: #17224a;
  --border: rgba(181, 0, 252, 0.18);
  --border-soft: rgba(168, 178, 209, 0.14);
  --border-strong: rgba(181, 0, 252, 0.42);
  --text: #eef1fb;
  --text-muted: #a8b2d1;
  --text-faint: #7d88a8;
  --accent: #b500fc;
  --accent-2: #d24bff;
  --accent-deep: #7d00b0;
  --accent-tint: rgba(181, 0, 252, 0.12);
  --link: #d98bff;
  --navy: #152244;
  --green: #2fbf71;
  --amber: #f0b429;
  --red: #e0503a;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 9px;
  --shadow: 0 18px 44px rgba(2, 4, 14, 0.6);
  --shadow-sm: 0 6px 18px rgba(2, 4, 14, 0.45);
  --header-h: 74px;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --container: 1160px;
  --measure: 820px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 20px); }

body {
  background: var(--bg);
  background-image:
    radial-gradient(900px 520px at 82% -8%, rgba(181, 0, 252, 0.20), transparent 62%),
    radial-gradient(760px 480px at 4% 4%, rgba(43, 90, 240, 0.14), transparent 60%);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

main { display: block; }
::selection { background: var(--accent); color: #ffffff; }

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

.wrap {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -70px;
  z-index: 200;
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 10px 10px;
  font-weight: 700;
  transition: top 0.18s ease;
}
.skip-link:focus { top: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 14, 32, 0.94);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--border-soft);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.site-header.is-stuck {
  box-shadow: 0 10px 30px rgba(2, 4, 14, 0.55);
  border-bottom-color: var(--border-strong);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: var(--header-h);
}

.brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.brand img { width: 178px; height: 50px; }
@media (max-width: 400px) { .brand img { width: 142px; height: 40px; } }

.nav-panel { display: flex; align-items: center; gap: 18px; }
.site-nav ul { display: flex; align-items: center; gap: 4px; list-style: none; padding: 0; margin: 0; }
.site-nav a {
  display: block;
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.15s ease, background 0.15s ease;
}
.site-nav a:hover { color: var(--text); background: rgba(181, 0, 252, 0.12); }
.site-nav a[aria-current="page"] { color: #fff; background: var(--accent-tint); box-shadow: inset 0 0 0 1px var(--border-strong); }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  background: var(--accent-tint);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  position: relative;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}
.nav-toggle span::before, .nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 20px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #8f16e6 100%);
  color: #ffffff;
  box-shadow: 0 8px 22px rgba(181, 0, 252, 0.32);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(181, 0, 252, 0.45); }
.btn-ghost {
  background: rgba(181, 0, 252, 0.08);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover { background: rgba(181, 0, 252, 0.18); transform: translateY(-1px); }
.btn-sm { min-height: 40px; padding: 9px 16px; font-size: 0.875rem; }
.btn-lg { min-height: 52px; padding: 14px 28px; font-size: 1.02rem; }
.btn-block { width: 100%; }

/* ---------- Article shell ---------- */
.post { padding-block: 34px 10px; }
.post-inner { max-width: var(--measure); margin-inline: auto; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  max-width: var(--measure);
  margin-inline: auto;
}
.cta-note {
  width: 100%;
  margin-top: 4px;
  font-size: 0.84rem;
  color: var(--text-faint);
}
.cta-divider {
  max-width: var(--measure);
  margin: 22px auto 26px;
  border: 0;
  border-top: 1px solid var(--border-soft);
}

.eyebrow {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-tint);
  box-shadow: inset 0 0 0 1px var(--border-strong);
  color: var(--accent-2);
  font-size: 0.735rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.title-block { max-width: var(--measure); margin-inline: auto; }
.title-block h1 {
  margin-top: 14px;
  font-size: clamp(2rem, 5.2vw, 3.05rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.lede {
  margin-top: 16px;
  font-size: clamp(1.05rem, 2.2vw, 1.19rem);
  line-height: 1.62;
  color: var(--text-muted);
}
.byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 18px;
  font-size: 0.85rem;
  color: var(--text-faint);
}
.byline strong { color: var(--text-muted); font-weight: 600; }

.hero-banner {
  max-width: var(--measure);
  margin: 26px auto 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.hero-banner img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }

/* ---------- Table of contents ---------- */
.toc {
  max-width: var(--measure);
  margin: 30px auto 0;
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.toc h2 {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 12px;
}
.toc ol {
  columns: 2;
  column-gap: 34px;
  margin: 0;
  padding-left: 20px;
  font-size: 0.93rem;
}
.toc li { margin-bottom: 5px; break-inside: avoid; color: var(--text-muted); }
.toc a { display: inline-block; padding-block: 5px; color: var(--text-muted); border-bottom: 1px solid transparent; }
.toc a:hover { color: var(--link); border-bottom-color: var(--link); }
@media (max-width: 620px) { .toc ol { columns: 1; } }

/* ---------- Body typography ---------- */
.body { max-width: var(--measure); margin: 8px auto 0; }
.body h2 {
  margin-top: 46px;
  font-size: clamp(1.42rem, 3.2vw, 1.85rem);
  font-weight: 800;
  line-height: 1.24;
  letter-spacing: -0.015em;
  scroll-margin-top: calc(var(--header-h) + 20px);
}
.body h2::after {
  content: "";
  display: block;
  width: 54px;
  height: 3px;
  margin-top: 12px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), rgba(181, 0, 252, 0));
}
.body h3 {
  margin-top: 30px;
  font-size: clamp(1.1rem, 2.4vw, 1.28rem);
  font-weight: 700;
  color: #ffffff;
  scroll-margin-top: calc(var(--header-h) + 20px);
}
.body h4 { margin-top: 22px; font-size: 1.02rem; font-weight: 700; }
.body p { margin-top: 15px; color: var(--text-muted); }
.body p strong, .body li strong { color: var(--text); font-weight: 700; }
.body a:not(.btn) {
  color: var(--link);
  border-bottom: 1px solid rgba(217, 139, 255, 0.4);
  transition: border-color 0.15s ease, color 0.15s ease;
}
.body a:not(.btn):hover { color: #f0c4ff; border-bottom-color: #f0c4ff; }

.body ul:not([class]), .body ol:not([class]) {
  margin-top: 15px;
  padding-left: 22px;
  color: var(--text-muted);
}
.body ul:not([class]) li, .body ol:not([class]) li { margin-top: 9px; }
.body ul:not([class]) li::marker { color: var(--accent-2); }
.body ol:not([class]) li::marker { color: var(--accent-2); font-weight: 700; }

/* ---------- Steps ---------- */
.steps { counter-reset: step; margin-top: 22px; display: grid; gap: 12px; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 16px 18px 16px 62px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  color: var(--text-muted);
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 15px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #8f16e6);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 800;
}
.steps li strong { color: var(--text); }

/* ---------- Chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.chips li {
  padding: 8px 15px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
}
.chips li:hover { border-color: var(--border-strong); color: var(--text); }

/* ---------- Cards ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 22px; }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }

.card {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius-md);
}
.card.card-pro { border-top-color: var(--green); }
.card.card-con { border-top-color: var(--red); }
.card h3 { margin-top: 0; font-size: 1.08rem; }
.card ul { margin-top: 12px; padding-left: 20px; color: var(--text-muted); }
.card ul li { margin-top: 8px; }
.card.card-pro ul li::marker { color: var(--green); }
.card.card-con ul li::marker { color: var(--red); }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; margin-top: 22px; }
.feature {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  transition: border-color 0.16s ease, transform 0.16s ease;
}
.feature:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.feature h3 { margin-top: 0; font-size: 1.02rem; }
.feature p { margin-top: 8px; font-size: 0.92rem; }

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto;
  margin-top: 22px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  -webkit-overflow-scrolling: touch;
}
.table-wrap table { min-width: 520px; font-size: 0.92rem; }
.table-wrap caption { caption-side: bottom; padding: 10px 14px; font-size: 0.82rem; color: var(--text-faint); text-align: left; }
.table-wrap th, .table-wrap td { padding: 12px 16px; text-align: left; vertical-align: top; }
.table-wrap thead th {
  background: var(--surface-2);
  color: #ffffff;
  font-size: 0.79rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.table-wrap tbody tr { border-top: 1px solid var(--border-soft); }
.table-wrap tbody tr:nth-child(odd) { background: rgba(23, 34, 74, 0.4); }
.table-wrap tbody td { color: var(--text-muted); }
.table-wrap tbody td:first-child { color: var(--text); font-weight: 600; }

/* ---------- Callout / disclaimer ---------- */
.callout {
  margin-top: 22px;
  padding: 16px 20px;
  background: var(--accent-tint);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.callout p { margin-top: 0; color: var(--text); }
.callout p + p { margin-top: 10px; }
.callout strong { color: #ffffff; }

.disclaimer {
  margin-top: 26px;
  padding: 18px 22px;
  background: rgba(240, 180, 41, 0.08);
  border: 1px solid rgba(240, 180, 41, 0.32);
  border-radius: var(--radius-md);
}
.disclaimer p { margin-top: 0; color: var(--text-muted); font-size: 0.93rem; }
.disclaimer p + p { margin-top: 10px; }
.disclaimer strong { color: var(--amber); }

/* ---------- Screenshot figure ---------- */
.shot {
  max-width: 300px;
  margin: 26px auto;
  text-align: center;
}
.shot img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.shot figcaption {
  margin-top: 10px;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-faint);
}
.shot-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 24px;
  justify-items: center;
}
.shot-row .shot { margin: 0; }

/* ---------- Review ---------- */
.reviews { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 14px; margin-top: 22px; }
.review {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  position: relative;
}
.review p { margin-top: 0; color: var(--text-muted); font-style: italic; }
.review cite {
  display: block;
  margin-top: 12px;
  font-style: normal;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--accent-2);
}

/* ---------- FAQ accordion ---------- */
.faq { margin-top: 22px; display: grid; gap: 10px; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.faq details[open] { border-color: var(--border-strong); }
.faq summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  min-height: 44px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: 0 0 auto;
  font-size: 1.4rem;
  line-height: 1;
  font-weight: 400;
  color: var(--accent-2);
}
.faq details[open] summary::after { content: "\2013"; }
.faq .faq-a { padding: 0 20px 18px; }
.faq .faq-a p { margin-top: 0; color: var(--text-muted); }
.faq .faq-a p + p { margin-top: 12px; }

/* ---------- CTA band ---------- */
.cta-band {
  max-width: var(--measure);
  margin: 44px auto 0;
  padding: 34px 30px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(600px 260px at 85% 0%, rgba(181, 0, 252, 0.42), transparent 65%),
    linear-gradient(135deg, #12194a 0%, #1c0b45 100%);
  border: 1px solid var(--border-strong);
  text-align: center;
  box-shadow: var(--shadow);
}
.cta-band h2 { margin-top: 0; font-size: clamp(1.3rem, 3vw, 1.65rem); font-weight: 800; }
.cta-band h2::after { display: none; }
.cta-band p { margin-top: 10px; color: var(--text-muted); }
.cta-band .cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}
.cta-band small { display: block; margin-top: 14px; color: var(--text-faint); font-size: 0.8rem; }

/* ---------- Post nav ---------- */
.post-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-width: var(--measure);
  margin: 44px auto 0;
}
@media (max-width: 640px) { .post-nav { grid-template-columns: 1fr; } }
.post-nav a {
  display: block;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  transition: border-color 0.16s ease, transform 0.16s ease;
}
.post-nav a:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.post-nav span {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent-2);
}
.post-nav strong { display: block; margin-top: 6px; font-size: 1rem; font-weight: 700; color: var(--text); }

/* ---------- Blog card grid ---------- */
.page-head { max-width: var(--measure); margin: 0 auto; padding-block: 40px 6px; text-align: center; }
.page-head h1 {
  margin-top: 14px;
  font-size: clamp(1.9rem, 4.6vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.14;
}
.page-head p { margin-top: 14px; color: var(--text-muted); font-size: 1.05rem; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 18px;
  padding-block: 34px 10px;
}
.post-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}
.post-card:hover { border-color: var(--border-strong); transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.post-card .thumb { background: var(--surface-2); }
.post-card .thumb img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.post-card .body-txt { padding: 20px; display: flex; flex-direction: column; flex: 1 1 auto; }
.post-card .tag {
  align-self: flex-start;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--accent-tint);
  color: var(--accent-2);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.post-card h2 { margin-top: 12px; font-size: 1.13rem; font-weight: 700; line-height: 1.35; }
.post-card p { margin-top: 10px; font-size: 0.92rem; color: var(--text-muted); flex: 1 1 auto; }
.post-card .more { margin-top: 14px; font-size: 0.88rem; font-weight: 700; color: var(--accent-2); }

/* ---------- Prose (about / privacy) ---------- */
.prose { max-width: var(--measure); margin-inline: auto; padding-block: 8px 10px; }
.prose h2 {
  margin-top: 40px;
  font-size: clamp(1.32rem, 3vw, 1.6rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  scroll-margin-top: calc(var(--header-h) + 20px);
}
.prose h3 { margin-top: 26px; font-size: 1.08rem; font-weight: 700; }
.prose p { margin-top: 14px; color: var(--text-muted); }
.prose ul, .prose ol { margin-top: 14px; padding-left: 22px; color: var(--text-muted); }
.prose li { margin-top: 8px; }
.prose li::marker { color: var(--accent-2); }
.prose a { color: var(--link); border-bottom: 1px solid rgba(217, 139, 255, 0.4); }
.prose a:hover { color: #f0c4ff; }
.prose strong { color: var(--text); }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 66px;
  background: var(--bg-soft);
  border-top: 1px solid var(--border-soft);
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  padding-block: 46px 30px;
}
@media (max-width: 980px) { .footer-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px; } }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 30px; } }

.footer-brand img { width: 190px; height: 53px; }
.footer-brand .wordmark {
  margin-top: 14px;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.footer-brand .wordmark span { color: var(--accent-2); }
.footer-brand .tagline {
  margin-top: 4px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-2);
}
.footer-brand p { margin-top: 14px; max-width: 46ch; font-size: 0.92rem; color: var(--text-muted); }

.footer-links h2 {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 12px;
}
.footer-links ul { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 3px; }
.footer-links a { display: inline-block; padding-block: 7px; font-size: 0.93rem; color: var(--text-muted); }
.footer-links a:hover { color: var(--link); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 18px 26px;
  border-top: 1px solid var(--border-soft);
  font-size: 0.85rem;
  color: var(--text-faint);
}

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: rgba(17, 26, 56, 0.94);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--text);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--accent); border-color: var(--accent); }
.to-top svg { width: 20px; height: 20px; }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding-block: 70px 30px; max-width: 680px; margin-inline: auto; }
.notfound .code {
  font-size: clamp(4rem, 16vw, 7rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--accent-2), #6f7dff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.notfound h1 { margin-top: 12px; font-size: clamp(1.5rem, 4vw, 2.1rem); font-weight: 800; }
.notfound p { margin-top: 14px; color: var(--text-muted); }
.notfound .cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 24px; }

/* ---------- Mobile nav ---------- */
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 16px 20px 20px;
    background: rgba(9, 14, 32, 0.99);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-strong);
    box-shadow: 0 18px 34px rgba(2, 4, 14, 0.6);
  }
  .nav-panel.is-open { display: flex; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .site-nav a { padding: 12px 14px; font-size: 1rem; }
  .nav-panel .btn { width: 100%; }
  .site-header .wrap { position: relative; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .to-top, .cta-band, .cta-row, .post-nav, .site-footer, .skip-link { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .body p, .body li, .table-wrap tbody td { color: #111; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; word-break: break-all; }
  .faq details { border: 1px solid #999; }
  .faq .faq-a { display: block !important; }
}
