
/* ========== CUSTOM PROPERTIES (Light & Dark) ========== */
:root {
  --primary: #00D7F2;
  --primary-rgb: 0, 215, 242;
  --secondary: #4E8EA2;
  --secondary-rgb: 78, 142, 162;
  --primary-soft: rgba(0, 215, 242, 0.14);
  --primary-border: rgba(0, 215, 242, 0.32);

  /* Backgrounds */
  --bg-body: #F4F8FA;
  --bg-card: rgba(255, 255, 255, 0.82);
  --bg-navbar: rgba(255, 255, 255, 0.78);
  --bg-footer: rgba(236, 244, 247, 0.92);
  --bg-elevated: #FFFFFF;

  /* Text */
  --text-primary: #101820;
  --text-muted: #61717C;
  --text-footer: #25333D;

  /* Borders & others */
  --border-color: rgba(16, 24, 32, 0.1);
  --card-fade-bg: #ffffff; /* for gradient fade in article cards */
  --shadow: 0 20px 60px rgba(14, 34, 44, 0.1);
  --sidebar-width: 116px;
  --radius: 8px;
}

[data-theme="dark"] {
  --bg-body: #03070C;
  --bg-card: rgba(7, 14, 20, 0.78);
  --bg-navbar: rgba(5, 12, 18, 0.76);
  --bg-footer: rgba(5, 11, 17, 0.86);
  --bg-elevated: #081018;

  --text-primary: #F4F8FB;
  --text-muted: #91A0AA;
  --text-footer: #D8E3EA;

  --border-color: rgba(188, 226, 240, 0.12);
  --card-fade-bg: #081018;
  --shadow: 0 24px 80px rgba(0,0,0,0.42);
}

/* ========== GLOBAL ========== */
* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg-body);
}

body {
  min-height: 100vh;
  margin: 0;
  background-color: var(--bg-body);
  color: var(--text-primary);
  font-family: "Space Grotesk", "Vazirmatn", Arial, sans-serif;
  transition: background-color 0.3s, color 0.3s;
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

html,
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--primary-rgb), 0.78) rgba(7, 18, 24, 0.52);
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: rgba(7, 18, 24, 0.52);
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(31, 232, 255, 0.92), rgba(0, 126, 154, 0.86));
  border: 2px solid rgba(7, 18, 24, 0.52);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #4cecff, #009cbd);
}

[data-theme="light"],
[data-theme="light"] * {
  scrollbar-color: rgba(0, 151, 180, 0.78) rgba(222, 239, 243, 0.86);
}

[data-theme="light"] *::-webkit-scrollbar-track {
  background: rgba(222, 239, 243, 0.86);
}

[data-theme="light"] *::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(0, 188, 218, 0.9), rgba(0, 122, 150, 0.82));
  border-color: rgba(222, 239, 243, 0.86);
}

[data-theme="light"] *::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #00d7f2, #007d99);
}

/* ========== APP SHELL ========== */
.site-body {
  overflow-x: hidden;
}

.site-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.site-content-frame {
  min-width: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  width: 100%;
  flex: 1;
  padding: clamp(18px, 3vw, 44px);
}

.site-sidebar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 22px 14px;
  border-right: 1px solid var(--border-color);
  background:
    linear-gradient(180deg, rgba(var(--primary-rgb), 0.12), transparent 26%),
    var(--bg-navbar);
  box-shadow: 18px 0 50px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(22px);
}

[data-theme="light"] .site-sidebar {
  border-right-color: rgba(23, 55, 68, 0.18);
  background:
    linear-gradient(180deg, rgba(var(--primary-rgb), 0.16), rgba(255, 255, 255, 0) 30%),
    rgba(244, 250, 252, 0.94);
  box-shadow: 14px 0 36px rgba(20, 48, 60, 0.12);
}

.sidebar-brand {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 84px;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 6px;
}

.sidebar-logo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--primary-border), 0 0 22px rgba(var(--primary-rgb), 0.28);
}

.sidebar-nav,
.sidebar-bottom {
  display: grid;
  gap: 8px;
}

.sidebar-bottom {
  margin-top: auto;
}

.sidebar-bottom form {
  margin: 0;
}

.sidebar-link {
  width: 100%;
  min-height: 56px;
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 8px 6px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--text-muted);
  background: transparent;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

[data-theme="light"] .sidebar-link {
  color: #334a55;
}

.sidebar-link span:last-child {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0;
}

.sidebar-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: currentColor;
  font-size: 0.92rem;
  font-weight: 800;
}

.sidebar-icon img {
  width: 21px;
  height: 21px;
  display: block;
  filter: grayscale(1) brightness(1.55);
  opacity: 0.82;
}

[data-theme="light"] .sidebar-icon img {
  filter: none;
  opacity: 0.9;
}

.sidebar-link:hover .sidebar-icon img,
.sidebar-link.is-active .sidebar-icon img {
  filter: none;
  opacity: 1;
}

.sidebar-wordmark {
  width: 52px;
  height: auto;
  display: block;
}

.sidebar-link:hover,
.sidebar-link.is-active {
  color: var(--primary);
  border-color: var(--primary-border);
  background: var(--primary-soft);
  box-shadow: 0 0 24px rgba(var(--primary-rgb), 0.11);
}

[data-theme="light"] .sidebar-link:hover,
[data-theme="light"] .sidebar-link.is-active {
  color: #063542;
  border-color: rgba(0, 151, 180, 0.38);
  background: rgba(0, 215, 242, 0.16);
  box-shadow: 0 10px 24px rgba(19, 80, 96, 0.1);
}

.sidebar-cta {
  color: var(--primary);
}

.sidebar-button {
  appearance: none;
  border: 1px solid transparent;
}

.mobile-nav-toggle {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 80;
  width: 44px;
  height: 44px;
  display: none;
  place-items: center;
  gap: 4px;
  border: 1px solid var(--primary-border);
  border-radius: var(--radius);
  background: var(--bg-navbar);
  color: var(--primary);
  box-shadow: var(--shadow);
}

.mobile-nav-toggle span {
  width: 18px;
  height: 2px;
  display: block;
  background: currentColor;
}

.site-messages {
  max-width: 960px;
  margin: 0 auto 20px;
  display: grid;
  gap: 10px;
}

.site-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--primary-border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow);
}

.site-alert-success {
  border-color: rgba(56, 185, 132, 0.34);
}

.site-alert-error,
.site-alert-danger {
  border-color: rgba(218, 78, 78, 0.36);
}

.site-alert-close {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

/* Lightweight compatibility for legacy utility-marked templates. */
.container {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: -0.75rem;
}

.row > * {
  padding: 0.75rem;
  min-width: 0;
}

.col,
.col-12 {
  flex: 0 0 100%;
  max-width: 100%;
}

.col-md-3,
.col-md-4,
.col-md-6,
.col-md-8,
.col-lg-3,
.col-lg-4,
.col-lg-6,
.col-lg-8,
.col-lg-9 {
  flex: 0 0 100%;
  max-width: 100%;
}

@media (min-width: 768px) {
  .col-md-3 { flex-basis: 25%; max-width: 25%; }
  .col-md-4 { flex-basis: 33.333%; max-width: 33.333%; }
  .col-md-6 { flex-basis: 50%; max-width: 50%; }
  .col-md-8 { flex-basis: 66.666%; max-width: 66.666%; }
}

@media (min-width: 1024px) {
  .col-lg-3 { flex-basis: 25%; max-width: 25%; }
  .col-lg-4 { flex-basis: 33.333%; max-width: 33.333%; }
  .col-lg-6 { flex-basis: 50%; max-width: 50%; }
  .col-lg-8 { flex-basis: 66.666%; max-width: 66.666%; }
  .col-lg-9 { flex-basis: 75%; max-width: 75%; }
}

.card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow);
}

