.tw-mini-btn {
  height: 40px;
  min-width: 52px;
  padding: 0 12px;
  border: 1px solid rgba(63, 227, 232, 0.35);
  border-radius: 12px;
  background: rgba(2, 20, 54, 0.86);
  color: #d8f7ff;
  font-weight: 700;
  cursor: pointer;
}

.tw-inline-lang {
  margin-right: 8px;
}

.tw-product-controls {
  position: fixed;
  top: 14px;
  right: 16px;
  z-index: 10001;
  display: flex;
  gap: 8px;
}

body.tw-product-has-header {
  padding-top: 76px;
}

.tw-product-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10020;
  border-bottom: 1px solid rgba(63, 227, 232, 0.2);
  background: rgba(3, 18, 42, 0.88);
  backdrop-filter: blur(12px);
}

.tw-product-header-inner {
  max-width: 1320px;
  margin: 0 auto;
  min-height: 64px;
  padding: 10px 16px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
}

.tw-product-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tw-product-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(63, 227, 232, 0.34);
  color: #86f4ff;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 0 16px rgba(63, 227, 232, 0.24);
}

.tw-product-back {
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(63, 227, 232, 0.34);
  background: rgba(4, 24, 58, 0.8);
  color: #d8f7ff;
  font-weight: 700;
  cursor: pointer;
}

.tw-product-nav {
  display: flex;
  justify-content: center;
  gap: 18px;
}

.tw-product-nav a {
  color: rgba(220, 247, 255, 0.9);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.tw-product-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tw-product-footer {
  margin-top: 48px;
  border-top: 1px solid rgba(63, 227, 232, 0.18);
  background: rgba(2, 16, 38, 0.4);
}

.tw-product-footer-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 20px 16px 26px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 16px;
  align-items: center;
}

.tw-footer-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tw-footer-name {
  color: #eaf9ff;
  font-weight: 700;
}

.tw-footer-role,
.tw-footer-meta {
  color: rgba(220, 245, 255, 0.72);
  font-size: 13px;
}

.tw-footer-links {
  display: flex;
  gap: 14px;
  align-items: center;
}

.tw-footer-links a {
  color: rgba(220, 247, 255, 0.84);
  text-decoration: none;
  font-size: 13px;
}

.tw-legal-links {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  justify-content: center;
  font-size: 12px;
}

.tw-legal-links a {
  color: rgba(220, 247, 255, 0.74);
  text-decoration: none;
  border-bottom: 1px dashed rgba(90, 225, 235, 0.35);
}

.tw-legal-links a:hover {
  color: #8ff6ff;
  border-bottom-color: rgba(143, 246, 255, 0.8);
}

.tw-legal-disclaimer {
  width: 100%;
  margin-top: 6px;
  color: rgba(220, 247, 255, 0.56);
  font-size: 12px;
  text-align: center;
}

.tw-nap {
  width: 100%;
  margin-top: 8px;
  color: rgba(220, 247, 255, 0.72);
  font-size: 12px;
  text-align: center;
  line-height: 1.5;
}

.tw-about-crystal-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tw-about-crystal-list li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 10px;
}

.tw-about-crystal-list li::before {
  content: '✦';
  position: absolute;
  left: 0;
  top: 0;
  color: #5eeaf0;
  opacity: 0.9;
  font-size: 11px;
  line-height: 1.5;
}

.tw-about-metrics {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 12px;
}

.tw-about-metric {
  border: 1px solid rgba(63, 227, 232, 0.24);
  border-radius: 12px;
  background: rgba(2, 20, 54, 0.42);
  padding: 10px 12px;
  color: #8df4ff;
  font-weight: 600;
  font-size: 18px;
  line-height: 1.25;
}

.tw-about-photo-wrap {
  align-self: start !important;
}

.tw-about-photo {
  transform: translateY(-40px);
}

@media (max-width: 920px) {
  .tw-product-header-inner {
    grid-template-columns: 1fr auto;
    gap: 8px;
  }

  .tw-product-nav {
    display: none;
  }

  .tw-product-footer-inner {
    grid-template-columns: 1fr;
    gap: 10px;
    text-align: center;
  }

  .tw-footer-links {
    justify-content: center;
    flex-wrap: wrap;
  }

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

  .tw-about-metric {
    font-size: 18px;
  }

  .tw-about-photo {
    transform: none;
  }
}

