:root {
  --bg: #f7fbff;
  --surface: #ffffff;
  --surface-soft: #eef7ff;
  --surface-strong: #dbeeff;
  --text: #172033;
  --muted: #60708e;
  --blue-300: #8bd0ff;
  --blue-500: #3ba7f8;
  --blue-700: #1f6fb5;
  --rose-500: #f35d7f;
  --shadow: 0 24px 60px rgba(46, 90, 138, 0.12);
  --radius-xl: 30px;
}

body.dark-theme {
  --bg: #09111e;
  --surface: #101b2b;
  --surface-soft: #16243a;
  --surface-strong: #1d3352;
  --text: #e6eefb;
  --muted: #93a7c7;
  --shadow: 0 28px 64px rgba(0, 0, 0, 0.34);
  background:
    radial-gradient(circle at top left, rgba(59, 167, 248, 0.18), transparent 25%),
    radial-gradient(circle at top right, rgba(243, 93, 127, 0.14), transparent 20%),
    linear-gradient(180deg, #07111b 0%, #0c1727 100%);
}

body.dark-theme .topbar {
  border-bottom-color: rgba(147, 167, 199, 0.14);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
}

body.dark-theme .menu-trigger,
body.dark-theme .theme-btn {
  background: color-mix(in srgb, var(--surface) 92%, #132238);
  color: #d9e8ff;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
}

body.dark-theme .search-shell {
  background: rgba(16, 27, 43, 0.94);
  border-color: rgba(91, 145, 209, 0.28);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.26);
}

body.dark-theme .search-advanced {
  color: #8fc5ff;
}

body.dark-theme .search-results {
  background: #122033;
  border-color: rgba(147, 167, 199, 0.16);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.34);
}

body.dark-theme .account-dropdown-menu {
  background: linear-gradient(180deg, rgba(16, 27, 43, 0.98), rgba(11, 21, 34, 0.99));
  border-color: rgba(147, 167, 199, 0.14);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.34);
}

body.dark-theme .account-dropdown-head {
  border-bottom-color: rgba(147, 167, 199, 0.12);
}

body.dark-theme .account-dropdown-head small,
body.dark-theme .account-dropdown-head span {
  color: #93a7c7;
}

body.dark-theme .account-dropdown-head strong {
  color: #eef4ff;
}

body.dark-theme .account-dropdown-menu .dropdown-item {
  color: #e6eefb;
}

body.dark-theme .account-dropdown-menu .dropdown-item:hover,
body.dark-theme .account-dropdown-menu .dropdown-item:focus {
  background: rgba(29, 51, 82, 0.82);
  color: #ffffff;
}

body.dark-theme .search-result-item:hover {
  background: rgba(29, 51, 82, 0.72);
}

body.dark-theme .page-card,
body.dark-theme .desktop-sidebar,
body.dark-theme .offcanvas,
body.dark-theme .modal-content {
  background: linear-gradient(180deg, rgba(16, 27, 43, 0.96), rgba(11, 21, 34, 0.98));
  border-color: rgba(147, 167, 199, 0.12);
  box-shadow: 0 28px 54px rgba(0, 0, 0, 0.3);
}

body.dark-theme .cookie-consent {
  background: linear-gradient(180deg, rgba(16, 27, 43, 0.98), rgba(11, 21, 34, 0.98));
  border-color: rgba(147, 167, 199, 0.14);
  box-shadow: 0 28px 54px rgba(0, 0, 0, 0.3);
}

body.dark-theme .site-popup-backdrop {
  background: rgba(4, 10, 18, 0.62);
}

body.dark-theme .site-popup-card {
  background:
    radial-gradient(circle at top right, rgba(243, 93, 127, 0.16), transparent 24%),
    radial-gradient(circle at bottom left, rgba(59, 167, 248, 0.18), transparent 28%),
    linear-gradient(135deg, rgba(18, 32, 51, 0.97), rgba(12, 22, 36, 0.98));
  border-color: rgba(147, 167, 199, 0.14);
  box-shadow: 0 30px 64px rgba(0, 0, 0, 0.38);
}

body.dark-theme .site-popup-close {
  background: rgba(19, 34, 56, 0.92);
  color: #d8e8ff;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.26);
}

body.dark-theme .site-popup-copy small {
  color: #8fc5ff;
}

body.dark-theme .site-popup-copy h2 {
  color: #edf4ff;
}

body.dark-theme .site-popup-copy p {
  color: #a5b9d8;
}