.card-body {
  padding: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-primary);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary,
.btn-outline-primary:hover {
  border-color: var(--primary);
  background: var(--primary);
  color: #001016;
}

.btn-outline-primary,
.btn-outline-secondary {
  border-color: var(--primary-border);
  color: var(--primary);
}

.btn-sm {
  min-height: 34px;
  padding: 7px 11px;
  font-size: 0.84rem;
}

.form-control,
.form-select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text-primary);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.14);
  outline: none;
}

.mt-auto { margin-top: auto; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.py-4 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.p-3 { padding: 1rem; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.fw-bold { font-weight: 800; }
.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.flex-grow-1 { flex-grow: 1; }
.w-100 { width: 100%; }
.h-100 { height: 100%; }

/* Navbar */
.navbar {
  background-color: var(--bg-navbar) !important;
  border-bottom: 1px solid var(--border-color) !important;
}
.navbar-brand {
  color: var(--primary) !important;
  font-weight: bold;
}
.nav-link {
  font-size: 15px;
  padding: 0 0.75rem !important;
  color: var(--text-primary) !important;
  transition: color 0.2s;
}
.nav-link:hover {
  color: var(--primary) !important;
}
.nav-link.active {
  color: var(--primary) !important;
  font-weight: 600;
}

/* Cards fade effect (article cards) */
.article-card-text {
  max-height: 90px;
  overflow: hidden;
  position: relative;
}
.article-card-text::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 30px;
  background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, var(--card-fade-bg) 100%);
}

/* Article frame */
.article-frame {
  max-width: 980px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
}

/* Hero section */
.hero-wrapper {
  position: relative;
  height: 360px;
  overflow: hidden;
}
.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.05), rgba(0,0,0,0.75));
}
.hero-text-bottom {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
}
.hero-title {
  font-size: 2rem;
  text-shadow: 0 0 15px rgba(0,0,0,0.7);
}
.hero-meta {
  color: rgba(255,255,255,0.8);
  font-size: .9rem;
}

@media (max-width: 576px) {
  .hero-wrapper { height: 240px; }
  .hero-title { font-size: 1.4rem; }
}

/* Article content */
.article-content img {
  max-width: 100% !important;
  height: auto !important;
  display: block;
  margin: 1.2rem auto;
  border-radius: 10px;
}
pre {
  background: #0f1720;
  color: #e6edf3;
  padding: 1rem;
  border-radius: 8px;
  overflow: auto;
}

/* Gallery */
.gallery-thumb {
  position: relative;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  overflow: hidden;
  background: var(--bg-card);
}
.thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.25s;
}
.gallery-thumb:hover .thumb-img {
  transform: scale(1.05);
}
.video-icon {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  color: white;
  background: rgba(0,0,0,0.4);
}

/* Comments */
.comment-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
}
.comment-body img {
  max-width: 100%;
  height: auto;
}

/* Like / Dislike buttons */
.action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  color: var(--text-primary);
  transition: 0.16s;
  border: none;
  background: transparent;
}
.action-btn:hover {
  background: rgba(var(--primary-rgb), 0.08);
}
.action-btn.active {
  background: rgba(var(--primary-rgb), 0.15);
  color: var(--primary);
}
.icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Footer */
footer {
  background-color: var(--bg-footer) !important;
  color: var(--text-footer) !important;
  transition: background-color 0.3s;
}
footer a {
  color: var(--text-footer) !important;
  transition: color 0.2s;
}
footer a:hover {
  color: var(--secondary) !important;
}
footer hr {
  border-color: rgba(255,255,255,0.15);
}

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  background:
    linear-gradient(90deg, rgba(var(--primary-rgb), 0.08), transparent 42%),
    var(--bg-footer) !important;
  color: var(--text-footer) !important;
  backdrop-filter: blur(18px);
}

.site-footer .container {
  width: min(1180px, calc(100% - 32px));
  padding: 28px 0;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 2fr;
  gap: 28px;
  align-items: start;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-footer) !important;
  text-decoration: none;
  font-weight: 900;
}

.footer-brand-logo {
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
}

.footer-wordmark {
  width: 92px;
  height: auto;
  display: block;
}

.footer-brand-block p {
  max-width: 430px;
  color: var(--text-muted);
  line-height: 1.65;
}

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

.footer-links div {
  display: grid;
  gap: 8px;
}

.footer-links h6 {
  margin: 0 0 4px;
  color: var(--primary);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.footer-links a,
.footer-links span,
.footer-links button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text-muted) !important;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.86rem;
}