#solutions .tw-solution-card-patched {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

#solutions .tw-card-icon-wrap {
  width: 184px;
  height: 184px;
  border-radius: 24px;
  border: 2px solid rgba(63, 227, 232, 0.35);
  background: rgba(3, 22, 56, 0.55);
  box-shadow: 0 0 30px rgba(63, 227, 232, 0.25), inset 0 0 18px rgba(63, 227, 232, 0.12);
  padding: 10px;
  flex: 0 0 auto;
}

#solutions .tw-solution-sprite {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  filter: drop-shadow(0 0 18px rgba(63, 227, 232, 0.75)) contrast(1.08) saturate(1.08) brightness(1.02);
  mix-blend-mode: normal;
}

html:not(.dark) #solutions .tw-card-icon-wrap {
  background: rgba(232, 250, 255, 0.75);
  border-color: rgba(22, 138, 179, 0.55);
  box-shadow: 0 0 18px rgba(26, 146, 183, 0.28), inset 0 0 14px rgba(9, 87, 115, 0.12);
}

html:not(.dark) #solutions .tw-solution-sprite {
  filter: drop-shadow(0 0 12px rgba(0, 150, 210, 0.45)) contrast(1.12) saturate(1.15) brightness(0.98);
  mix-blend-mode: normal;
}

@media (max-width: 1024px) {
  #solutions .tw-card-icon-wrap {
    width: 154px;
    height: 154px;
  }
}

.tw-tech-logos {
  display: grid;
  grid-template-columns: repeat(6, minmax(110px, 1fr));
  gap: 10px;
  margin: 8px 0 14px;
}

.tw-tech-logo {
  min-height: 56px;
  border-radius: 12px;
  border: 1px solid rgba(63, 227, 232, 0.35);
  background: rgba(3, 22, 56, 0.46);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #d9f7ff;
  font-weight: 600;
  font-size: 14px;
}

.tw-tech-dot {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(99, 235, 240, 0.55);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #b4f6ff;
  background: rgba(30, 112, 136, 0.35);
}

html:not(.dark) .tw-tech-logo {
  background: rgba(239, 250, 255, 0.86);
  color: #0b3e52;
  border-color: rgba(12, 125, 162, 0.4);
}

@media (max-width: 1100px) {
  .tw-tech-logos {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }
}

.tw-product-footer {
  margin-top: 40px;
  padding: 24px 16px;
  text-align: center;
  border-top: 1px solid rgba(63, 227, 232, 0.2);
  color: rgba(220, 245, 255, 0.8);
  font-size: 13px;
}

.tw-cookie {
  position: fixed;
  left: 14px;
  bottom: 14px;
  z-index: 9998;
  max-width: 360px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(63, 227, 232, 0.28);
  background: rgba(3, 18, 42, 0.9);
  color: #d6f2ff;
  font-size: 12px;
  line-height: 1.35;
}

.tw-cookie a {
  color: #5eeaf0;
  text-decoration: underline;
}

.tw-cookie button {
  margin-left: 8px;
  border: 1px solid rgba(63, 227, 232, 0.45);
  background: rgba(63, 227, 232, 0.2);
  color: #e9feff;
  border-radius: 8px;
  padding: 4px 10px;
  font-weight: 700;
  cursor: pointer;
}

.tw-toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 10000;
  max-width: 360px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(63, 227, 232, 0.35);
  background: rgba(4, 22, 52, 0.94);
  color: #e5fbff;
  font-size: 13px;
  transform: translateY(10px);
  opacity: 0;
  transition: transform 0.24s ease, opacity 0.24s ease;
}

.tw-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.tw-toast.ok {
  border-color: rgba(70, 224, 157, 0.45);
}

.tw-toast.err {
  border-color: rgba(224, 99, 99, 0.45);
}