body.dark-theme .scroll-top-btn {
  background: linear-gradient(135deg, rgba(31, 111, 181, 0.96), rgba(243, 93, 127, 0.9));
  color: #f5f9ff;
  box-shadow: 0 20px 36px rgba(0, 0, 0, 0.32);
}

body.dark-theme .scroll-top-btn:hover {
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body, "Nunito", sans-serif);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(139, 208, 255, 0.38), transparent 30%),
    radial-gradient(circle at top right, rgba(243, 93, 127, 0.18), transparent 24%),
    linear-gradient(180deg, #fdfefe 0%, var(--bg) 100%);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display, "Baloo 2", cursive);
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  min-height: 100vh;
  padding-bottom: 20px;
}

.scroll-top-btn {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 1080;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--blue-500), var(--rose-500));
  color: #ffffff;
  box-shadow: 0 18px 32px rgba(59, 167, 248, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.scroll-top-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 36px rgba(59, 167, 248, 0.28);
}

.scroll-top-btn:focus-visible {
  outline: 3px solid rgba(59, 167, 248, 0.28);
  outline-offset: 3px;
}

.scroll-top-btn.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.page-shell {
  padding: 0 18px 12px;
}

.page-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  border-bottom: 1px solid rgba(23, 32, 51, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  will-change: transform;
}

.topbar-inner {
  gap: 12px;
  padding: 18px 0;
}

.menu-trigger {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(52, 107, 158, 0.08);
  color: var(--text);
}

.desktop-sidebar-toggle {
  display: none;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 16px;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(52, 107, 158, 0.08);
  color: var(--text);
}

.desktop-sidebar-toggle:hover {
  color: var(--blue-700);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--blue-500), var(--rose-500));
  box-shadow: 0 16px 30px rgba(59, 167, 248, 0.24);
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.brand-copy small {
  color: var(--muted);
  display: block;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-copy strong {
  display: block;
  font-size: 1.1rem;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-container {
  position: relative;
  flex: 1;
  min-width: 280px;
}

.search-shell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  background: color-mix(in srgb, var(--surface) 96%, #ffffff);
  border: 1px solid rgba(139, 208, 255, 0.3);
  border-radius: 999px;
  padding: 0 18px;
  box-shadow: 0 12px 28px rgba(59, 167, 248, 0.08);
}

.search-shell input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.search-shell input::placeholder {
  color: var(--muted);
}

.search-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-advanced {
  color: var(--blue-700);
  font-weight: 700;
  white-space: nowrap;
  font-size: 0.92rem;
}

.search-results {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  z-index: 1100;
  display: none;
  padding: 10px;
  background: var(--surface);
  border: 1px solid rgba(23, 32, 51, 0.08);
  border-radius: 20px;
  box-shadow: 0 18px 38px rgba(46, 90, 138, 0.16);
}

.search-results.show {
  display: block;
}

.search-result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--text);
}

.search-result-item:hover {
  background: var(--surface-soft);
}

.search-result-item small {
  color: var(--muted);
}

.theme-btn {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 16px;
  background: var(--surface);
  color: var(--blue-700);
  box-shadow: 0 10px 24px rgba(52, 107, 158, 0.08);
}

.login-btn {
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  color: #fff;
  font-weight: 700;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue-500), var(--rose-500));
  box-shadow: 0 14px 28px rgba(243, 93, 127, 0.22);
  max-width: min(44vw, 220px);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 0 1 auto;
}

.account-menu-shell {
  flex: 0 1 auto;
}

.account-dropdown-menu {
  min-width: 230px;
  padding: 10px;
  border: 1px solid rgba(23, 32, 51, 0.08);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 249, 255, 0.98));
  box-shadow: 0 24px 48px rgba(46, 90, 138, 0.18);
}

.account-dropdown-head {
  display: grid;
  gap: 4px;
  padding: 6px 8px 12px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(23, 32, 51, 0.08);
}

.account-dropdown-head small,
.account-dropdown-head span {
  color: var(--muted);
}

.account-dropdown-head small {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.68rem;
  font-weight: 800;
}

.account-dropdown-head strong {
  font-size: 1rem;
  line-height: 1.2;
}

.account-dropdown-head span {
  font-size: 0.84rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.account-dropdown-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  border-radius: 16px;
  padding: 10px 12px;
  color: var(--text);
  font-weight: 700;
}

.account-dropdown-menu .dropdown-item i {
  color: var(--blue-700);
}

.account-dropdown-menu .dropdown-item:hover,
.account-dropdown-menu .dropdown-item:focus {
  background: var(--surface-soft);
  color: var(--text);
}