@media (max-width: 900px) {
  .site-shell {
    grid-template-columns: 1fr;
  }

  .site-sidebar {
    position: fixed;
    left: 14px;
    top: 14px;
    bottom: 14px;
    width: min(280px, calc(100vw - 28px));
    height: auto;
    transform: translateX(calc(-100% - 28px));
    transition: transform 0.22s ease;
  }

  .site-sidebar.is-open {
    transform: translateX(0);
  }

  .mobile-nav-toggle {
    display: grid;
  }

  .site-main {
    padding: 76px 16px 22px;
  }

  .sidebar-brand,
  .sidebar-link {
    grid-template-columns: 34px 1fr;
    justify-items: start;
    min-height: 46px;
  }

  .sidebar-link span:last-child {
    font-size: 0.82rem;
  }

  .footer-top,
  .footer-links {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

/* Optional theme toggle. */
.theme-toggle {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 6px;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
  transition: all 0.2s;
}
.theme-toggle:hover {
  background: rgba(var(--primary-rgb), 0.1);
  border-color: var(--primary);
}

/* ========== theme overrides for legacy utility classes ========== */
.bg-light,
.jumbotron.bg-light {
    background-color: var(--bg-card) !important;
}
.bg-white {
    background-color: var(--bg-card) !important;
}
.border {
    border-color: var(--border-color) !important;
}
.text-dark {
    color: var(--text-primary) !important;
}
.text-muted {
    color: var(--text-muted) !important;
}

/* ========== Home ========== */
.home-page {
  color: var(--text-primary);
}

.home-hero {
  min-height: 560px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  padding: clamp(32px, 6vw, 72px);
  overflow: hidden;
}

.home-hero-content {
  max-width: 760px;
  color: #fff;
}

.home-kicker {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
  color: #78d1c8;
  margin-bottom: 14px;
}

.home-hero h1 {
  font-size: clamp(3.2rem, 8vw, 6.4rem);
  line-height: 0.95;
  margin: 0 0 18px;
  font-weight: 800;
}

.home-hero p {
  max-width: 660px;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.86);
  margin-bottom: 28px;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.home-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
}

.home-btn-primary {
  background: #78d1c8;
  color: #0d1117;
}

.home-btn-secondary {
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #fff;
}

.home-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 1px 0 72px;
  background: var(--border-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.home-metrics > div {
  background: var(--bg-card);
  padding: 22px;
}

.home-metrics strong {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.home-metrics span {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.home-section {
  margin-bottom: 72px;
}

.home-section-head {
  max-width: 760px;
  margin-bottom: 26px;
}

.home-section h2,
.home-split h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.08;
  font-weight: 800;
  margin: 0;
}

.home-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.home-feature {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 24px;
  min-height: 230px;
}

.home-feature-index {
  display: block;
  color: var(--primary);
  font-weight: 800;
  margin-bottom: 46px;
}

.home-feature h3 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.home-feature p {
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

.home-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 42px;
  align-items: start;
  padding: 42px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-card);
}

.home-checks {
  display: grid;
  gap: 12px;
}

.home-checks div {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
  color: var(--text-muted);
}

@media (max-width: 900px) {
  .home-metrics,
  .home-feature-grid,
  .home-split {
    grid-template-columns: 1fr;
  }

  .home-hero {
    min-height: 460px;
    padding: 28px;
  }
}

/* ========== Narq brand pass ========== */
:root {
  --brand-deep: #0B1A26;
  --brand-ink: #101820;
  --brand-line: rgba(78, 142, 162, 0.24);
  --font-body: "Space Grotesk", "Vazirmatn", "Segoe UI", Tahoma, Arial, sans-serif;
  --font-display: "Space Grotesk", "Vazirmatn", "Avenir Next", "Century Gothic", "Segoe UI", sans-serif;
}

html {
  scroll-padding-top: 82px;
}

body {
  font-family: var(--font-body) !important;
  letter-spacing: 0;
  background:
    linear-gradient(180deg, rgba(var(--primary-rgb), 0.06), transparent 260px),
    var(--bg-body);
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand,
.home-btn,
.home-kicker {
  font-family: var(--font-display);
  letter-spacing: 0;
}

.site-navbar {
  min-height: 68px;
  box-shadow: 0 14px 28px rgba(9, 18, 25, 0.06);
}

.narq-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0;
}

.brand-logo {
  width: 42px;
  height: 42px;
  display: block;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid rgba(var(--primary-rgb), 0.38);
  box-shadow: 0 10px 22px rgba(var(--primary-rgb), 0.18);
}

.brand-wordmark {
  color: var(--text-primary);
  font-size: 1.22rem;
  font-weight: 750;
  text-transform: uppercase;
}

.nav-link {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 650;
  text-transform: uppercase;
}

.theme-toggle {
  min-width: 54px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
}

.navbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.navbar-auth-btn {
  min-width: 78px;
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 750;
  text-transform: uppercase;
}

.home-hero {
  min-height: min(620px, calc(100vh - 116px));
  background-position: center;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}

.home-hero-logo {
  width: 86px;
  height: 86px;
  display: block;
  margin-bottom: 20px;
  border-radius: 20px;
  object-fit: cover;
  border: 1px solid rgba(120, 209, 200, 0.48);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
}

.home-hero h1 {
  text-transform: uppercase;
}

.home-btn-primary {
  background: var(--primary);
  color: #f6fbfd;
  box-shadow: 0 16px 34px rgba(var(--primary-rgb), 0.24);
}

.home-btn-primary:hover {
  background: var(--secondary);
  color: #fff;
}

.home-btn-secondary:hover {
  background: rgba(255,255,255,0.10);
  color: #fff;
}

.card,
.article-frame,
.home-feature,
.home-split,
.home-metrics {
  border-color: var(--border-color) !important;
  box-shadow: 0 16px 34px rgba(9, 18, 25, 0.06);
}

.card {
  background: var(--bg-card);
  color: var(--text-primary);
  border-radius: 8px;
  overflow: hidden;
}

.card-img-top {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.btn-primary,
.bg-primary {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
}

.btn-outline-primary {
  color: var(--primary);
  border-color: rgba(var(--primary-rgb), 0.46);
}

.btn-outline-primary:hover {
  background-color: var(--primary);
  border-color: var(--primary);
}

.site-footer {
  padding: 54px 0 26px;
  background:
    linear-gradient(180deg, #16202a, #0f151b) !important;
  border-top: 1px solid rgba(var(--primary-rgb), 0.18);
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(280px, 1.1fr) minmax(360px, 1.4fr);
  gap: clamp(34px, 6vw, 78px);
  align-items: start;
}

.footer-brand-block {
  max-width: 470px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  color: #f5fbfd !important;
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 850;
  letter-spacing: 0;
  text-decoration: none;
  text-transform: uppercase;
}

.footer-brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid rgba(var(--primary-rgb), 0.42);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
}

.footer-brand-block p {
  margin: 0;
  max-width: 430px;
  color: rgba(245, 251, 253, 0.68);
  line-height: 1.72;
}

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

.footer-links h6 {
  margin: 0 0 16px;
  color: #f5fbfd;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.footer-links a,
.footer-links span,
.footer-links button {
  display: block;
  margin: 0 0 10px;
  padding: 0;
  color: rgba(245, 251, 253, 0.68) !important;
  background: transparent;
  border: 0;
  font: inherit;
  line-height: 1.45;
  text-align: left;
  text-decoration: none;
}

.footer-links a:hover,
.footer-links button:hover {
  color: #78d1c8 !important;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(245, 251, 253, 0.52);
  font-size: 0.84rem;
}

@media (max-width: 576px) {
  .site-navbar .ms-3 {
    margin-left: 0 !important;
    margin-top: 12px;
  }

  .navbar-actions {
    align-items: stretch;
    margin: 14px 0 0 !important;
    width: 100%;
  }

  .navbar-actions .navbar-auth-btn,
  .navbar-actions form {
    width: 100%;
  }

  .home-hero-logo {
    width: 68px;
    height: 68px;
  }
}

@media (max-width: 900px) {
  .footer-top,
  .footer-links {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

/* ========== Auth ========== */
.auth-shell {
  width: 100%;
  padding: 0;
}

.auth-page {
  min-height: calc(100vh - 68px);
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
  background: var(--bg-body);
}

.auth-visual {
  min-height: 640px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  padding: clamp(36px, 6vw, 78px);
}

.auth-visual-content {
  max-width: 720px;
  color: #fff;
}

.auth-brand-mark {
  width: 74px;
  height: 74px;
  display: block;
  margin-bottom: 22px;
  border-radius: 18px;
  object-fit: cover;
  border: 1px solid rgba(120, 209, 200, 0.48);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
}

.auth-visual h1 {
  max-width: 620px;
  margin: 0 0 18px;
  font-size: clamp(2.4rem, 5vw, 5.2rem);
  line-height: 0.98;
  font-weight: 850;
  text-transform: uppercase;
}

.auth-visual p {
  max-width: 620px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.05rem;
  line-height: 1.72;
}

.auth-benefits {
  display: grid;
  gap: 1px;
  margin-top: 32px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
}

.auth-benefits div {
  padding: 16px 18px;
  background: rgba(8, 14, 20, 0.52);
}

.auth-benefits strong {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-display);
  font-size: 0.86rem;
  text-transform: uppercase;
}

.auth-benefits span {
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.92rem;
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 5vw, 58px);
}

.auth-card {
  width: min(100%, 440px);
  padding: clamp(28px, 4vw, 42px);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-card);
  box-shadow: 0 22px 48px rgba(9, 18, 25, 0.10);
}

.auth-card-wide {
  width: min(100%, 560px);
}

.auth-card-head {
  margin-bottom: 24px;
}

.auth-card-head span {
  display: block;
  margin-bottom: 8px;
  color: var(--primary);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-card-head h2 {
  margin: 0;
  font-size: 2.2rem;
  font-weight: 850;
}

.auth-google-btn {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  background: var(--bg-card);
  font-weight: 750;
  text-decoration: none;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}

.auth-google-btn:hover {
  color: var(--text-primary);
  border-color: rgba(var(--primary-rgb), 0.5);
  box-shadow: 0 12px 24px rgba(var(--primary-rgb), 0.12);
  transform: translateY(-1px);
}

.auth-google-btn:disabled {
  opacity: 0.58;
  cursor: not-allowed;
  transform: none;
}

.auth-google-icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #1f1f1f;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  font-family: Arial, sans-serif;
  font-weight: 800;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--border-color);
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.auth-form label {
  margin-bottom: -4px;
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 750;
}

.auth-input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  background: var(--bg-body);
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.auth-input:focus {
  border-color: rgba(var(--primary-rgb), 0.72);
  box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.12);
}

.auth-submit {
  min-height: 48px;
  margin-top: 8px;
  border-radius: 6px;
  font-weight: 800;
}

.auth-note,
.auth-switch {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.auth-note {
  margin: 4px 0 0;
}

.auth-switch {
  margin: 22px 0 0;
  text-align: center;
}

.auth-switch a {
  color: var(--primary);
  font-weight: 800;
  text-decoration: none;
}

.auth-form-error,
.auth-form .errorlist {
  margin: 0;
  padding: 10px 12px;
  border-radius: 6px;
  color: #a92d2d;
  background: rgba(169, 45, 45, 0.08);
  list-style-position: inside;
  font-size: 0.84rem;
}

.auth-card {
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(7, 12, 17, 0.16);
}

.auth-card-head p {
  margin: 8px 0 0;
  color: var(--text-muted);
  line-height: 1.55;
}

.auth-input,
.panel-input {
  border-radius: 7px;
  border: 1px solid rgba(78, 142, 162, 0.22);
  background: var(--bg-card);
  color: var(--text-primary);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.auth-input:focus,
.panel-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(78, 142, 162, 0.14);
  outline: none;
}

.account-shell {
  background:
    linear-gradient(135deg, rgba(78, 142, 162, 0.08), transparent 34%),
    var(--bg-body);
  padding: 28px clamp(16px, 3vw, 42px);
}

.account-page {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 22px;
}

.account-sidebar,
.account-card,
.account-hero {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-card);
  box-shadow: 0 18px 46px rgba(7, 12, 17, 0.08);
}

.account-sidebar {
  padding: 18px;
  align-self: start;
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
  overflow: auto;
}

.account-user {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.account-user img {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  object-fit: cover;
}

.account-user strong,
.account-list-row strong,
.device-box strong {
  color: var(--text-primary);
}

.account-user span,
.account-list-row span,
.device-box span,
.stat-card small {
  display: block;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.account-nav {
  display: grid;
  gap: 6px;
  margin-top: 16px;
}

.account-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 7px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 800;
}

.account-nav a:hover,
.account-nav a.is-active {
  background: rgba(78, 142, 162, 0.12);
  color: var(--primary);
}

.account-nav span {
  min-width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 0.78rem;
}

.account-content {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.account-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(78, 142, 162, 0.16), transparent 54%),
    var(--bg-card);
}

.account-hero.compact {
  padding: 22px 24px;
}

.account-kicker {
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.account-hero h1 {
  margin: 4px 0 8px;
  color: var(--text-primary);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 900;
}

.account-hero p {
  max-width: 650px;
  margin: 0;
  color: var(--text-muted);
  line-height: 1.65;
}

.account-primary-btn,
.account-secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 7px;
  font-weight: 900;
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
}

.account-primary-btn {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.account-secondary-btn {
  background: transparent;
  color: var(--primary);
  border-color: rgba(78, 142, 162, 0.28);
}

.account-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(192, 126, 67, 0.26);
  border-radius: 8px;
  background: rgba(192, 126, 67, 0.1);
  color: var(--text-primary);
}

.account-alert span {
  color: var(--text-muted);
  flex: 1;
}

.account-alert a {
  color: var(--primary);
  font-weight: 900;
  text-decoration: none;
}

.account-stat-grid,
.account-two-col {
  display: grid;
  gap: 18px;
}

.account-stat-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.account-card {
  padding: 20px;
}

.stat-card span {
  color: var(--text-muted);
  font-weight: 800;
}

.stat-card strong {
  display: block;
  margin: 8px 0 5px;
  color: var(--text-primary);
  font-size: 1.55rem;
  font-weight: 900;
}

.account-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.account-card-head h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.08rem;
  font-weight: 900;
}

.account-card-head a {
  color: var(--primary);
  font-weight: 900;
  text-decoration: none;
}

.account-list {
  display: grid;
  gap: 10px;
}

.account-list.slim {
  margin-top: 16px;
}

.account-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 7px;
  color: inherit;
  text-decoration: none;
  background: rgba(78, 142, 162, 0.04);
}

