/* CyberTools visual overhaul 3.5.22 (+ 3.5.24/25 AA contrast)
   Lab-bench catalog: keep #4c3ff2, rebuild surfaces/type/cards.
   Loads AFTER ct-polish.css. Do not change routes or tool slugs. */

:root {
  --ct-ink: #141820;
  --ct-muted: #5c6470;
  --ct-paper: #f3f4f7;
  --ct-elev: #ffffff;
  --ct-line: #6b7280;
  --ct-brand: #4c3ff2;
  --ct-brand-ink: #3a30c9;
  --ct-font: "Outfit", "Rubik", ui-sans-serif, system-ui, sans-serif;
  --ct-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --ct-radius: 12px;
  --ct-radius-sm: 8px;
}

body.dark {
  --ct-ink: #eceef3;
  --ct-muted: #9aa3b2;
  --ct-paper: #12151b;
  --ct-elev: #1a1e26;
  --ct-line: #8b93a1;
  --ct-brand-ink: #b7b0ff;
}

html,
body {
  font-family: var(--ct-font);
  background: var(--ct-paper);
  color: var(--ct-ink);
}

body.dark,
body.dark .main-section {
  background-color: var(--ct-paper) !important;
  color: var(--ct-ink);
}

/* Header: flatter bench rail */
header.mainPadding {
  margin-bottom: 28px !important;
  padding-bottom: 8px;
  background: color-mix(in srgb, var(--ct-paper) 92%, transparent) !important;
  backdrop-filter: blur(10px) saturate(1.08);
  border-bottom: 1px solid var(--ct-line) !important;
  box-shadow: none !important;
}

.hero-section {
  text-align: left;
  max-width: 40rem;
  margin: 0 0 0.35rem;
}

.hero-section .hero-small-title {
  text-transform: none;
  letter-spacing: 0.01em;
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--ct-muted);
}

body.dark .hero-section .hero-small-title {
  color: var(--ct-muted);
}

.hero-section h1,
.hero-section .h1 {
  max-width: 18ch;
  font-size: clamp(1.85rem, 2.2vw + 1rem, 2.6rem);
  letter-spacing: -0.035em;
  line-height: 1.12;
  font-weight: 650;
  text-wrap: balance;
}

/* Search as primary instrument */
.main-search-sec,
.ct-search-wrap {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  max-width: min(40rem, 100%) !important;
  width: 100%;
  margin-bottom: 1.75rem;
}

.ct-search-row {
  width: 100%;
}

.main-search-sec input {
  height: 50px;
  border-radius: var(--ct-radius) !important;
  border: 1px solid var(--ct-line) !important;
  box-shadow: none !important;
  font-weight: 500;
}

.main-search-sec input:focus,
.main-search-sec input:focus-visible {
  border-color: var(--ct-brand) !important;
  box-shadow: 0 0 0 3px rgba(76, 63, 242, 0.22) !important;
}
html body.dark .main-search-sec input:focus,
html body.dark .main-search-sec input:focus-visible {
  border-color: var(--ct-brand-ink) !important;
  box-shadow: 0 0 0 3px rgba(183, 176, 255, 0.4) !important;
}

.ct-search-hint,
.ct-search-empty {
  color: var(--ct-muted);
  font-size: 0.9rem;
}

/* Catalog cards: lines, not floating marketing tiles */
.content-sec .content-sec-inner .content-cats-sec .content-cats-col .content-cats-inner,
.ct-showcase__card {
  border-radius: var(--ct-radius) !important;
  border: 1px solid var(--ct-line) !important;
  box-shadow: none !important;
  background: var(--ct-elev) !important;
  transform: none !important;
  top: 0 !important;
}

.content-sec .content-sec-inner .content-cats-sec .content-cats-col .content-cats-inner:hover,
.ct-showcase__card:hover {
  transform: none !important;
  border-color: color-mix(in srgb, var(--ct-brand) 45%, var(--ct-line)) !important;
  box-shadow: none !important;
}

.content-cats-inner h2,
.ct-showcase__name {
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 1.02rem;
}

.content-cats-inner p,
.ct-showcase__sum {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--ct-muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.content-title-sec .main-subtitle {
  letter-spacing: -0.03em;
}

.ct-cat-hub-link a {
  font-size: 0.86rem;
  font-weight: 500;
}

/* Buttons */
.btn.custom--btn,
.custom--btn,
.btn.custom--btn.button__lg,
.button__lg {
  border-radius: var(--ct-radius-sm) !important;
  font-weight: 600;
  letter-spacing: -0.01em;
  min-height: 44px !important;
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1), background-color 180ms ease;
}