.cookie-consent {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1080;
  width: min(420px, calc(100vw - 36px));
  padding: 16px 16px 14px;
  border-radius: 24px;
  border: 1px solid rgba(91, 145, 209, 0.18);
  background:
    radial-gradient(circle at top right, rgba(255, 196, 109, 0.38), transparent 36%),
    radial-gradient(circle at bottom left, rgba(95, 213, 195, 0.22), transparent 30%),
    linear-gradient(135deg, rgba(255, 251, 244, 0.98), rgba(238, 248, 255, 0.98));
  box-shadow: 0 18px 44px rgba(46, 90, 138, 0.16);
}

.cookie-consent[hidden] {
  display: none !important;
}

.cookie-consent__inner {
  display: grid;
  gap: 12px;
}

.cookie-consent__eyebrow {
  display: inline-block;
  margin-bottom: 4px;
  color: #b86a1a;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.68rem;
  font-weight: 800;
}

.cookie-consent h2 {
  margin: 0 0 4px;
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  line-height: 1.05;
}

.cookie-consent p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

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

.cookie-consent__actions .btn {
  min-height: 38px;
  width: 100%;
  font-size: 0.76rem;
  font-weight: 700;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
  white-space: nowrap;
}

.site-popup-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1150;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(12, 20, 32, 0.42);
  backdrop-filter: blur(10px);
}

.site-popup-backdrop[hidden] {
  display: none !important;
}

.site-popup-card {
  position: relative;
  width: min(100%, 560px);
  max-height: min(100vh - 44px, 760px);
  overflow: auto;
  padding: 28px;
  border-radius: 30px;
  border: 1px solid rgba(91, 145, 209, 0.18);
  background:
    radial-gradient(circle at top right, rgba(255, 196, 109, 0.26), transparent 34%),
    radial-gradient(circle at bottom left, rgba(95, 213, 195, 0.16), transparent 30%),
    linear-gradient(135deg, rgba(255, 251, 244, 0.99), rgba(238, 248, 255, 0.99));
  box-shadow: 0 28px 64px rgba(46, 90, 138, 0.18);
}

.site-popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.92);
  color: var(--muted);
  box-shadow: 0 10px 24px rgba(23, 32, 51, 0.14);
}

.site-popup-copy {
  min-width: 0;
}

.site-popup-copy small {
  display: inline-block;
  margin-bottom: 10px;
  color: #b86a1a;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  font-weight: 800;
}

.site-popup-copy h2 {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  line-height: 1.08;
}

.site-popup-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.offcanvas {
  border-right: 1px solid rgba(23, 32, 51, 0.08);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--surface) 98%, transparent),
    color-mix(in srgb, var(--surface-soft) 96%, transparent)
  );
}

.desktop-sidebar {
  position: sticky;
  top: 92px;
  height: auto;
  max-height: none;
  border-radius: 28px;
  padding: 28px 18px;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--surface) 98%, transparent),
    color-mix(in srgb, var(--surface-soft) 96%, transparent)
  );
  border: 1px solid rgba(23, 32, 51, 0.06);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.main-content {
  min-width: 0;
  display: grid;
  gap: 24px;
}

.page-card {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--surface) 98%, transparent),
    color-mix(in srgb, var(--surface-soft) 94%, transparent)
  );
  border: 1px solid rgba(23, 32, 51, 0.06);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 24px;
}