.account-list-row > div {
  min-width: 0;
}

.account-list-row strong,
.account-list-row > div > span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-list-row > .status-pill,
.account-list-row > span:last-child {
  justify-self: end;
  flex: 0 0 auto;
  white-space: nowrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(78, 142, 162, 0.12);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 900;
}

.status-pill.ok {
  background: rgba(61, 139, 108, 0.13);
  color: #2f7d60;
}

.status-pill.warn {
  background: rgba(169, 45, 45, 0.1);
  color: #a92d2d;
}

.status-pill.muted {
  background: rgba(130, 142, 153, 0.12);
  color: var(--text-muted);
}

.account-empty {
  margin: 0;
  color: var(--text-muted);
}

.account-form {
  display: grid;
  gap: 14px;
}

.account-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.account-form label {
  margin-bottom: 7px;
  color: var(--text-primary);
  font-size: 0.84rem;
  font-weight: 900;
}

.panel-input {
  width: 100%;
  min-height: 46px;
  padding: 11px 12px;
}

.panel-textarea {
  min-height: 132px;
  resize: vertical;
}

.account-form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.account-form-actions .account-primary-btn,
.account-form-actions .account-secondary-btn {
  width: auto;
  min-width: 132px;
  min-height: 44px;
  align-self: center;
}

.panel-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.panel-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.staff-page .account-hero h1 {
  font-size: clamp(1.7rem, 2.6vw, 2.35rem);
}