/* SmartWidget brand fit for anmalishev.ru */
.gcw-root {
  --gcw-primary: #0aa9c0 !important;
  --gcw-btn: #0f7fa3 !important;
  --gcw-accent: #0aa9c0 !important;
}

.gcw-root .gcw-header {
  background: linear-gradient(135deg, #0c3f67 0%, #0aa9c0 100%) !important;
  min-height: 84px !important;
  height: auto !important;
  padding: 8px 14px !important;
}

.gcw-root .gcw-send {
  background: linear-gradient(135deg, #0f7fa3 0%, #11b9cf 100%) !important;
  color: #f3fdff !important;
}

.gcw-root .gcw-chip,
.gcw-root .gcw-callback-style {
  border-color: rgba(10, 169, 192, 0.42) !important;
  color: #0f6f9d !important;
}

.gcw-root .gcw-panel {
  border-color: rgba(111, 199, 255, 0.45) !important;
  box-shadow: 0 26px 70px rgba(3, 24, 58, 0.38) !important;
}

.gcw-root .gcw-launcher {
  width: 62px !important;
  min-width: 62px !important;
  height: 62px !important;
  border-radius: 16px !important;
  padding: 0 !important;
  background: linear-gradient(135deg, #0f5f8e 0%, #10b8cf 100%) !important;
  box-shadow: 0 16px 36px rgba(8, 90, 136, 0.45) !important;
  position: relative !important;
}

.gcw-root .gcw-launcher .gcw-launcher-icon {
  font-size: 24px !important;
  line-height: 1 !important;
  transform: translateY(-5px);
  color: #e8fcff !important;
}

.gcw-root .gcw-launcher::after {
  content: 'AM AI';
  position: absolute;
  left: 50%;
  bottom: 7px;
  transform: translateX(-50%);
  font-size: 9px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #e8fcff;
  opacity: 0.95;
}

/* Home hero tuning */
body:not(.tw-product-has-header) #root > div > header {
  min-height: 84px !important;
}

body:not(.tw-product-has-header) #root > div > header > div,
body:not(.tw-product-has-header) #root > div > header .container {
  min-height: 84px !important;
  height: 84px !important;
}

body:not(.tw-product-has-header) #root main > section:first-of-type {
  padding-top: 74px !important;
}

body:not(.tw-product-has-header) #root main > section:first-of-type > .container,
body:not(.tw-product-has-header) #root main > section:first-of-type > div > .container {
  transform: translateY(-44px);
}

body:not(.tw-product-has-header) #root main > section:first-of-type::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 45%;
  width: min(42vw, 520px);
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  border: 1px solid rgba(88, 222, 235, 0.14);
  box-shadow: inset 0 0 0 1px rgba(88, 222, 235, 0.05);
  pointer-events: none;
  z-index: 1;
}

/* Light theme readability fixes */
html:not(.dark) body {
  color: #123148 !important;
  background: linear-gradient(180deg, #f4fbff 0%, #eaf7ff 45%, #f8fdff 100%) !important;
}

html:not(.dark) .glass-card,
html:not(.dark) [class*="glass-card"] {
  background: rgba(255, 255, 255, 0.84) !important;
  border-color: rgba(33, 132, 168, 0.35) !important;
  box-shadow: 0 10px 28px rgba(23, 100, 132, 0.12) !important;
}

html:not(.dark) #root main section h1,
html:not(.dark) #root main section h2,
html:not(.dark) #root main section h3 {
  color: #103247 !important;
}

html:not(.dark) #root main section p,
html:not(.dark) #root main section li,
html:not(.dark) #root main section span,
html:not(.dark) #root main section a {
  color: #2a4e64 !important;
}

html:not(.dark) #root main section [class*="text-primary"],
html:not(.dark) #root header [class*="text-primary"] {
  color: #0b8eb3 !important;
}

html:not(.dark) #root header {
  background: rgba(245, 252, 255, 0.92) !important;
  border-bottom-color: rgba(29, 121, 157, 0.18) !important;
}

html:not(.dark) #root header a,
html:not(.dark) #root header button,
html:not(.dark) #root header span {
  color: #13425a !important;
}