.page-card h1,
.page-card h2,
.page-card h3,
.page-card p:last-child {
  margin-bottom: 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.page-heading {
  margin: 0;
  font-size: clamp(2rem, 3.6vw, 3.15rem);
  line-height: 1.08;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.page-lead {
  margin: 16px 0 0;
  color: var(--muted);
  max-width: 760px;
  line-height: 1.7;
}

.page-card h2,
.page-card h3,
.page-card strong {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.part-accent {
  display: inline-flex;
  align-items: baseline;
  gap: 0.18em;
  font-weight: 850;
  line-height: 1.05;
}

.part-accent-prefix {
  color: var(--blue-700);
  font-size: 0.94em;
  letter-spacing: 0.01em;
}

.part-accent-number {
  color: #d4572e;
  font-size: 1.08em;
  font-weight: 900;
}

body.dark-theme .part-accent-prefix {
  color: #8fc5ff;
}

body.dark-theme .part-accent-number {
  color: #ffba69;
}

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

.side-nav {
  min-height: 0;
}

.side-nav a,
.side-nav button {
  width: 100%;
  text-align: left;
  border: 0;
  padding: 14px 16px;
  color: var(--text);
  background: transparent;
  border-radius: 16px;
  font-weight: 700;
}

.side-nav a:hover,
.side-nav button:hover {
  background: rgba(59, 167, 248, 0.08);
}

.nav-icon {
  width: 18px;
  display: inline-block;
  text-align: center;
  margin-right: 12px;
  color: var(--blue-700);
}

.sub-links a {
  display: block;
  padding: 10px 18px;
  color: var(--muted);
  font-weight: 600;
}

@media (min-width: 992px) and (max-height: 820px) {
  .desktop-sidebar {
    top: 84px;
    padding: 22px 14px;
    border-radius: 24px;
  }

  .side-nav {
    gap: 0.35rem !important;
  }

  .side-nav a,
  .side-nav button {
    padding: 12px 14px;
  }

  .sub-links a {
    padding: 8px 16px;
  }
}

.login-modal .modal-content {
  border: 0;
  border-radius: 30px;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff, #f4f9ff);
  box-shadow: 0 28px 70px rgba(9, 17, 30, 0.28);
}

.login-hero {
  background: linear-gradient(135deg, rgba(59, 167, 248, 0.18), rgba(243, 93, 127, 0.12));
  padding: 28px 28px 18px;
}

.auth-google-slot {
  display: grid;
  gap: 14px;
  justify-items: center;
}

.auth-google-slot::after {
  content: "Or continue with email";
  display: block;
  position: relative;
  order: 4;
  text-align: center;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.auth-google-slot::before {
  content: "";
  display: block;
  order: 3;
  height: 1px;
  margin-top: -23px;
  background: linear-gradient(
    90deg,
    rgba(59, 167, 248, 0),
    rgba(59, 167, 248, 0.2) 14%,
    rgba(59, 167, 248, 0.2) 36%,
    rgba(59, 167, 248, 0) 48%,
    rgba(59, 167, 248, 0) 52%,
    rgba(243, 93, 127, 0.2) 64%,
    rgba(243, 93, 127, 0.2) 86%,
    rgba(243, 93, 127, 0) 100%
  );
}

.auth-google-slot[data-google-state="message"]::before,
.auth-google-slot[data-google-state="message"]::after {
  display: none;
}

.auth-google-slot > div[role="button"],
.auth-google-slot > div > div[role="button"],
.auth-google-slot iframe {
  width: min(100%, 360px) !important;
  max-width: 100%;
}

.auth-google-slot iframe {
  min-height: 44px;
}

.ad-banner {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 24px 26px;
  border-radius: 26px;
  background:
    radial-gradient(circle at top right, rgba(243, 93, 127, 0.18), transparent 26%),
    radial-gradient(circle at bottom left, rgba(59, 167, 248, 0.22), transparent 28%),
    linear-gradient(135deg, #f8fbff, #eef6ff);
  border: 1px solid rgba(59, 167, 248, 0.16);
  box-shadow: 0 20px 36px rgba(45, 97, 146, 0.1);
  overflow: hidden;
}

.ad-banner::after {
  content: "Ad";
  position: absolute;
  top: 16px;
  right: 18px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(23, 32, 51, 0.08);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ad-banner-copy {
  max-width: 680px;
  min-width: 0;
}

.ad-banner-copy small {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--blue-700);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ad-banner-copy h2 {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 2vw, 1.9rem);
  line-height: 1.1;
}

.ad-banner-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 575.98px) {
  .topbar.is-hidden-on-scroll {
    transform: translateY(-100%);
  }

  .topbar.is-visible-on-scroll {
    transform: translateY(0);
  }

  .ad-banner {
    padding: 20px 18px;
    border-radius: 22px;
  }
}

.footer-wrap {
  margin-top: 20px;
  padding: 12px 0 20px;
}

.footer-panel {
  padding: 28px 30px;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(243, 248, 255, 0.98));
  border: 1px solid rgba(59, 167, 248, 0.12);
  box-shadow: var(--shadow);
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.social-links a {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--blue-700);
  font-size: 1.05rem;
}

.footer-links a {
  color: var(--muted);
  font-weight: 700;
  margin-left: 24px;
}

body.dark-theme .footer-panel {
  background: linear-gradient(180deg, rgba(16, 27, 43, 0.96), rgba(11, 21, 34, 0.98));
  border-color: rgba(147, 167, 199, 0.12);
  box-shadow: 0 28px 54px rgba(0, 0, 0, 0.3);
}

body.dark-theme .ad-banner {
  background:
    radial-gradient(circle at top right, rgba(243, 93, 127, 0.16), transparent 24%),
    radial-gradient(circle at bottom left, rgba(59, 167, 248, 0.18), transparent 28%),
    linear-gradient(135deg, rgba(18, 32, 51, 0.96), rgba(14, 25, 40, 0.98));
  border-color: rgba(147, 167, 199, 0.14);
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.28);
}

body.dark-theme .ad-banner::after {
  background: rgba(147, 167, 199, 0.12);
  color: #c8d8ef;
}

body.dark-theme .ad-banner-copy small {
  color: #8fc5ff;
}

body.dark-theme .ad-banner-copy h2 {
  color: #edf4ff;
}

body.dark-theme .ad-banner-copy p {
  color: #9fb4d5;
}

body.dark-theme .social-links a {
  background: rgba(29, 51, 82, 0.7);
  color: #d6e7ff;
}

body.dark-theme .footer-links a {
  color: #cbdaf0;
}

@media (min-width: 992px) {
  .desktop-sidebar-toggle {
    display: inline-flex;
  }

  .page-layout {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  body.desktop-sidebar-collapsed .page-layout {
    grid-template-columns: 74px minmax(0, 1fr);
  }

  body.desktop-sidebar-collapsed .desktop-sidebar {
    display: flex !important;
    padding: 18px 10px;
    border-radius: 22px;
  }

  body.desktop-sidebar-collapsed .desktop-sidebar .side-nav {
    align-items: center;
  }

  body.desktop-sidebar-collapsed .desktop-sidebar .side-nav a,
  body.desktop-sidebar-collapsed .desktop-sidebar .side-nav button {
    width: 52px;
    height: 52px;
    padding: 0;
    justify-content: center !important;
    align-items: center !important;
    text-align: center;
    overflow: hidden;
    white-space: nowrap;
    font-size: 0;
  }

  body.desktop-sidebar-collapsed .desktop-sidebar .side-nav a,
  body.desktop-sidebar-collapsed .desktop-sidebar .side-nav button,
  body.desktop-sidebar-collapsed .desktop-sidebar .side-nav button span {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  body.desktop-sidebar-collapsed .desktop-sidebar .side-nav button span {
    width: 18px;
    overflow: hidden;
    font-size: 0;
  }

  body.desktop-sidebar-collapsed .desktop-sidebar .nav-icon {
    margin-right: 0;
    font-size: 1rem;
    flex: 0 0 18px;
  }

  body.desktop-sidebar-collapsed .desktop-sidebar .collapse-indicator,
  body.desktop-sidebar-collapsed .desktop-sidebar .side-nav button > i:not(.nav-icon) {
    display: none;
  }

  body.desktop-sidebar-collapsed .desktop-sidebar .sub-links {
    display: grid !important;
    gap: 0.5rem;
  }

  body.desktop-sidebar-collapsed .desktop-sidebar .sub-links a,
  body.desktop-sidebar-collapsed .desktop-sidebar .sub-links button {
    padding: 0;
    color: var(--text);
  }

  .menu-trigger {
    display: none;
  }
}

@media (max-width: 991.98px) {
  .desktop-sidebar-toggle {
    display: none !important;
  }
}

@media (max-width: 767.98px) {
  .cookie-consent {
    left: 14px;
    right: 14px;
    bottom: 14px;
    width: auto;
    padding: 14px;
    border-radius: 20px;
  }

  .cookie-consent__actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .topbar-inner {
    flex-wrap: wrap;
    gap: 10px;
  }

  .topbar-brand {
    min-width: 0;
    flex: 1 1 0;
  }

  .search-container {
    order: 3;
    width: 100%;
    min-width: 100%;
  }

  .login-btn {
    max-width: min(42vw, 170px);
    padding: 0 16px;
  }

  .page-card {
    padding: 20px;
    border-radius: 24px;
  }

  .footer-panel {
    padding: 20px;
    border-radius: 24px;
  }

  .footer-links a {
    margin: 0 14px 0 0;
  }

  .site-popup-backdrop {
    padding: 14px;
  }

  .site-popup-card {
    padding: 22px 18px 18px;
    border-radius: 24px;
    max-height: min(100vh - 28px, 720px);
  }
}

@media (max-width: 575.98px) {
  .scroll-top-btn {
    right: max(14px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
    width: 48px;
    height: 48px;
    border-radius: 16px;
  }

  .topbar-inner {
    gap: 8px;
  }

  .topbar-brand {
    gap: 10px;
  }

  .brand-mark,
  .menu-trigger,
  .theme-btn {
    width: 44px;
    height: 44px;
  }

  .brand-copy small {
    display: none;
  }

  .brand-copy strong {
    font-size: 0.98rem;
  }

  .login-btn {
    max-width: min(40vw, 148px);
    font-size: 0.92rem;
  }
}