.staff-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.staff-inline-actions {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.staff-inline-actions form {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.staff-device-row {
  align-items: flex-start;
}

.account-table {
  display: grid;
  gap: 8px;
}

.account-table-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 7px;
  color: var(--text-primary);
}

.account-table-row.head {
  border: 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.device-box {
  padding: 14px;
  border: 1px solid rgba(78, 142, 162, 0.24);
  border-radius: 8px;
  background: rgba(78, 142, 162, 0.08);
}

.ticket-thread {
  display: grid;
  gap: 12px;
}

.ticket-message {
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: rgba(78, 142, 162, 0.04);
}

.ticket-message.staff {
  border-color: rgba(78, 142, 162, 0.28);
  background: rgba(78, 142, 162, 0.1);
}

.ticket-message-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.ticket-message-head strong {
  color: var(--text-primary);
}

.ticket-message-head span,
.ticket-message p {
  color: var(--text-muted);
}

.ticket-message p {
  margin: 0;
  line-height: 1.65;
}

.site-messages {
  max-width: 960px;
  margin: 0 auto 20px;
}

@media (max-width: 980px) {
  .auth-page {
    grid-template-columns: 1fr;
  }

  .account-page {
    grid-template-columns: 1fr;
  }

  .account-sidebar {
    position: static;
  }

  .account-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .account-stat-grid,
  .account-two-col {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    min-height: 420px;
  }

  .auth-panel {
    align-items: flex-start;
  }
}

@media (max-width: 576px) {
  .auth-visual {
    min-height: 360px;
    padding: 28px;
  }

  .auth-brand-mark {
    width: 60px;
    height: 60px;
  }

  .auth-panel {
    padding: 20px;
  }

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

  .account-shell {
    padding: 16px;
  }

  .account-hero,
  .account-alert {
    align-items: flex-start;
    flex-direction: column;
  }

  .account-nav,
  .account-form-grid,
  .account-table-row {
    grid-template-columns: 1fr;
  }

  .account-list-row,
  .account-form-actions,
  .staff-search,
  .staff-inline-actions form {
    align-items: flex-start;
    grid-template-columns: 1fr;
    flex-direction: column;
  }
}

/* ========== Brand Asset Pass ========== */
.home-main {
  padding: 0;
}

.home-page {
  display: grid;
  gap: clamp(34px, 5vw, 72px);
}

.home-hero-cinematic {
  position: relative;
  min-height: min(780px, 100vh);
  display: flex;
  align-items: center;
  overflow: hidden;
  border-radius: 0;
  padding: clamp(32px, 6vw, 96px);
  isolation: isolate;
  background: #03070c;
  box-shadow: none;
}

.home-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: opacity 0.28s ease;
}

.home-hero-bg-dark,
.home-wordmark-dark-theme {
  opacity: 1;
}

.home-hero-bg-light,
.home-hero-bg-fa-dark,
.home-hero-bg-fa-light,
.home-wordmark-light-theme {
  opacity: 0;
  pointer-events: none;
}

[data-theme="light"] .home-hero-bg-dark,
html[data-theme="light"] .home-hero-bg-dark,
[data-theme="light"] .home-wordmark-dark-theme,
html[data-theme="light"] .home-wordmark-dark-theme {
  opacity: 0;
}

[data-theme="light"] .home-hero-bg-light,
html[data-theme="light"] .home-hero-bg-light,
[data-theme="light"] .home-wordmark-light-theme,
html[data-theme="light"] .home-wordmark-light-theme {
  opacity: 1;
}

.home-hero-shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(3, 7, 12, 0.92) 0%, rgba(3, 7, 12, 0.64) 36%, rgba(3, 7, 12, 0.08) 72%),
    linear-gradient(180deg, rgba(3, 7, 12, 0.14), rgba(3, 7, 12, 0.72));
}

.home-hero-content {
  width: min(680px, 100%);
  position: relative;
  z-index: 1;
}

.home-hero-wordmark {
  width: min(260px, 56vw);
  height: auto;
  display: block;
  margin-bottom: clamp(30px, 5vw, 54px);
  transition: opacity 0.22s ease;
}

.home-wordmark-light-theme {
  position: absolute;
  top: 0;
  left: 0;
}

.home-headline-text {
  display: grid;
  gap: 10px;
  margin: 0 0 22px;
  color: #f4f8fb;
  font-size: clamp(2.2rem, 3.5vw, 3.55rem);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  text-shadow: 0 0 22px rgba(var(--primary-rgb), 0.18);
}

.home-headline-text span {
  display: block;
  white-space: nowrap;
}

.home-headline-text em {
  color: var(--primary);
  font-style: normal;
}

[data-theme="light"] .home-headline-text {
  color: #0b1f2a;
  text-shadow: none;
}

.home-hero-cinematic p {
  max-width: 620px;
  color: rgba(244, 248, 251, 0.78);
}

.home-btn {
  gap: 10px;
}

.home-btn img,
.home-metrics img,
.home-checks img {
  width: 22px;
  height: 22px;
  display: inline-block;
  vertical-align: middle;
}

.home-btn-primary {
  background: var(--primary);
  color: #001016;
}

.home-btn-secondary {
  border-color: var(--primary-border);
  background: rgba(3, 7, 12, 0.42);
  color: #fff;
}

.home-metrics,
.home-section,
.home-split {
  width: min(1180px, calc(100% - 44px));
  margin-inline: auto;
}

.home-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: clamp(-54px, -4vw, -28px);
  position: relative;
  z-index: 2;
  background: transparent;
}

.home-metrics > div {
  min-height: 148px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(var(--primary-rgb), 0.07), transparent),
    var(--bg-card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.home-metrics img {
  margin-bottom: 14px;
}

.home-feature {
  padding: 0;
  overflow: hidden;
}

.home-feature > img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--border-color);
}

.home-feature h3,
.home-feature p {
  padding-inline: 20px;
}

.home-feature h3 {
  margin-top: 20px;
}

.home-feature p {
  padding-bottom: 22px;
}

.home-checks div {
  display: flex;
  align-items: center;
  gap: 12px;
}

@media (max-width: 1180px) {
  .home-hero-cinematic {
    min-height: 680px;
    padding: 56px 34px;
  }

  .home-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 0;
  }
}

@media (max-width: 900px) {
  .sidebar-wordmark {
    width: 76px;
  }

  .home-main {
    padding-top: 0;
  }

  .home-hero-cinematic {
    min-height: 720px;
    padding: 92px 22px 34px;
    align-items: flex-end;
  }

  .home-hero-bg {
    object-position: 62% center;
  }

  .home-hero-shade {
    background:
      linear-gradient(180deg, rgba(3, 7, 12, 0.44), rgba(3, 7, 12, 0.92)),
      linear-gradient(90deg, rgba(3, 7, 12, 0.58), rgba(3, 7, 12, 0.18));
  }

  .home-headline-text {
    gap: 7px;
  }

  .home-headline-text span {
    white-space: normal;
  }

  .home-metrics,
  .home-section,
  .home-split {
    width: min(100% - 28px, 680px);
  }

  .home-feature-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .home-hero-cinematic {
    min-height: 650px;
    padding-inline: 16px;
  }

  .home-hero-wordmark {
    width: 160px;
    margin-bottom: 28px;
  }

  .home-actions {
    width: 100%;
  }

  .home-btn {
    width: 100%;
  }

  .home-metrics {
    grid-template-columns: 1fr;
  }

  .home-metrics > div {
    min-height: auto;
  }
}

/* ========== Final theme polish ========== */
.home-hero-bg {
  object-position: center center;
}

[data-theme="light"] .site-footer {
  background:
    linear-gradient(90deg, rgba(var(--primary-rgb), 0.09), transparent 48%),
    rgba(244, 248, 250, 0.96) !important;
  color: var(--text-footer) !important;
}

[data-theme="light"] .footer-brand,
[data-theme="light"] .footer-links a,
[data-theme="light"] .footer-links span,
[data-theme="light"] .footer-links button,
[data-theme="light"] .footer-bottom {
  color: var(--text-muted) !important;
}

[data-theme="light"] .footer-links h6 {
  color: var(--secondary) !important;
}

[data-theme="light"] .footer-links a:hover,
[data-theme="light"] .footer-links button:hover {
  color: var(--primary) !important;
}

[data-theme="light"] .footer-bottom {
  border-top-color: var(--border-color);
}

[data-theme="light"] .home-hero-cinematic {
  background: #f4f8fa;
}

[data-theme="light"] .home-hero-shade {
  background:
    linear-gradient(90deg, rgba(244, 248, 250, 0.94) 0%, rgba(244, 248, 250, 0.72) 40%, rgba(244, 248, 250, 0.12) 76%),
    linear-gradient(180deg, rgba(244, 248, 250, 0.1), rgba(244, 248, 250, 0.72));
}

[data-theme="light"] .home-hero-cinematic p {
  color: rgba(16, 24, 32, 0.76);
}