.btn.custom--btn:active,
.custom--btn:active {
  transform: scale(0.98);
}

/* Envato .single-page-inner p { overflow:hidden; line-height:19px } crushes FAQ/unlock. */
html body .single-page-inner p,
html body .single-page-inner .ct-tool-faq-item p,
html body .single-page-inner .text-muted,
html body .single-page-inner .unlock-card p,
html body .ct-tool-faq-item p {
  overflow: visible !important;
  line-height: 1.5 !important;
  max-height: none !important;
  color: inherit;
}
html body.dark .single-page-inner p,
html body.dark .single-page-inner .text-muted,
html body.dark .ct-tool-faq-item p {
  color: var(--ct-muted) !important;
}

/* Inputs stay one 44px row. Buttons may wrap label text — do not clip. */
html body .custom-input,
html body input.custom-input:not([type="file"]),
html body select.custom-input,
html body .form-control:not(textarea):not([type="file"]) {
  height: 44px !important;
  min-height: 44px !important;
  line-height: 1.2 !important;
  box-sizing: border-box !important;
  font-size: 1rem !important;
}
html body .btn.custom--btn.button__lg,
html body .button__lg,
html body .btn.custom--btn {
  height: auto !important;
  min-height: 44px !important;
  line-height: 1.25 !important;
  box-sizing: border-box !important;
  white-space: normal !important;
  padding-top: 0.55rem !important;
  padding-bottom: 0.55rem !important;
}
@media (max-width: 767.98px) {
  html body .single-page-inner form,
  html body .single-page-inner .custom-input,
  html body .single-page-inner input.custom-input,
  html body .single-page-inner .button__lg,
  html body .single-page-inner .btn.custom--btn {
    width: 100% !important;
    max-width: 100% !important;
  }
  html body .single-page-inner .alert,
  html body .single-page-inner .ct-result,
  html body .single-page-inner .console-output {
    overflow: visible !important;
    max-height: none !important;
    display: block !important;
  }
}
html body textarea.custom-textarea,
html body .custom-textarea {
  height: auto !important;
  min-height: 8rem !important;
  line-height: 1.5 !important;
}

html body .hero-section--tool .hero-small-title,
html body .hero-small-title {
  line-height: 1.3 !important;
  margin-bottom: 0.25rem !important;
}

html body .single-page-inner .tool-recaptcha-wrapper {
  margin-top: 0.75rem !important;
  margin-bottom: 0.75rem !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
}
@media (max-width: 480px) {
  html body .single-page-inner .tool-recaptcha-wrapper {
    padding-left: 0.45rem !important;
    padding-right: 0.45rem !important;
  }
}

/* Tool page */
.hero-section--tool {
  max-width: none;
}

.hero-section--tool .ct-tool-hero-title {
  display: none !important;
}

.hero-section--tool ~ .main-search-sec,
.hero-section--tool + .ct-tool-search,
.ct-tool-search.main-search-sec {
  max-width: 28rem !important;
  margin-bottom: 0.65rem;
}

.hero-section--tool ~ .main-search-sec input,
.ct-tool-search.main-search-sec input {
  height: 44px !important;
  min-height: 44px !important;
}

.ct-tool-faq-item summary {
  cursor: pointer;
  list-style: none;
}

.ct-tool-faq-item summary::-webkit-details-marker {
  display: none;
}

.ct-tool-faq-item summary::after {
  content: "▸";
  float: right;
  color: var(--ct-muted);
}

.ct-tool-faq-item[open] summary::after {
  content: "▾";
}

/* Dark FAQ: app.css colors .inner h2/.h4 and leaves <summary> on --color-black
   (#0a1420). additional.css only remaps FAQ type for body:not(.dark). */