html:not(.dark) .tw-mini-btn {
  background: rgba(255, 255, 255, 0.88) !important;
  color: #0f4761 !important;
  border-color: rgba(17, 125, 164, 0.45) !important;
}

html:not(.dark) .tw-cookie {
  background: rgba(248, 253, 255, 0.96) !important;
  color: #17384e !important;
  border-color: rgba(18, 122, 161, 0.35) !important;
}

html:not(.dark) .tw-cookie a {
  color: #0b86ab !important;
}

.tw-faq {
  margin: 28px auto 22px;
  max-width: 1200px;
  padding: 0 20px;
  position: relative;
  z-index: 5;
}

.tw-faq-inner {
  border: 1px solid rgba(63, 227, 232, 0.25);
  background: rgba(8, 24, 44, 0.48);
  border-radius: 16px;
  padding: 20px;
}

.tw-faq-inner h2 {
  margin: 0 0 12px;
  font-size: 24px;
  color: #eaf6ff;
}

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

.tw-faq-item {
  border: 1px solid rgba(63, 227, 232, 0.22);
  border-radius: 12px;
  background: rgba(9, 35, 58, 0.42);
  padding: 10px 12px;
}

.tw-faq-item summary {
  display: block;
  cursor: pointer;
  font-weight: 700;
  color: #dbf4ff;
  outline: none;
  pointer-events: auto !important;
}

.tw-faq-item p {
  margin: 8px 0 0;
  color: #b6d2e3;
  line-height: 1.6;
}

html:not(.dark) .tw-faq-inner {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(10, 169, 192, 0.28);
}

html:not(.dark) .tw-faq-inner h2 {
  color: #08324d;
}

html:not(.dark) .tw-faq-item {
  background: rgba(248, 252, 255, 0.98);
  border-color: rgba(10, 169, 192, 0.24);
}

html:not(.dark) .tw-faq-item summary {
  color: #0b3656;
}

html:not(.dark) .tw-faq-item p,
html:not(.dark) .tw-nap {
  color: #3d5a70;
}

.tw-faq,
.tw-faq * {
  pointer-events: auto !important;
}

/* Hide theme toggle on main header and product pages */
#theme-toggle,
#tw-product-theme-inline {
  display: none !important;
}

/* === SmartWidget brand lock (anmalishev.ru) === */
.gcw-root .gcw-launcher {
  overflow: hidden !important;
}

.gcw-root .gcw-launcher::after {
  content: none !important;
}

.gcw-root .gcw-launcher .gcw-launcher-icon {
  position: absolute !important;
  left: 7px !important;
  top: 7px !important;
  transform: none !important;
  color: #e8fcff !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: 0.03em !important;
  line-height: 1 !important;
  z-index: 2 !important;
}

.gcw-root .gcw-launcher .gcw-launcher-text {
  font-size: 11px !important;
  font-weight: 800 !important;
}

.gcw-root .gcw-launcher .tw-gcw-crystal-launcher {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  width: 64px !important;
  height: 64px !important;
  transform: translate(-37%, -56%) !important;
  object-fit: contain !important;
  filter: drop-shadow(0 3px 8px rgba(0, 16, 45, 0.45)) !important;
  pointer-events: none !important;
  z-index: 3 !important;
}

/* === SmartWidget AM AI final scale/duplicate lock === */
.gcw-root .gcw-launcher {
  width: 52px !important;
  min-width: 52px !important;
  height: 52px !important;
  border-radius: 14px !important;
}

.gcw-root .gcw-launcher .gcw-launcher-text {
  display: none !important;
}

.gcw-root .gcw-launcher .gcw-launcher-icon {
  display: none !important;
}

.gcw-root .gcw-launcher .tw-gcw-crystal-launcher {
  width: 72px !important;
  height: 72px !important;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  object-position: center center !important;
}

.gcw-root .gcw-header .gcw-brand {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.gcw-root .gcw-header .gcw-logo {
  width: 92px !important;
  height: 92px !important;
  object-fit: contain !important;
}

.gcw-root .gcw-header .gcw-title {
  display: none !important;
}

.gcw-root .gcw-header .gcw-brand {
  margin-top: -6px !important;
  margin-bottom: -6px !important;
}