[data-theme="light"] .home-btn-secondary {
  background: rgba(255, 255, 255, 0.62);
  color: var(--text-primary);
}

[data-theme="light"] .auth-card,
[data-theme="light"] .account-card,
[data-theme="light"] .account-sidebar,
[data-theme="light"] .account-hero,
[data-theme="light"] .card {
  background: rgba(255, 255, 255, 0.88);
}

@media (max-width: 900px) {
  .home-hero-bg {
    object-position: 62% center;
  }
}

/* Emergency sidebar containment pass 2026-05-29 */
.site-shell {
  direction: ltr;
}

.site-content-frame {
  direction: ltr;
  overflow-x: hidden;
}

.home-page,
.catalog-page,
.catalog-shell,
.narq-catalog-root,
.auth-page,
.account-shell {
  direction: ltr;
}

.site-main,
.home-hero-cinematic {
  min-width: 0;
}

@media (min-width: 901px) {
  .site-shell {
    display: block !important;
    min-height: 100vh;
  }

  .site-sidebar {
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    width: 116px !important;
    min-width: 116px !important;
    max-width: 116px !important;
    height: 100vh !important;
    flex: 0 0 116px !important;
    overflow: hidden auto;
  }

  .site-content-frame {
    width: calc(100vw - 116px) !important;
    min-height: 100vh;
    margin-left: 116px !important;
    margin-right: 0 !important;
  }

  .home-main {
    width: 100% !important;
    padding: 0 !important;
  }

  .home-page,
  .home-hero-cinematic {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .home-hero-cinematic {
    min-height: min(780px, 100vh);
  }

  .sidebar-brand,
  .sidebar-link {
    width: 86px !important;
    margin-inline: auto;
  }
}

@media (max-width: 900px) {
  .site-sidebar {
    width: 280px !important;
    max-width: calc(100vw - 28px) !important;
  }
}

.sidebar-logo,
.footer-brand-logo,
.auth-brand-mark,
.home-hero-logo,
.catalog-brand img,
.account-user img {
  object-fit: contain !important;
  background: transparent !important;
}

/* Final light-shell contrast pass */
[data-theme="light"] .site-sidebar {
  background:
    linear-gradient(180deg, rgba(0, 215, 242, 0.16), rgba(255, 255, 255, 0) 30%),
    rgba(246, 251, 253, 0.97) !important;
  border-right-color: rgba(20, 61, 76, 0.2) !important;
}

[data-theme="light"] .sidebar-link {
  color: #4d6470 !important;
}

[data-theme="light"] .sidebar-link span:last-child {
  color: currentColor;
  font-weight: 800;
}

[data-theme="light"] .sidebar-link .sidebar-icon img {
  filter: brightness(0) saturate(100%) invert(31%) sepia(15%) saturate(831%) hue-rotate(154deg) brightness(90%) contrast(88%) !important;
  opacity: 0.94 !important;
}

[data-theme="light"] .sidebar-link:hover,
[data-theme="light"] .sidebar-link.is-active {
  color: #00bcd7 !important;
  border-color: rgba(0, 188, 218, 0.45) !important;
  background: rgba(0, 215, 242, 0.16) !important;
}

[data-theme="light"] .sidebar-link:hover .sidebar-icon img,
[data-theme="light"] .sidebar-link.is-active .sidebar-icon img {
  filter: none !important;
  opacity: 1 !important;
}

.sidebar-logo,
.footer-brand-logo,
.auth-brand-mark,
.home-hero-logo {
  border-radius: 0 !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

/* Final home headline lock: two clean rows, no word break, no italic fallback. */
.home-hero-content {
  width: min(760px, 100%) !important;
}

.home-headline-text {
  width: min(720px, 100%) !important;
  display: grid !important;
  gap: clamp(5px, 0.8vw, 10px) !important;
  margin: 0 0 22px !important;
  color: #f4f8fb !important;
  font-size: clamp(2.45rem, 3.65vw, 4.35rem) !important;
  font-style: normal !important;
  font-weight: 900 !important;
  line-height: 0.92 !important;
  letter-spacing: 0 !important;
  text-transform: uppercase !important;
  text-shadow: 0 0 22px rgba(0, 215, 242, 0.18) !important;
}

html[lang="fa"] body {
  font-family: "Vazirmatn", "Space Grotesk", Arial, sans-serif;
}

html[lang="fa"] .site-content-frame,
html[lang="fa"] .home-page,
html[lang="fa"] .account-page,
html[lang="fa"] .auth-page,
html[lang="fa"] .software-root,
html[lang="fa"] .download-page,
html[lang="fa"] .narq-catalog-root,
html[lang="fa"] .article-create-panel,
html[lang="fa"] .upload-page {
  direction: rtl;
}

html[lang="fa"] .site-sidebar,
html[lang="fa"] .sidebar-nav,
html[lang="fa"] .sidebar-bottom,
html[lang="fa"] .sidebar-brand {
  direction: ltr;
}

html[lang="fa"] .home-hero-content,
html[lang="fa"] .home-section-head,
html[lang="fa"] .software-shell,
html[lang="fa"] .download-shell,
html[lang="fa"] .catalog-hero-inner,
html[lang="fa"] .account-content,
html[lang="fa"] .auth-card,
html[lang="fa"] .auth-visual-content,
html[lang="fa"] .footer-top,
html[lang="fa"] .footer-bottom {
  text-align: right;
}

html[lang="fa"] .home-actions,
html[lang="fa"] .home-checks div,
html[lang="fa"] .account-card-head,
html[lang="fa"] .account-list-row,
html[lang="fa"] .download-file,
html[lang="fa"] .catalog-brand,
html[lang="fa"] .catalog-search,
html[lang="fa"] .catalog-summary-row,
html[lang="fa"] .auth-benefits {
  direction: rtl;
}

html[lang="fa"] .account-user,
html[lang="fa"] .account-nav {
  direction: rtl;
  text-align: right;
}

html[lang="fa"] .home-headline-text,
html[lang="fa"] .software-hero h1,
html[lang="fa"] .download-hero h1,
html[lang="fa"] .catalog-hero h1 {
  letter-spacing: 0 !important;
  text-transform: none;
}

html[lang="fa"] .home-headline-text span {
  white-space: normal !important;
}

.home-headline-text span {
  display: block !important;
  white-space: nowrap !important;
}

.home-headline-text em {
  color: var(--primary) !important;
  font: inherit !important;
  font-style: normal !important;
}

[data-theme="light"] .home-headline-text {
  color: #0b1f2a !important;
  text-shadow: none !important;
}

@media (max-width: 760px) {
  .home-headline-text {
    font-size: clamp(2.15rem, 13vw, 3.6rem) !important;
  }

  .home-headline-text span {
    white-space: normal !important;
  }
}

/* Persian home hero: use mirrored art and a right-side composition. */
html[lang="fa"] .home-hero-bg-dark,
html[lang="fa"] .home-hero-bg-light {
  opacity: 0 !important;
}

html[lang="fa"] .home-hero-bg-fa-dark {
  opacity: 1 !important;
}

html[lang="fa"][data-theme="light"] .home-hero-bg-fa-dark {
  opacity: 0 !important;
}

html[lang="fa"][data-theme="light"] .home-hero-bg-fa-light {
  opacity: 1 !important;
}

html[lang="fa"] .home-hero-cinematic {
  justify-content: flex-start !important;
  padding-inline: clamp(28px, 8vw, 118px) clamp(26px, 6vw, 90px);
}

html[lang="fa"] .home-hero-bg {
  object-position: center center !important;
}

html[lang="fa"] .home-hero-shade {
  background:
    linear-gradient(270deg, rgba(3, 7, 12, 0.96) 0%, rgba(3, 7, 12, 0.78) 34%, rgba(3, 7, 12, 0.26) 64%, rgba(3, 7, 12, 0.08) 100%),
    linear-gradient(180deg, rgba(3, 7, 12, 0.12), rgba(3, 7, 12, 0.72)) !important;
}

html[lang="fa"][data-theme="light"] .home-hero-shade {
  background:
    linear-gradient(270deg, rgba(244, 248, 250, 0.96) 0%, rgba(244, 248, 250, 0.78) 34%, rgba(244, 248, 250, 0.26) 66%, rgba(244, 248, 250, 0.08) 100%),
    linear-gradient(180deg, rgba(244, 248, 250, 0.12), rgba(244, 248, 250, 0.72)) !important;
}

html[lang="fa"] .home-hero-content {
  width: min(620px, 100%) !important;
  margin-inline-start: 0 !important;
  margin-inline-end: auto !important;
  text-align: right !important;
}

html[lang="fa"] .home-hero-wordmark {
  width: min(240px, 52vw);
  margin-right: 0;
  margin-left: auto;
}

html[lang="fa"] .home-headline-text {
  width: min(610px, 100%) !important;
  font-size: clamp(2.7rem, 4.6vw, 5rem) !important;
  line-height: 1.12 !important;
  text-align: right !important;
  text-transform: none !important;
}

html[lang="fa"] .home-headline-text span {
  white-space: nowrap !important;
}

html[lang="fa"] .home-hero-cinematic p {
  max-width: 590px;
  margin-inline-start: auto;
  margin-inline-end: 0;
  font-size: clamp(1.02rem, 1.65vw, 1.2rem);
  line-height: 2;
}

html[lang="fa"] .home-actions {
  justify-content: flex-start;
}

@media (max-width: 900px) {
  html[lang="fa"] .home-hero-cinematic {
    justify-content: flex-start !important;
    padding: 92px 22px 34px;
  }

  html[lang="fa"] .home-hero-shade {
    background:
      linear-gradient(180deg, rgba(3, 7, 12, 0.36), rgba(3, 7, 12, 0.9)),
      linear-gradient(270deg, rgba(3, 7, 12, 0.78), rgba(3, 7, 12, 0.2)) !important;
  }

  html[lang="fa"][data-theme="light"] .home-hero-shade {
    background:
      linear-gradient(180deg, rgba(244, 248, 250, 0.4), rgba(244, 248, 250, 0.9)),
      linear-gradient(270deg, rgba(244, 248, 250, 0.82), rgba(244, 248, 250, 0.2)) !important;
  }
}

@media (max-width: 760px) {
  html[lang="fa"] .home-headline-text {
    font-size: clamp(2.35rem, 11vw, 3.9rem) !important;
  }

  html[lang="fa"] .home-headline-text span {
    white-space: normal !important;
  }
}

/* Narq extension download page */
.extension-main {
  padding: 0;
}

.extension-page {
  display: grid;
  gap: clamp(32px, 5vw, 68px);
  padding-bottom: clamp(34px, 6vw, 80px);
}

.extension-hero {
  position: relative;
  min-height: min(760px, calc(100vh - 32px));
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: clamp(32px, 6vw, 94px);
  isolation: isolate;
  background: #03070c;
}

.extension-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: opacity .24s ease;
}

.extension-hero-bg-light,
.extension-wordmark-light {
  opacity: 0;
}

[data-theme="light"] .extension-hero-bg-dark,
[data-theme="light"] .extension-wordmark-dark {
  opacity: 0;
}

[data-theme="light"] .extension-hero-bg-light,
[data-theme="light"] .extension-wordmark-light {
  opacity: 1;
}

.extension-hero-shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(3, 7, 12, .96) 0%, rgba(3, 7, 12, .76) 38%, rgba(3, 7, 12, .18) 74%),
    linear-gradient(180deg, rgba(3, 7, 12, .10), rgba(3, 7, 12, .76));
}