html body.dark .ct-tool-faq,
html body.dark .ct-tool-faq.h4,
html body.dark .ct-tool-faq h2,
html body.dark .ct-tool-faq .h4,
html body.dark .ct-tool-faq-item,
html body.dark .ct-tool-faq-item summary,
html body.dark .ct-tool-faq-item a,
html body.dark .single-page-inner .ct-tool-faq,
html body.dark .single-page-inner .ct-tool-faq h2,
html body.dark .single-page-inner .ct-tool-faq .h4,
html body.dark .single-page-inner .ct-tool-faq-item summary {
  color: var(--ct-ink) !important;
}
html body.dark .ct-tool-faq-item p,
html body.dark .single-page-inner .ct-tool-faq-item p {
  color: var(--ct-muted) !important;
  opacity: 1 !important;
}
html body.dark .ct-tool-faq,
html body.dark .single-page-inner .ct-tool-faq {
  background: var(--ct-elev) !important;
  border-color: var(--ct-line) !important;
}
html body.dark .ct-tool-faq-item,
html body.dark .single-page-inner .ct-tool-faq-item {
  background: var(--ct-elev) !important;
  border-color: var(--ct-line) !important;
  color: var(--ct-ink) !important;
}
html body.dark .ct-tool-faq-item summary::after {
  color: var(--ct-muted) !important;
}

.tool-recaptcha-wrapper {
  padding: 1rem 1.1rem;
  border: 1px solid var(--ct-line);
  border-radius: var(--ct-radius);
  background: var(--ct-elev);
}

/* Hide captcha chrome after verify. Do not use display:flex !important
   on this class — it fought Alpine x-show and leftover display:none. */
.tool-recaptcha-wrapper.is-verified,
.tool-recaptcha-wrapper[hidden] {
  display: none !important;
}

/* If a form was nested in the wrapper, keep the form, hide only the widget. */
.tool-recaptcha-wrapper.is-verified:has(> form),
.tool-recaptcha-wrapper[hidden]:has(> form) {
  display: flex !important;
}
.tool-recaptcha-wrapper.is-verified:has(> form) > .g-recaptcha,
.tool-recaptcha-wrapper[hidden]:has(> form) > .g-recaptcha,
.tool-recaptcha-wrapper.is-verified:has(> form) > .smart-captcha,
.tool-recaptcha-wrapper[hidden]:has(> form) > .smart-captcha,
.tool-recaptcha-wrapper.is-verified:has(> form) > .ct-captcha,
.tool-recaptcha-wrapper[hidden]:has(> form) > .ct-captcha {
  display: none !important;
}

/* Unlock card: body.dark must not keep bg-white + light text */
body.dark .single-page-inner .bg-white {
  background: var(--ct-elev) !important;
  border-color: var(--ct-line) !important;
  color: var(--ct-ink);
}
body.dark .single-page-inner .text-dark {
  color: var(--ct-ink) !important;
}
body.dark .single-page-inner .text-muted {
  color: var(--ct-muted) !important;
}

.main-search-sec input::placeholder,
input.custom-input::placeholder,
textarea.custom-textarea::placeholder {
  color: #64748b !important;
  opacity: 1;
}
body.dark .main-search-sec input::placeholder,
body.dark input.custom-input::placeholder,
body.dark textarea.custom-textarea::placeholder {
  color: #94a3b8 !important;
}

body.dark .ct-fav-toggle:hover,
body.dark a.content-cats-inner:hover h2,
body.dark .content-title-sec .main-subtitle {
  color: var(--ct-brand-ink);
}

/* Footer: quieter rail */
footer {
  border-top: 1px solid var(--ct-line);
  padding-top: 1.25rem;
}

.ct-footer-seo {
  font-size: 0.82rem;
}

/* Footer pills in polish assume navy + white type. Paper rail needs ink. */

.ct-cookie-more {
  margin: 0 0.65rem;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ct-legal .single-page-inner p {
  max-width: 65ch;
  line-height: 1.55;
  margin: 0 0 0.9rem;
}

/* Forms */
.custom-input,
.custom-textarea,
input.custom-input,
textarea.custom-textarea {
  border-radius: var(--ct-radius-sm) !important;
  border-color: var(--ct-line) !important;
}

/* Motion off when asked */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* Mobile: keep header usable */
@media (max-width: 767px) {
  header.mainPadding {
    margin-bottom: 18px;
  }
  .hero-section h1,
  .hero-section .h1 {
    max-width: 100%;
    font-size: 1.55rem;
  }
  .content-cats-inner p,
  .ct-showcase__sum {
    -webkit-line-clamp: 3;
  }
}

/* Numbers in dense UI */
.ct-search-count,
.ct-nav-cats__count,
[data-count] .content-title-icon + * {
  font-variant-numeric: tabular-nums;
  font-family: var(--ct-mono);
}

html.ct-nav-open,
html.ct-nav-open body {
  overflow: hidden !important;
}
html.ct-nav-open header.mainPadding {
  overflow: visible !important;
}

#ct-cookie-ok {
  min-height: 44px;
  min-width: 44px;
}

