body.theme-v3-light {
  --wti-light-nav-blue: #1e4983;
  --wti-light-link: #00a2ff;
  --wti-light-footer-green: #465c03;
  --wti-light-panel-border: #b9c9fe;
}

body.theme-v3-light {
  background: linear-gradient(180deg, #f4f9ff 0%, #ecf5ff 100%);
  color: #10253f;
}

body.theme-v3-dark {
  background:
    linear-gradient(180deg, rgba(255, 170, 0, 0.05), rgba(0, 0, 0, 0)),
    linear-gradient(135deg, #090a0f 0%, #11161f 55%, #0a0c12 100%);
  color: #f8fafc;
}

.site-search {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
}

.site-search-input {
  flex: 1 1 auto;
  padding: 4px 8px;
  border: 1px solid #c0c0c0;
  border-right: 0;
  font-size: 12px;
  box-sizing: border-box;
  height: 30px;
  border-top-left-radius: 15px;
  border-bottom-left-radius: 15px;
}

.site-search-button {
  flex: 0 0 auto;
  width: 30px;
  padding: 0;
  border: 1px solid #c0c0c0;
  background: #f4f4f4;
  font-size: 14px;
  cursor: pointer;
  line-height: 28px;
  height: 30px;
  border-top-right-radius: 15px;
  border-bottom-right-radius: 15px;
}

.site-search-button:hover { background: #e0e0e0; }
.site-search-button:active { background: #d0d0d0; }

.site-search-suggest {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 2px;
  background: #fff;
  border: 1px solid #cfcfcf;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  z-index: 9999;
  max-height: 320px;
  overflow: auto;
}

.site-search-suggest-group {
  padding: 6px 8px;
  font-weight: bold;
  background: #f6f6f6;
  border-bottom: 1px solid #e6e6e6;
}

.site-search-suggest-item {
  padding: 6px 8px;
  cursor: pointer;
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.site-search-suggest-item:hover,
.site-search-suggest-item.active {
  background: #eaf2ff;
}

.site-search-suggest-type {
  display: inline-block;
  min-width: 70px;
  font-size: 11px;
  text-transform: uppercase;
  color: #666;
}

.site-search-suggest-name {
  flex: 1 1 auto;
}

.screen-reader-text {
  position: absolute;
  left: -1000em;
}

.v3-logo {
  max-height: 82px;
}

.v3-header,
.v3-card,
.v3-footer,
.v3-nav {
  border: 1px solid transparent;
}

body.theme-v3-light .v3-header,
body.theme-v3-light .v3-card,
body.theme-v3-light .v3-footer {
  background: #ffffff;
  border-color: var(--wti-light-panel-border);
  box-shadow: 0 8px 24px rgba(30, 73, 131, 0.09);
}

body.theme-v3-light .v3-nav {
  background: linear-gradient(90deg, var(--wti-light-nav-blue) 0%, #2876bf 55%, #3ac8e8 100%);
  border-color: #2e7abf;
}

body.theme-v3-light .v3-nav .nav-link {
  color: #ffffff;
  font-weight: 600;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

body.theme-v3-light a {
  color: var(--wti-light-link);
}

body.theme-v3-light .v3-page-title {
  color: var(--wti-light-nav-blue);
}

body.theme-v3-light .v3-footer {
  color: var(--wti-light-footer-green);
}

body.theme-v3-light .v3-footer a {
  color: #1e4983;
  font-weight: 600;
}

body.theme-v3-dark .v3-header,
body.theme-v3-dark .v3-card,
body.theme-v3-dark .v3-footer {
  background: linear-gradient(180deg, #161a20 0%, #11151c 100%);
  border-color: #3f4d56;
  box-shadow: 0 0 0 1px rgba(255, 208, 64, 0.14), 0 0 10px rgba(255, 173, 51, 0.18), 0 0 18px rgba(64, 224, 255, 0.12);
}

body.theme-v3-dark .v3-nav {
  background: linear-gradient(90deg, #6a1717 0%, #7b1f1f 50%, #8b2f1f 100%);
  border-color: #963c24;
}

body.theme-v3-dark .v3-nav .nav-link {
  color: #ffe083;
  text-shadow: 0 0 5px rgba(255, 136, 58, 0.62);
  font-weight: 600;
}

body.theme-v3-dark a {
  color: #78f6ff;
}

body.theme-v3-dark h1,
body.theme-v3-dark h2,
body.theme-v3-dark h3 {
  color: #ffd59a;
  text-shadow: 0 0 6px rgba(255, 174, 74, 0.42);
}

body.theme-v3-dark .theme-slider-wrap {
  background: rgba(255, 255, 255, 0.06);
}

.v3-page-title {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  font-weight: 800;
  line-height: 1.15;
}

.v3-entry h2 {
  font-size: 1.25rem;
  font-weight: 650;
}

.v3-entry h3 {
  font-size: 1.1rem;
  font-weight: 650;
}

:is(.v3-entry, .v3-card) a.vote_up_an,
:is(.v3-entry, .v3-card) a.vote_down_an,
:is(.v3-entry, .v3-card) a.vote_up_et,
:is(.v3-entry, .v3-card) a.vote_down_et {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:26px;
  height:26px;
  margin-left:6px;
  border-radius:50%;
  border:1px solid #8eaad1;
  text-decoration:none;
  font-size:0;
  background: linear-gradient(180deg, #f8fbff 0%, #e6eefb 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 1px 2px rgba(30, 73, 131, 0.18);
}

:is(.v3-entry, .v3-card) a.vote_up_an::before,
:is(.v3-entry, .v3-card) a.vote_up_et::before {
  content:"\25B2";
  font-size:12px;
  color:#2f8a35;
}

:is(.v3-entry, .v3-card) a.vote_down_an::before,
:is(.v3-entry, .v3-card) a.vote_down_et::before {
  content:"\25BC";
  font-size:12px;
  color:#b24a2f;
}

:is(.v3-entry, .v3-card) a.vote_up_an:hover,
:is(.v3-entry, .v3-card) a.vote_up_et:hover {
  background:#e9faef;
  border-color:#149957;
}

:is(.v3-entry, .v3-card) a.vote_down_an:hover,
:is(.v3-entry, .v3-card) a.vote_down_et:hover {
  background:#ffefed;
  border-color:#b94437;
}

.vote-spinner {
  display:inline-block;
  padding:5px 10px;
  border-radius:999px;
  border:1px solid #9fb6d8;
  background:#edf4ff;
  color:#27496d;
  font-size:11px;
  font-weight:700;
}

body.theme-v3-dark .vote-spinner {
  border-color:#6b7f8d;
  background:#1d2732;
  color:#e7eef7;
}

body.theme-v3-dark :is(.v3-entry, .v3-card) a.vote_up_an,
body.theme-v3-dark :is(.v3-entry, .v3-card) a.vote_down_an,
body.theme-v3-dark :is(.v3-entry, .v3-card) a.vote_up_et,
body.theme-v3-dark :is(.v3-entry, .v3-card) a.vote_down_et {
  border-color:#f2994a;
  background: linear-gradient(180deg, #232933 0%, #171c24 100%);
  box-shadow: 0 0 6px rgba(255, 153, 51, 0.35), 0 0 12px rgba(80, 235, 255, 0.18);
}

body.theme-v3-dark :is(.v3-entry, .v3-card) a.vote_up_an::before,
body.theme-v3-dark :is(.v3-entry, .v3-card) a.vote_up_et::before {
  color:#6cf0a5;
  text-shadow: 0 0 5px rgba(108, 240, 165, 0.45);
}

body.theme-v3-dark :is(.v3-entry, .v3-card) a.vote_down_an::before,
body.theme-v3-dark :is(.v3-entry, .v3-card) a.vote_down_et::before {
  color:#ff9e7d;
  text-shadow: 0 0 5px rgba(255, 158, 125, 0.45);
}

body.theme-v3-dark :is(.v3-entry, .v3-card) a.vote_up_an:hover,
body.theme-v3-dark :is(.v3-entry, .v3-card) a.vote_up_et:hover {
  border-color:#7cf7b2;
  box-shadow: 0 0 8px rgba(124, 247, 178, 0.5), 0 0 14px rgba(80, 235, 255, 0.22);
}

body.theme-v3-dark :is(.v3-entry, .v3-card) a.vote_down_an:hover,
body.theme-v3-dark :is(.v3-entry, .v3-card) a.vote_down_et:hover {
  border-color:#ffb49a;
  box-shadow: 0 0 8px rgba(255, 180, 154, 0.52), 0 0 14px rgba(255, 153, 51, 0.2);
}

.v3-nav .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.35);
}

.v3-nav .navbar-toggler-icon {
  filter: invert(1);
}

@media (max-width: 991.98px) {
  .container.py-3 {
    padding-top: .6rem !important;
    padding-bottom: .8rem !important;
  }

  .v3-header {
    padding: .75rem !important;
    margin-bottom: .65rem !important;
  }

  .v3-logo {
    max-height: 64px;
  }

  .v3-nav {
    border-radius: 1rem !important;
    margin-bottom: .65rem !important;
    padding: .45rem .65rem !important;
  }

  .v3-nav .navbar-nav {
    margin-top: .45rem;
    gap: .2rem !important;
  }

  .v3-nav .nav-link {
    padding: .55rem .65rem;
    border-radius: .55rem;
  }

  .v3-card {
    padding: .85rem !important;
  }

  .v3-page-title {
    margin-bottom: .65rem !important;
    font-size: 1.45rem;
  }

  :is(.v3-entry, .v3-card) a.vote_up_an,
  :is(.v3-entry, .v3-card) a.vote_down_an,
  :is(.v3-entry, .v3-card) a.vote_up_et,
  :is(.v3-entry, .v3-card) a.vote_down_et {
    width: 30px;
    height: 30px;
    margin-left: 8px;
  }

  :is(.v3-entry, .v3-card) a.vote_up_an::before,
  :is(.v3-entry, .v3-card) a.vote_down_an::before,
  :is(.v3-entry, .v3-card) a.vote_up_et::before,
  :is(.v3-entry, .v3-card) a.vote_down_et::before {
    font-size: 14px;
  }
}