[data-theme="light"] .extension-hero-shade {
  background:
    linear-gradient(90deg, rgba(245, 250, 252, .98) 0%, rgba(245, 250, 252, .76) 38%, rgba(245, 250, 252, .16) 76%),
    linear-gradient(180deg, rgba(245, 250, 252, .08), rgba(245, 250, 252, .78));
}

.extension-hero-content {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
}

.extension-wordmark {
  width: min(245px, 56vw);
  height: auto;
  display: block;
  margin-bottom: clamp(26px, 4vw, 46px);
  transition: opacity .2s ease;
}

.extension-wordmark-light {
  position: absolute;
  top: 0;
  left: 0;
}

.extension-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid rgba(var(--primary-rgb), .32);
  border-radius: 999px;
  background: rgba(var(--primary-rgb), .10);
  color: var(--primary);
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.extension-hero h1,
.extension-showcase h2,
.extension-download-panel h2 {
  margin: 18px 0 16px;
  color: #f4f8fb;
  font-size: clamp(2.45rem, 5vw, 5.15rem);
  font-weight: 950;
  line-height: .94;
  letter-spacing: 0;
}

[data-theme="light"] .extension-hero h1,
[data-theme="light"] .extension-showcase h2,
[data-theme="light"] .extension-download-panel h2 {
  color: #0b1f2a;
}

.extension-hero p,
.extension-showcase p,
.extension-download-panel p {
  max-width: 680px;
  margin: 0;
  color: rgba(232, 242, 247, .78);
  font-size: clamp(1rem, 1.45vw, 1.18rem);
  line-height: 1.75;
}

[data-theme="light"] .extension-hero p,
[data-theme="light"] .extension-showcase p,
[data-theme="light"] .extension-download-panel p {
  color: #48616d;
}

.extension-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.extension-download-btn,
.extension-secondary-btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 920;
}

.extension-download-btn {
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #001016;
  box-shadow: 0 18px 48px rgba(var(--primary-rgb), .20);
}

.extension-download-btn span {
  color: inherit;
}

.extension-download-btn.is-disabled {
  opacity: .56;
  cursor: not-allowed;
}

.extension-secondary-btn {
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(3, 7, 12, .42);
  color: #fff;
}

[data-theme="light"] .extension-secondary-btn {
  border-color: rgba(13, 57, 70, .16);
  background: rgba(255,255,255,.80);
  color: #10313d;
}

.extension-download-btn img,
.extension-secondary-btn img,
.extension-proof-band img,
.extension-checks img {
  width: 21px;
  height: 21px;
}

.extension-release-strip {
  width: min(690px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: clamp(26px, 4vw, 42px);
}

.extension-release-strip div,
.extension-proof-band div,
.extension-download-meta {
  border: 1px solid rgba(188, 226, 240, .14);
  border-radius: 8px;
  background: rgba(5, 12, 18, .58);
  backdrop-filter: blur(16px);
}

[data-theme="light"] .extension-release-strip div,
[data-theme="light"] .extension-proof-band div,
[data-theme="light"] .extension-download-meta {
  border-color: rgba(23, 55, 68, .14);
  background: rgba(255,255,255,.76);
}

.extension-release-strip div {
  min-height: 86px;
  padding: 13px;
}

.extension-release-strip span,
.extension-download-meta span {
  display: block;
  color: var(--text-muted);
  font-size: .78rem;
  font-weight: 850;
}

.extension-release-strip strong,
.extension-download-meta strong {
  display: block;
  margin-top: 6px;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 950;
}

.extension-proof-band,
.extension-showcase,
.extension-download-panel {
  width: min(1180px, calc(100% - 44px));
  margin-inline: auto;
}

.extension-proof-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.extension-proof-band div {
  min-height: 174px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px;
}

.extension-proof-band strong {
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 950;
}

.extension-proof-band span,
.extension-checks div {
  color: var(--text-muted);
  line-height: 1.55;
}

.extension-showcase {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, .95fr);
  gap: clamp(22px, 4vw, 52px);
  align-items: center;
}