.ct-cookie-more {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

@media (min-width: 992px) {
  header nav.navbar {
    flex-wrap: nowrap !important;
  }
  .ct-theme-seg__label {
    display: none;
  }
  .ct-showcase__card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    height: 100%;
  }
}

@media (min-width: 1280px) {
  .hero-section h1,
  .hero-section .h1 {
    max-width: 28ch;
  }
  .content-sec .content-sec-inner .content-cats-sec {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
  .content-sec .content-sec-inner .content-cats-sec .content-cats-col {
    flex: unset !important;
    width: auto !important;
    max-width: none !important;
    padding: 0 !important;
  }
  .content-cats-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .single-page-main-desc,
  .single-page-sec p {
    max-height: none;
    overflow: visible;
    line-height: 1.5;
  }
}

/* 3.5.25 AA — beat polish white-on-navy pills after footer went paper. */
html body footer {
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  min-height: 0 !important;
  padding: 1.25rem 0 0.5rem !important;
  color: var(--ct-muted) !important;
}
html body footer .footer-nav a,
html body:not(.dark) footer,
html body:not(.dark) footer .footer-copyright,
html body:not(.dark) footer .footer-nav a,
html body:not(.dark) footer .ct-footer-seo,
html body:not(.dark) footer .ct-footer-seo a,
html body:not(.dark) footer .footer-copyright .ct-selectel-footer-link,
html body.dark footer,
html body.dark footer .footer-copyright,
html body.dark footer .footer-nav a,
html body.dark footer .ct-footer-seo,
html body.dark footer .ct-footer-seo a,
html body.dark footer .footer-copyright .ct-selectel-footer-link {
  color: var(--ct-ink) !important;
  opacity: 1 !important;
}
html body:not(.dark) footer .footer-copyright,
html body:not(.dark) footer .ct-footer-seo,
html body.dark footer .footer-copyright,
html body.dark footer .ct-footer-seo,
html body.dark footer .ct-footer-seo a,
html body.dark footer p.ct-footer-seo a {
  color: var(--ct-muted) !important;
}
html body.dark footer .ct-footer-seo a:hover,
html body.dark footer .ct-footer-seo a:focus-visible {
  color: var(--ct-brand-ink) !important;
}
html body footer .footer-nav a {
  background: var(--ct-elev) !important;
  border: 1px solid var(--ct-line) !important;
  color: var(--ct-ink) !important;
}
html body footer .footer-nav a:hover,
html body footer .footer-nav a:focus-visible,
html body footer .ct-footer-seo a:hover,
html body footer .ct-footer-seo a:focus-visible,
html body footer .footer-copyright .ct-selectel-footer-link:hover {
  color: var(--ct-brand-ink) !important;
  border-color: color-mix(in srgb, var(--ct-brand) 45%, var(--ct-line)) !important;
}
html body footer .footer-nav a:focus-visible,
html body footer .ct-footer-seo a:focus-visible,
html body .custom--btn:focus-visible,
html body .button__lg:focus-visible {
  outline: 2px solid var(--ct-brand-ink);
  outline-offset: 2px;
}

/* Unlock / forms readable in both themes */
html body.dark .single-page-inner .bg-white,
html body.dark .single-page-inner .card,
html body.dark .tool-recaptcha-wrapper {
  background: var(--ct-elev) !important;
  color: var(--ct-ink) !important;
  border-color: var(--ct-line) !important;
}
html body .custom-input,
html body .custom-textarea,
html body input.form-control,
html body textarea.form-control,
html body select.form-control,
html body .form-control,
html body input[type="text"],
html body input[type="search"],
html body input[type="email"],
html body input[type="url"],
html body input[type="password"],
html body input[type="number"],
html body input[type="tel"],
html body textarea,
html body select {
  background: var(--ct-elev) !important;
  color: var(--ct-ink) !important;
  border-color: var(--ct-line) !important;
}
html body .custom-input,
html body input.custom-input,
html body input[type="text"],
html body input[type="search"],
html body input[type="email"],
html body input[type="url"],
html body select {
  min-height: 44px;
}
html body.dark .form-control,
html body.dark .custom-input,
html body.dark .custom-textarea,
html body.dark input[type="text"],
html body.dark input[type="search"],
html body.dark input[type="email"],
html body.dark input[type="url"],
html body.dark input[type="password"],
html body.dark input[type="number"],
html body.dark input[type="tel"],
html body.dark textarea,
html body.dark select {
  background: var(--ct-elev) !important;
  color: var(--ct-ink) !important;
  border-color: var(--ct-line) !important;
}
html body .custom-input:focus,
html body .custom-textarea:focus,
html body .form-control:focus,
html body input[type="text"]:focus,
html body input[type="search"]:focus,
html body input[type="email"]:focus,
html body input[type="url"]:focus,
html body input[type="password"]:focus,
html body textarea:focus,
html body select:focus {
  border-color: var(--ct-brand) !important;
  box-shadow: 0 0 0 3px rgba(76, 63, 242, 0.28) !important;
  outline: none;
}
html body.dark .custom-input:focus,
html body.dark .custom-textarea:focus,
html body.dark .form-control:focus,
html body.dark input[type="text"]:focus,
html body.dark input[type="search"]:focus,
html body.dark input[type="email"]:focus,
html body.dark input[type="url"]:focus,
html body.dark textarea:focus,
html body.dark select:focus {
  border-color: var(--ct-brand-ink) !important;
  box-shadow: 0 0 0 3px rgba(183, 176, 255, 0.4) !important;
}
/* Banner is always navy; do not use theme ink (fails on #1a1b20 in light). */
html body .cookie-alert,
html body .cookie-alert p,
html body .cookie-alert .ct-cookie-more {
  color: #f0f1f4 !important;
}
html body.dark .cookie-alert {
  background: #1a1b20 !important;
  color: #f0f1f4 !important;
}

/* #4c3ff2 on dark paper/elev is ~2.9:1; hover/text uses brand-ink */
body.dark header .header-navbar ul li a:hover,
body.dark header .header-navbar ul li a:focus-visible,
body.dark .ct-showcase__card:hover .ct-showcase__name,
body.dark .ct-cat-hub-link a,
body.dark .btn.custom--btn.btn__bordered,
body.dark .custom--btn.btn__bordered {
  color: var(--ct-brand-ink) !important;
}

/* polish placeholder #a5aebc on #fff is ~2.2:1; cover tool form-controls too */
input::placeholder,
textarea::placeholder,
.form-control::placeholder {
  color: var(--ct-muted) !important;
  opacity: 1;
}

/* 3.5.24 AA — beat additional.css/app.css (they load after this file).
   html+body prefix > body:not(.dark) … !important ties. */

/* Placeholders: additional #64748b on paper #f3f4f7 is 4.33. */
html body:not(.dark) input::placeholder,
html body:not(.dark) textarea::placeholder,
html body:not(.dark) .form-control::placeholder,
html body:not(.dark) input.custom-input::placeholder,
html body:not(.dark) textarea.custom-textarea::placeholder {
  color: #475569 !important;
  opacity: 1;
}
html body.dark input::placeholder,
html body.dark textarea::placeholder,
html body.dark .form-control::placeholder,
html body.dark input.custom-input::placeholder,
html body.dark textarea.custom-textarea::placeholder {
  color: #9aa3b2 !important;
  opacity: 1;
}

/* Muted / helper: BS stays data-bs-theme=light so --bs-secondary-color is ~#5a5e62 (2.5:1 on navy). */
html body.dark .text-muted,
html body.dark .text-secondary,
html body.dark .text-gray-400,
html body.dark .text-gray-500,
html body.dark .form-text,
html body.dark small.text-muted,
html body.dark .single-page-inner [class*="text-gray-400"] {
  color: var(--ct-muted) !important;
}

/* Labels */
html body:not(.dark) .custom-label,
html body:not(.dark) label,
html body:not(.dark) .form-label {
  color: #0f172a !important;
}
html body.dark .custom-label,
html body.dark label,
html body.dark .form-label {
  color: var(--ct-ink) !important;
}

/* Brand / Bootstrap primary as text on dark: #4c3ff2 ~2.6, #0d6efd ~3.7 */
html body.dark .text-primary,
html body.dark a.text-primary,
html body.dark .ct-breadcrumb a,
html body.dark .ct-tool-back,
html body.dark .ct-fav-toggle,
html body.dark .ct-cat-hub-link a {
  color: var(--ct-brand-ink) !important;
}
html body.dark .custom--btn.btn__bordered,
html body.dark .btn.custom--btn.btn__bordered {
  color: var(--ct-brand-ink) !important;
  border-color: var(--ct-brand-ink) !important;
}

/* Hardcoded brand glyphs on dark cards (stroke icons skip the white-fill remap). */
html body.dark [stroke="#4c3ff2"],
html body.dark [stroke="#4C3FF2"] {
  stroke: var(--ct-brand-ink) !important;
}
html body.dark [fill="#4c3ff2"],
html body.dark [fill="#4C3FF2"] {
  fill: var(--ct-brand-ink) !important;
}
html body.dark .content-cats-icon [fill="#4c3ff2"],
html body.dark .content-cats-icon [fill="#4C3FF2"],
html body.dark .content-title-icon [fill="#4c3ff2"],
html body.dark .content-title-icon [fill="#4C3FF2"],
html body.dark .single-page-icon [fill="#4c3ff2"],
html body.dark .single-page-icon [fill="#4C3FF2"] {
  fill: #fff !important;
}

/* Errors: #dc3545 on paper 4.12; on dark elev 3.69. Alert white on #e63946 is 4.17. */
html body:not(.dark) .text-danger,
html body:not(.dark) .recaptcha-error-msg {
  color: #b42318 !important;
}
html body.dark .text-danger,
html body.dark .recaptcha-error-msg {
  color: #f87171 !important;
}
.alert.alert-danger,
.alert.alert-danger.input-alerts {
  background-color: #b42318 !important;
  border-color: #9b1c1c !important;
  color: #fff !important;
}

/* Contact strip: 0.8 white on #4e60ff ≈ 3.61 */
.home-helping-sec h3,
.home-helping-sec .h3,
.home-helping-sec p {
  opacity: 1 !important;
  color: #fff !important;
}

/* Guide hint: 0.78 muted on paper ≈ 3.4 */
.ct-tool-guide-link-hint {
  opacity: 1 !important;
  color: var(--ct-muted) !important;
}
html body:not(.dark) .ct-tool-guide-link-hint {
  color: #475569 !important;
}

/* Cookie: lock ink + brand CTA (BS .btn-primary reverts to #0d6efd after polish). */
html #ct-cookie-alert,
html .cookie-alert {
  color: #f0f1f4 !important;
  background-color: #1a1b20 !important;
}
html #ct-cookie-alert .ct-cookie-more,
html .cookie-alert .ct-cookie-more {
  color: #f0f1f4 !important;
}
html #ct-cookie-ok,
html #ct-cookie-ok.btn,
html #ct-cookie-ok.btn-primary {
  background-color: #4c3ff2 !important;
  background-image: none !important;
  border: 1px solid #f0f1f4 !important;
  color: #fff !important;
  box-shadow: 0 0 0 1px #1a1b20;
}