.extension-showcase h2,
.extension-download-panel h2 {
  color: var(--text-primary);
  font-size: clamp(2rem, 3.5vw, 3.85rem);
}

.extension-checks {
  display: grid;
  gap: 12px;
  margin-top: 26px;
}

.extension-checks div {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: rgba(78, 142, 162, .05);
}

.extension-showcase-media {
  min-height: 360px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(var(--primary-rgb), .18), rgba(255,255,255,.04)),
    rgba(5, 12, 18, .68);
  border: 1px solid rgba(188, 226, 240, .14);
}

[data-theme="light"] .extension-showcase-media {
  background:
    linear-gradient(145deg, rgba(var(--primary-rgb), .14), rgba(255,255,255,.82)),
    rgba(255,255,255,.78);
  border-color: rgba(23, 55, 68, .14);
}

.extension-showcase-media img {
  width: min(460px, 88%);
  filter: drop-shadow(0 28px 50px rgba(0,0,0,.30));
}

.extension-download-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: clamp(20px, 4vw, 44px);
  align-items: center;
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid rgba(var(--primary-rgb), .20);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(var(--primary-rgb), .12), transparent 58%),
    var(--bg-card);
}

.extension-download-meta {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.extension-download-meta code {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 10px;
  border-radius: 7px;
  background: rgba(0,0,0,.18);
  color: var(--primary);
  font-size: .78rem;
}

[data-theme="light"] .extension-download-meta code {
  background: rgba(4, 40, 52, .06);
}

html[lang="fa"] .extension-page,
html[lang="fa"] .extension-hero-content,
html[lang="fa"] .extension-showcase-copy,
html[lang="fa"] .extension-download-panel {
  text-align: right;
}

html[lang="fa"] .extension-actions,
html[lang="fa"] .extension-checks div {
  direction: rtl;
}

@media (max-width: 1080px) {
  .extension-proof-band,
  .extension-showcase,
  .extension-download-panel {
    width: min(100% - 32px, 960px);
  }

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

  .extension-showcase,
  .extension-download-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .extension-hero {
    min-height: auto;
    padding: 92px 20px 34px;
  }

  .extension-hero-shade,
  [data-theme="light"] .extension-hero-shade {
    background:
      linear-gradient(180deg, rgba(3, 7, 12, .35), rgba(3, 7, 12, .90)),
      linear-gradient(90deg, rgba(3, 7, 12, .82), rgba(3, 7, 12, .18));
  }

  [data-theme="light"] .extension-hero-shade {
    background:
      linear-gradient(180deg, rgba(245, 250, 252, .35), rgba(245, 250, 252, .92)),
      linear-gradient(90deg, rgba(245, 250, 252, .84), rgba(245, 250, 252, .20));
  }

  .extension-release-strip,
  .extension-proof-band {
    grid-template-columns: 1fr;
  }

  .extension-actions,
  .extension-download-btn,
  .extension-secondary-btn {
    width: 100%;
  }
}

/* Compact shell pass: keep the sidebar usable on laptop-height viewports. */
@media (min-width: 901px) {
  .site-sidebar {
    width: 104px !important;
    min-width: 104px !important;
    max-width: 104px !important;
    flex-basis: 104px !important;
    gap: 12px !important;
    padding: 14px 8px 10px !important;
  }

  .site-content-frame {
    width: calc(100vw - 104px) !important;
    margin-left: 104px !important;
  }

  .sidebar-brand,
  .sidebar-link {
    width: 76px !important;
  }

  .sidebar-brand {
    min-height: 74px !important;
    gap: 6px !important;
  }

  .sidebar-logo {
    width: 42px !important;
    height: 42px !important;
  }

  .sidebar-wordmark {
    width: 47px !important;
  }

  .sidebar-nav,
  .sidebar-bottom {
    gap: 5px !important;
  }

  .sidebar-link {
    min-height: 47px !important;
    gap: 3px !important;
    padding: 5px 4px !important;
    border-radius: 8px !important;
  }

  .sidebar-icon {
    width: 21px !important;
    height: 21px !important;
    font-size: 0.78rem !important;
    line-height: 1 !important;
  }

  .sidebar-icon img {
    width: 19px !important;
    height: 19px !important;
  }

  .sidebar-link span:last-child {
    font-size: 0.6rem !important;
    line-height: 1.2 !important;
  }
}
/* Public site positioning refresh: home workflow and private-alpha states. */
.home-section-copy {
  max-width: 760px;
  margin: 12px auto 0;
  color: var(--text-muted);
  line-height: 1.8;
  font-size: 1rem;
}

.home-workflow-section {
  padding-top: clamp(36px, 6vw, 76px);
}

.home-workflow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.home-workflow article {
  min-height: 220px;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(var(--primary-rgb), 0.08), transparent 52%),
    rgba(7, 14, 20, 0.62);
}

[data-theme="light"] .home-workflow article {
  background:
    linear-gradient(180deg, rgba(var(--primary-rgb), 0.08), transparent 52%),
    rgba(255, 255, 255, 0.72);
}

.home-workflow span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(var(--primary-rgb), 0.28);
  border-radius: 8px;
  color: var(--primary);
  font-weight: 900;
}

.home-workflow h3 {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 900;
}

.home-workflow p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.65;
}

.home-final-cta {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto clamp(36px, 6vw, 80px);
  padding: clamp(26px, 5vw, 54px);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(var(--primary-rgb), 0.18), transparent 42%),
    rgba(7, 14, 20, 0.72);
}

[data-theme="light"] .home-final-cta {
  background:
    linear-gradient(135deg, rgba(var(--primary-rgb), 0.16), transparent 42%),
    rgba(255, 255, 255, 0.78);
}

.home-final-cta h2 {
  max-width: 840px;
  margin: 12px 0 22px;
  font-size: clamp(1.8rem, 4vw, 3.5rem);
  line-height: 1.05;
  font-weight: 900;
}

.software-empty {
  display: grid;
  gap: 8px;
  line-height: 1.7;
}

.software-empty strong {
  color: var(--text-primary);
}

.narq-error-page {
  min-height: min(720px, calc(100vh - 96px));
  display: grid;
  place-items: center;
  padding: clamp(32px, 7vw, 84px) clamp(18px, 4vw, 44px);
}

.narq-error-shell {
  width: min(680px, 100%);
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 16px;
}

.narq-error-mark {
  width: 68px;
  height: 68px;
  object-fit: contain;
}

.narq-error-code {
  color: var(--primary);
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 12vw, 7.5rem);
  line-height: 0.95;
  font-weight: 900;
}

.narq-error-shell h1 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 3rem);
  line-height: 1.08;
  font-weight: 900;
}

.narq-error-shell p {
  max-width: 560px;
  margin: 0;
  color: var(--text-muted);
  line-height: 1.75;
}

.narq-error-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}

@media (max-width: 980px) {
  .home-workflow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .home-workflow {
    grid-template-columns: 1fr;
  }

  .home-workflow article {
    min-height: auto;
  }
}