/* Header chrome: keep cycle/me readable on both papers */
html body:not(.dark) header .ct-theme-cycle,
html body:not(.dark) header .ct-me-open,
html body:not(.dark) header .navbar-dark .ct-theme-seg a:not(.is-active),
html body:not(.dark) header .ct-theme-seg a:not(.is-active),
html body:not(.dark) header .ct-lang-seg__btn,
html body:not(.dark) header .header-language-btn {
  color: #3a30c9 !important;
}
html body.dark header .ct-theme-cycle,
html body.dark header .ct-me-open,
html body.dark header .ct-theme-seg__btn:not(.is-active) {
  color: var(--ct-brand-ink) !important;
}

/* Unlock card extras (Tailwind dark:* classes are inert without theme.css) */
html body.dark .single-page-inner .bg-white {
  background: var(--ct-elev) !important;
  color: var(--ct-ink) !important;
}
html body.dark .single-page-inner .text-dark {
  color: var(--ct-ink) !important;
}

/* Partner CTA dark gradient end #8b7fff is 3.19:1 with white. */
html body.dark .partner-ad-slot--selectel a.ct-selectel-cta {
  background: linear-gradient(135deg, #4c3ff2, #6b5cff) !important;
  color: #fff !important;
}

/* 3.5.26 layout QA — beat additional.css (async, later) without new design.
   additional L1: .content-cats-col { flex/width 25% / 33% / 50% / 100% !important }
   polish ≤991 and overhaul ≥1280 set display:grid on the same list → % is % of the
   grid area, so cards paint at ~1/4 or 1/2 of the cell (50–56px at 1280). */

html body .content-sec .content-sec-inner .content-cats-sec,
html body #tools-catalog .content-cats-sec,
html body [data-ct-catalog] .content-cats-sec {
  width: 100% !important;
  max-width: none !important;
}

html body .content-sec .content-sec-inner .content-cats-sec .content-cats-col,
html body #tools-catalog .content-cats-sec .content-cats-col,
html body [data-ct-catalog] .content-cats-sec .content-cats-col {
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  flex: none !important;
  padding: 0 !important;
  justify-self: stretch;
}

html body .content-sec .content-sec-inner .content-cats-sec .content-cats-inner,
html body #tools-catalog .content-cats-inner,
html body [data-ct-catalog] .content-cats-inner {
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box !important;
}

/* footer-logo.png is white (median lum 255). Paper rail is --ct-paper; logo vanishes in light. */
html body:not(.dark) footer .footer-logo img {
  filter: invert(1) brightness(0.22);
}

/* Dark result cards: app.css / additional p #555 and --color-black win without this. */
html body.dark .ct-result,
html body.dark .ct-result__body,
html body.dark .ct-result__body p,
html body.dark .ct-result__body span:not(.badge),
html body.dark .ct-result__title {
  color: var(--ct-ink) !important;
}
html body.dark .ct-result__body .badge.bg-warning,
html body.dark .ct-result__body .badge.text-dark {
  color: #141820 !important;
}
html body.dark .ct-result {
  background: var(--ct-elev) !important;
  border-color: var(--ct-line) !important;
}
html body.dark .ct-result__bar {
  background: rgba(255, 255, 255, 0.06) !important;
  border-bottom-color: var(--ct-line) !important;
}

/* Phablet wrap was 30×30 while the cycle control is 44×44. */
@media only screen and (max-width: 576px) {
  html body header .header-language-btn-group.theme-change-color,
  html body header .header-language-btn-group.ct-theme-cycle-wrap,
  html body header .ct-theme-cycle-wrap {
    width: auto !important;
    min-width: 44px !important;
    max-width: none !important;
    height: 44px !important;
    min-height: 44px !important;
  }
}

/* 375–768: polish shrinks me/lang/theme to 30–40px. 767 left 768 (iPad portrait) short. */
@media only screen and (max-width: 768px) {
  header .ct-me-open,
  header .header-language-btn.ct-me-open,
  header .ct-theme-cycle,
  header .header-language-btn.ct-theme-cycle,
  header .ct-theme-cycle-wrap .ct-theme-cycle,
  header .ct-theme-cycle-wrap .header-language-btn.ct-theme-cycle,
  header .ct-lang-seg .ct-lang-seg__btn.header-language-btn,
  header #navbar-toggler.nav-btn {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    max-width: 44px !important;
  }
  header .ct-lang-seg,
  header .header-language-btn-group.ct-lang-seg {
    height: 44px !important;
    min-height: 44px !important;
  }
  html body:not(.dark) header .header-language-btn-group.ct-theme-cycle-wrap .header-language-btn.ct-theme-cycle,
  html body.dark header .header-language-btn-group.ct-theme-cycle-wrap .header-language-btn.ct-theme-cycle {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    max-width: 44px !important;
  }
}

/* 3.5.32 — leftover Envato/additional fights (specificity, not a redesign). */

html body:not(.dark) {
  --ct-brand: #4c3ff2;
}

html body .single-page-sec .single-page-inner {
  background: var(--ct-elev) !important;
  border: 1px solid var(--ct-line) !important;
  border-radius: var(--ct-radius) !important;
  box-shadow: none !important;
  padding: 1.25rem !important;
}
html body.dark .single-page-sec .single-page-inner {
  background: var(--ct-elev) !important;
}

html body .btn.custom--btn:not(.btn__bordered):not(.btn-outline-secondary):not(.btn-secondary):not(.btn-danger):not(.btn-light),
html body .custom--btn.button__lg:not(.btn__bordered):not(.btn-outline-secondary):not(.btn-secondary):not(.btn-danger):not(.btn-light) {
  background: var(--ct-brand) !important;
  background-image: none !important;
  color: #fff !important;
  border: 0 !important;
  box-shadow: none !important;
}

html body .content-cats-inner h2,
html body .ct-showcase__name {
  font-size: 1.02rem !important;
  font-weight: 600 !important;
  white-space: normal !important;
}
html body .content-cats-inner p,
html body .ct-showcase__sum {
  height: auto !important;
  max-height: none !important;
  line-height: 1.4 !important;
}

html body:not(.dark) header .header-navbar ul li a {
  color: #0f172a !important;
}
html body.dark header .header-navbar ul li a {
  color: var(--ct-ink) !important;
}

html body:not(.dark) footer .footer-nav a:hover,
html body:not(.dark) footer .ct-footer-seo a:hover,
html body:not(.dark) footer .footer-copyright .ct-selectel-footer-link:hover {
  color: var(--ct-brand-ink) !important;
}

html body .custom-input,
html body input.custom-input {
  font-size: 1rem !important;
  padding: 0 0.85rem !important;
}

/* Mobile: cookie bar is position:fixed bottom and ate unlock/submit taps.
   Recaptcha is 304px; additional.css display:flex + overflow clips the checkbox. */
html.ct-cookie-need body {
  padding-bottom: calc(7.5rem + env(safe-area-inset-bottom, 0px)) !important;
}
html body .single-page-inner,
html body .single-page-inner > .text-center,
html body .tool-recaptcha-wrapper {
  overflow: visible !important;
}
html body .g-recaptcha,
html body .smart-captcha,
html body .ct-captcha,
html body .tool-recaptcha-wrapper .g-recaptcha,
html body .tool-recaptcha-wrapper .smart-captcha,
html body .tool-recaptcha-wrapper .ct-captcha {
  display: block !important;
  width: 100% !important;
  max-width: 322px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  overflow: visible !important;
}
html body .smart-captcha iframe,
html body .ct-captcha iframe,
html body .g-recaptcha iframe {
  display: block !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
@media (max-width: 380px) {
  html body .g-recaptcha,
  html body .smart-captcha,
  html body .ct-captcha,
  html body .tool-recaptcha-wrapper .g-recaptcha,
  html body .tool-recaptcha-wrapper .smart-captcha,
  html body .tool-recaptcha-wrapper .ct-captcha {
    transform: scale(0.85);
    transform-origin: center top;
    height: auto !important;
    min-height: 120px !important;
  }
}

/* Document converters: file picker must be tappable on phones */
html body .single-page-inner input[type="file"],
html body .single-page-inner .custom-file input[type="file"] {
  min-height: 44px !important;
  font-size: 1rem !important;
  max-width: 100% !important;
}
html body .single-page-inner .custom-file {
  overflow: visible !important;
}

/* Mobile header: ONE row, ONE menu control (hamburger ↔ X). No wrap, no second close. */
@media only screen and (max-width: 991.98px) {
  html body header.mainPadding .navbar,
  html body header nav.navbar.navbar-expand-lg {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    column-gap: 6px !important;
    row-gap: 0 !important;
  }
  html body header .navbar-brand.ct-brand {
    order: 1 !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 44px !important;
    margin: 0 !important;
  }
  html body header .navbar-brand.ct-brand .ct-logo,
  html body header .navbar-brand.ct-brand img.ct-logo {
    max-height: 28px !important;
    max-width: 100% !important;
  }
  html body header .ct-me-btn-wrap {
    order: 4 !important;
    flex: 0 0 auto !important;
  }
  html body header .ct-theme-cycle-wrap {
    order: 5 !important;
    flex: 0 0 auto !important;
  }
  html body header .header-language-btn-group.ct-lang-seg {
    order: 6 !important;
    flex: 0 0 auto !important;
  }
  html body header .login-btn-main {
    order: 7 !important;
    flex: 0 0 auto !important;
  }
  html body header #navbar-toggler.nav-btn {
    order: 9 !important;
    flex: 0 0 44px !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    margin: 0 0 0 auto !important;
  }
  html body header .ct-me-open,
  html body header .ct-theme-cycle {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    max-width: 40px !important;
  }
  html body header .ct-lang-seg .ct-lang-seg__btn.header-language-btn {
    width: auto !important;
    min-width: 36px !important;
    max-width: none !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 8px !important;
  }
  html body header .ct-theme-seg {
    display: none !important;
  }
  html body header .ct-tools-rail {
    display: none !important;
  }
  /* Drawer already has the hamburger-as-X sitting on the bar — do not add a second × */
  html body header .ct-nav-close {
    display: none !important;
  }
}
