@import url("../../icons/icons.css");

/* ================================================================
   KITOTOOL — Components (Premium Modern Design v2.1)
   Version: 2.1 | 2026-04-12
   Premium buttons, badges, header, cards, forms
   ================================================================ */

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 10px 20px;
  border-radius: var(--radius-lg);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  letter-spacing: 0;
  line-height: 1;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
  text-decoration: none;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus-ring);
}

/* Primary — Indigo gradient */
.btn--primary {
  background: var(--color-primary);
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(79, 70, 229, 0.3), 0 0 0 1px rgba(79, 70, 229, 0.1);
}

.btn--primary:hover {
  background: var(--color-primary-hover);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35), 0 0 0 1px rgba(79, 70, 229, 0.2);
  transform: translateY(-1px);
}

.btn--primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(79, 70, 229, 0.3);
}

/* Secondary — Violet */
.btn--secondary {
  background: var(--color-secondary);
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(124, 58, 237, 0.3), 0 0 0 1px rgba(124, 58, 237, 0.1);
}

.btn--secondary:hover {
  background: var(--color-secondary-hover);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35), 0 0 0 1px rgba(124, 58, 237, 0.2);
  transform: translateY(-1px);
}

.btn--secondary:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(124, 58, 237, 0.3);
}

/* Accent — Cyan */
.btn--accent {
  background: var(--color-accent);
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(8, 145, 178, 0.3), 0 0 0 1px rgba(8, 145, 178, 0.1);
}

.btn--accent:hover {
  background: var(--color-accent-hover);
  box-shadow: 0 4px 12px rgba(8, 145, 178, 0.35), 0 0 0 1px rgba(8, 145, 178, 0.2);
  transform: translateY(-1px);
}

.btn--accent:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(8, 145, 178, 0.3);
}

/* Outline */
.btn--outline {
  background: transparent;
  color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-border);
}

.btn--outline:hover {
  background: var(--color-primary-light);
  box-shadow: 0 0 0 1px var(--color-primary);
  color: var(--color-primary);
}

/* Ghost */
.btn--ghost {
  background: transparent;
  color: var(--color-text-secondary);
  box-shadow: none;
}

.btn--ghost:hover {
  background: var(--color-bg-tertiary);
  color: var(--color-text);
}

/* Sizes */
.btn--sm {
  padding: 6px 12px;
  font-size: var(--text-xs);
  border-radius: var(--radius-md);
}

.btn--lg {
  padding: 12px 28px;
  font-size: var(--text-base);
  border-radius: var(--radius-lg);
}

/* Disabled */
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

/* ===== BADGES / PILLS ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  letter-spacing: 0.02em;
  background: var(--color-bg-tertiary);
  color: var(--color-text-secondary);
  white-space: nowrap;
  line-height: 1.4;
}

.badge--ai {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.badge--free {
  background: var(--color-success-light);
  color: var(--color-success-dark);
}

.badge--popular {
  background: var(--color-warning-light);
  color: var(--color-warning-dark);
}

.badge--neutral {
  background: var(--color-bg-tertiary);
  color: var(--color-text-muted);
}

.badge--info {
  background: var(--color-info-light);
  color: var(--color-info-dark);
}

/* Public tool status labels: identical type, wording and colors on every card. */
.tool-card-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}

.tool-card__badges > .tool-card-badges { justify-content: flex-end; }
.cat-tool-card__head > .tool-card-badges { flex-direction: column; max-width: 100%; }

.tool-status-badge,
.tool-feature-badge {
  display: inline-flex;
  align-items: center;
  align-self: center;
  flex-shrink: 0;
  width: fit-content;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: var(--font-semibold);
  line-height: 1.5;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
}

.tool-status-badge--featured { background: #eff6ff; color: #1d4ed8; }
.tool-status-badge--popular { background: #fff7ed; color: #9a3412; }
.tool-status-badge--new { background: #ecfdf5; color: #047857; }
.tool-feature-badge--ai { background: #f5f3ff; color: #6d28d9; }
[data-theme="dark"] .tool-status-badge--featured { background: #172d4d; color: #bfdbfe; }
[data-theme="dark"] .tool-status-badge--popular { background: #432713; color: #fed7aa; }
[data-theme="dark"] .tool-status-badge--new { background: #113b30; color: #a7f3d0; }
[data-theme="dark"] .tool-feature-badge--ai { background: #312149; color: #ddd6fe; }

/* ===== SITE HEADER (v3.0) — Balanced three-zone navigation ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  height: 76px;
  background: color-mix(in srgb, var(--color-bg) 88%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  box-shadow: none;
  border-bottom: 1px solid color-mix(in srgb, var(--color-border) 72%, transparent);
  isolation: isolate;
  transition: background-color 240ms ease, box-shadow 240ms ease, border-color 240ms ease;
}

/* Top of page: quiet glass surface that remains legible over every hero. */
.site-header.is-top {
  background: color-mix(in srgb, var(--color-bg) 84%, transparent);
  border-bottom-color: color-mix(in srgb, var(--color-border) 55%, transparent);
}

/* Scrolled: stronger surface and a restrained elevation. */
.site-header.is-scrolled {
  background: color-mix(in srgb, var(--color-bg) 94%, transparent);
  border-bottom-color: color-mix(in srgb, var(--color-border) 90%, transparent);
  box-shadow: 0 8px 28px rgba(15, 23, 42, .09);
}

[data-theme="light"] .site-header.is-scrolled {
  background: rgba(255, 255, 255, .92);
  border-bottom-color: rgba(148, 163, 184, .24);
  box-shadow: 0 8px 28px rgba(15, 23, 42, .08);
}

.site-header__inner {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
}

.site-header__logo {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  width: fit-content;
  text-decoration: none;
  color: var(--color-text);
  border-radius: 10px;
  outline-offset: 5px;
}

.site-header__logo:hover { color: var(--color-primary); }

.site-header__logo-art { display: block; }
.site-header__logo-art--dark { display: none; }
[data-theme="dark"] .site-header__logo-art--light { display: none; }
[data-theme="dark"] .site-header__logo-art--dark { display: block; }

.site-header__logo-icon {
  display: block;
  width: 118px;
  height: 38px;
  object-fit: contain;
  transition: filter 180ms ease, opacity 180ms ease;
}

@media (min-width: 1440px) {
  .site-header__logo-icon { width: 140px; height: auto; }
}

.site-header.is-top .site-header__logo-icon,
.site-header.is-scrolled .site-header__logo-icon { transform: none; }

.site-header__logo:hover .site-header__logo-icon {
  filter: drop-shadow(0 2px 8px rgba(79, 70, 229, 0.4));
}

[data-theme="dark"] .site-header__logo:hover .site-header__logo-icon {
  filter: drop-shadow(0 2px 12px rgba(129, 140, 248, 0.45));
}

.site-header__nav {
  display: flex;
  align-items: center;
  justify-self: stretch;
  justify-content: center;
  gap: 2px;
  min-width: 0;
}

.site-header__nav > * { flex-shrink: 0; }

.site-header__nav-link {
  position: relative;
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 550;
  line-height: 1;
  white-space: nowrap;
  padding: 0 10px;
  border-radius: 10px;
  transition: color 160ms ease, background-color 160ms ease;
}

@media (min-width: 1025px) {
  .site-header__nav-link { font-size: 14.5px; }
}

.site-header__nav-link:hover {
  color: var(--color-text);
  background: color-mix(in srgb, var(--color-primary) 7%, transparent);
}

.site-header__nav-link.active {
  color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 10%, transparent);
}

.header-more { position: relative; display: none; }
.header-more__trigger { gap: 6px; border: 0; background: transparent; font-family: inherit; cursor: pointer; }
.header-more__trigger[aria-expanded="true"] { color: var(--color-primary); background: color-mix(in srgb, var(--color-primary) 8%, transparent); }
.header-more__trigger[aria-expanded="true"] svg { transform: rotate(180deg); }
.header-more__panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 205;
  min-width: 180px;
  padding: 6px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-bg);
  box-shadow: 0 12px 32px rgba(15, 23, 42, .14);
}
.header-more__panel[hidden] { display: none; }
.header-more__link { display: block; padding: 11px 14px; border-radius: 8px; color: var(--color-text-secondary); font-size: 13px; font-weight: 550; text-decoration: none; white-space: nowrap; }
.header-more__link:hover,
.header-more__link.active { color: var(--color-primary); background: color-mix(in srgb, var(--color-primary) 8%, transparent); }
.header-more__trigger:focus-visible,
.header-more__link:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }

@media (min-width: 1025px) {
  .site-header__nav.has-overflow-nav > [data-nav="about"],
  .site-header__nav.has-overflow-nav > [data-nav="contact"],
  .site-header__nav.has-overflow-nav > [data-nav="blog"] { display: none; }
  .site-header__nav.has-overflow-nav > .header-more { display: block; }
}

/* ===== TOOLS MEGA MENU — all tools + autocomplete ===== */
.tools-mega {
  position: relative;
  z-index: 205;
}

.tools-mega__trigger { gap: 5px; }

.tools-mega__chevron {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  transition: transform 180ms ease;
}

.tools-mega.is-open .tools-mega__chevron { transform: rotate(180deg); }

.tools-mega__panel {
  position: fixed;
  top: 76px;
  left: 50%;
  width: min(1180px, calc(100vw - 40px));
  padding-top: 10px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) translateY(-10px);
  transition: opacity 170ms ease, transform 190ms ease, visibility 170ms;
  z-index: 205;
}

.tools-mega.is-open .tools-mega__panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.tools-mega__surface {
  overflow: visible;
  padding: 20px;
  background: var(--color-bg);
  border: 1px solid color-mix(in srgb, var(--color-border) 92%, #cbd5e1);
  border-radius: 20px;
  box-shadow: 0 28px 70px rgba(15, 23, 42, .18), 0 8px 24px rgba(15, 23, 42, .09);
}

.tools-mega__topbar {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--color-border);
}

.header-tools-search,
.mobile-tools-search {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 44px;
  align-items: center;
  min-height: 54px;
  gap: 10px;
  padding: 0 5px 0 17px;
  background: color-mix(in srgb, var(--color-primary) 3%, var(--color-bg));
  border: 1.5px solid color-mix(in srgb, var(--color-primary) 18%, var(--color-border));
  border-radius: 14px;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.header-tools-search:focus-within,
.mobile-tools-search:focus-within {
  background: var(--color-bg);
  border-color: color-mix(in srgb, var(--color-primary) 62%, var(--color-border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 12%, transparent);
}

.header-tools-search > svg,
.mobile-tools-search > svg {
  width: 22px;
  height: 22px;
  color: color-mix(in srgb, var(--color-primary) 72%, var(--color-text-secondary));
}

.header-tools-search input,
.mobile-tools-search input {
  width: 100%;
  min-width: 0;
  height: 50px;
  padding: 0;
  color: var(--color-text);
  background: transparent;
  border: 0;
  outline: 0;
  font: inherit;
  font-size: 15px;
  font-weight: 550;
}

.header-tools-search input::placeholder,
.mobile-tools-search input::placeholder {
  color: color-mix(in srgb, var(--color-text-secondary) 82%, transparent);
  opacity: 1;
}

.header-tools-search > button,
.mobile-tools-search > button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--color-primary), #6366f1);
  border: 0;
  border-radius: 11px;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.header-tools-search > button:hover,
.mobile-tools-search > button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--color-primary) 30%, transparent);
}

.header-tools-search > button svg,
.mobile-tools-search > button svg { width: 19px; height: 19px; }

.header-tools-search__results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 20;
  max-height: min(430px, calc(100vh - 180px));
  overflow-y: auto;
  padding: 8px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 15px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, .18);
}

.header-tools-search__results[hidden] { display: none; }

.header-tools-search__label {
  padding: 8px 10px 9px;
  color: var(--color-text-secondary);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.header-tools-search__item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 8px 10px;
  color: var(--color-text);
  text-decoration: none;
  border-radius: 10px;
  transition: background-color 130ms ease, color 130ms ease;
}

.header-tools-search__item:hover,
.header-tools-search__item.is-selected {
  color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 8%, var(--color-bg));
}

.header-tools-search__item-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 10%, var(--color-bg));
  border-radius: 9px;
}

.header-tools-search__item-icon svg { width: 18px; height: 18px; }

.header-tools-search__item-text {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.header-tools-search__item-text strong {
  overflow: hidden;
  color: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-tools-search__item-text small {
  overflow: hidden;
  color: var(--color-text-secondary);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-tools-search__item-arrow { color: var(--color-text-muted); font-size: 15px; }
.header-tools-search__empty { padding: 20px 12px; color: var(--color-text-secondary); font-size: 14px; text-align: center; }

.header-tools-search__view-all {
  width: 100%;
  min-height: 44px;
  margin-top: 5px;
  padding: 8px 10px;
  color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 8%, var(--color-bg));
  border: 0;
  border-radius: 9px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.tools-mega__all {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  gap: 9px;
  padding: 0 18px;
  color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 8%, var(--color-bg));
  border: 1px solid color-mix(in srgb, var(--color-primary) 18%, var(--color-border));
  border-radius: 14px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color 150ms ease, transform 150ms ease;
}

.tools-mega__all:hover { background: color-mix(in srgb, var(--color-primary) 13%, var(--color-bg)); transform: translateY(-1px); }
.tools-mega__all span { color: var(--color-text-secondary); font-weight: 600; }
.tools-mega__all span strong { color: var(--color-text); }
.tools-mega__all svg { width: 18px; height: 18px; }

.tools-mega__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 18px;
}

.tools-mega__group {
  min-width: 0;
  padding: 13px;
  border-radius: 13px;
  transition: background-color 140ms ease;
}

.tools-mega__group:hover { background: color-mix(in srgb, var(--color-primary) 4%, var(--color-bg-secondary)); }

.tools-mega__heading {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  margin-bottom: 9px;
  color: var(--color-text);
  text-decoration: none;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.25;
}

.tools-mega__heading small {
  min-width: 24px;
  padding: 3px 6px;
  color: var(--color-text-secondary);
  background: var(--color-bg-tertiary);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  text-align: center;
}

.tools-mega__category-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 10%, var(--color-bg));
  border: 1px solid color-mix(in srgb, var(--color-primary) 14%, var(--color-border));
  border-radius: 9px;
}

.tools-mega__category-icon svg { width: 20px; height: 20px; }

.tools-mega__links {
  display: flex;
  padding-left: 47px;
  flex-direction: column;
  gap: 3px;
}

.tools-mega__links a {
  overflow: hidden;
  padding: 4px 0;
  color: color-mix(in srgb, var(--color-text) 82%, var(--color-text-secondary));
  text-decoration: none;
  font-size: 14px;
  font-weight: 520;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 130ms ease, transform 130ms ease;
}

.tools-mega__links a:hover { color: var(--color-primary); transform: translateX(2px); }
.tools-mega__links .tools-mega__more { color: var(--color-primary); font-weight: 650; }

.mobile-tools-search { display: none; }

[data-theme="dark"] .tools-mega__surface,
[data-theme="dark"] .header-tools-search__results {
  background: #111827;
  border-color: rgba(148, 163, 184, .2);
}

@media (prefers-reduced-motion: reduce) {
  .tools-mega__panel,
  .tools-mega__chevron,
  .tools-mega__links a { transition: none; }
}

/* ===== NAV DROPDOWN — Danh mục ===== */
.nav-dropdown {
  position: relative;
  z-index: 201;
}

.nav-dropdown__trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  border: none;
  background: transparent;
  text-decoration: none;
  /* Use the shared .site-header__nav-link typography for top-level items. */
  color: var(--color-text-secondary);
  min-height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  transition: color 160ms ease, background-color 160ms ease;
  white-space: nowrap;
  width: 100%;
}

.nav-dropdown__trigger:hover {
  color: var(--color-text);
  background: var(--color-bg-tertiary);
}

.nav-dropdown__trigger.active {
  color: var(--color-primary);
  background: var(--color-primary-light);
}

.nav-dropdown__chevron {
  flex-shrink: 0;
  transition: transform 200ms ease;
}

.nav-dropdown.is-open .nav-dropdown__chevron {
  transform: rotate(180deg);
}

.nav-dropdown__panel {
  position: fixed;
  top: 75px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 340px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: var(--space-3);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-8px);
  transition: opacity 200ms ease, transform 200ms ease, visibility 200ms;
  z-index: 201;
  pointer-events: none;
}

[data-theme="dark"] .nav-dropdown__panel {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
  background: #1e293b;
}

.nav-dropdown.is-open .nav-dropdown__panel {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.nav-dropdown__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.nav-dropdown__grid--audience {
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
}

.nav-dropdown--audience .nav-dropdown__panel {
  width: 300px;
  min-width: 300px;
}

.nav-dropdown__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease;
  cursor: pointer;
}

.nav-dropdown__item:hover,
.nav-dropdown__item:focus-visible {
  border-color: color-mix(in srgb, var(--color-primary) 18%, var(--color-border));
  background: color-mix(in srgb, var(--color-primary) 8%, var(--color-bg));
}

.nav-dropdown__item.active,
.mobile-nav-dropdown__item.active {
  color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 9%, var(--color-bg));
}

.nav-dropdown__item--all {
  grid-column: 1 / -1;
  align-items: center;
  border: 1px solid var(--color-border);
  background: color-mix(in srgb, var(--color-primary) 6%, var(--color-bg));
}

.nav-dropdown__all-arrow {
  flex: 0 0 auto;
  margin-left: auto;
  color: var(--color-primary);
  transition: transform 150ms ease;
}

.nav-dropdown__item--all:hover .nav-dropdown__all-arrow,
.nav-dropdown__item--all:focus-visible .nav-dropdown__all-arrow {
  transform: translateX(3px);
}

[data-theme="dark"] .nav-dropdown__item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.nav-dropdown--audience .nav-dropdown__item--all {
  border-color: transparent;
  background: transparent;
}

.nav-dropdown--audience .nav-dropdown__item--all:hover,
.nav-dropdown--audience .nav-dropdown__item--all:focus-visible,
.nav-dropdown--audience .nav-dropdown__item--all.active {
  border-color: color-mix(in srgb, var(--color-primary) 16%, var(--color-border));
  background: color-mix(in srgb, var(--color-primary) 8%, var(--color-bg));
}

.nav-dropdown--audience .nav-dropdown__item {
  border: 1px solid transparent;
}

.nav-dropdown--audience .nav-dropdown__item:hover,
.nav-dropdown--audience .nav-dropdown__item:focus-visible,
.nav-dropdown--audience .nav-dropdown__item.active {
  border-color: color-mix(in srgb, var(--color-primary) 18%, var(--color-border));
  background: color-mix(in srgb, var(--color-primary) 8%, var(--color-bg));
}

.nav-dropdown__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 1px;
}

.nav-dropdown__icon--category { width:32px; height:32px; margin-top:0; border-radius:9px; color:var(--nav-category-ink, #6366f1); background:color-mix(in srgb, currentColor 8%, transparent); }
.nav-dropdown__icon--category svg { flex:none; width:22px; height:22px; }
.nav-dropdown__icon--category[data-category="ai-writing-tools"] { --nav-category-ink:#7452ed; --nav-category-dark:#b59bff; }
.nav-dropdown__icon--category[data-category="text-tools"] { --nav-category-ink:#4267dc; --nav-category-dark:#92b0ff; }
.nav-dropdown__icon--category[data-category="pdf-tools"] { --nav-category-ink:#e05c69; --nav-category-dark:#ff99a3; }
.nav-dropdown__icon--category[data-category="image-tools"] { --nav-category-ink:#bf58d2; --nav-category-dark:#e7a1f5; }
.nav-dropdown__icon--category[data-category="video-tools"] { --nav-category-ink:#e87541; --nav-category-dark:#ffad83; }
.nav-dropdown__icon--category[data-category="social-tools"] { --nav-category-ink:#2878dc; --nav-category-dark:#83baff; }
.nav-dropdown__icon--category[data-category="seo-tools"] { --nav-category-ink:#0d9d91; --nav-category-dark:#65dfcc; }
.nav-dropdown__icon--category[data-category="developer-tools"] { --nav-category-ink:#5964cb; --nav-category-dark:#a8afff; }
.nav-dropdown__icon--category[data-category="utility-tools"] { --nav-category-ink:#de9b26; --nav-category-dark:#f8cd73; }
.nav-dropdown__icon--category[data-category="audio-tools"] { --nav-category-ink:#dd5b9d; --nav-category-dark:#ffa0ce; }
[data-theme="dark"] .nav-dropdown__icon--category { color:var(--nav-category-dark, #b59bff); }

/* Role icons share the same shapes across the header, mobile menu and role pages. */
.audience-icon { color: var(--audience-icon-ink, currentColor); }
.audience-icon--all { --audience-icon-ink: #0891a5; --audience-icon-dark: #67d8e3; }
.audience-icon--students { --audience-icon-ink: #4e6bdd; --audience-icon-dark: #a0b5ff; }
.audience-icon--office-workers { --audience-icon-ink: #7660d6; --audience-icon-dark: #bda7ff; }
.audience-icon--content-creators { --audience-icon-ink: #cc589b; --audience-icon-dark: #f9a0d1; }
.audience-icon--developers { --audience-icon-ink: #109985; --audience-icon-dark: #6bdcc7; }

.nav-dropdown--audience .nav-dropdown__item { align-items: center; }
.nav-dropdown--audience .nav-dropdown__icon {
  width: 36px;
  height: 36px;
  margin-top: 0;
}

.nav-dropdown--audience .audience-icon,
.mobile-nav-dropdown--audience .mobile-nav-dropdown__icon .audience-icon {
  box-sizing: content-box;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  padding: 6px;
  border-radius: 11px;
  background: color-mix(in srgb, currentColor 8%, transparent);
}

[data-theme="dark"] .audience-icon { color: var(--audience-icon-dark, currentColor); }

.alltoll-icon--image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.alltoll-icon--text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--alltoll-icon-size, 22px);
  line-height: 1;
}

.nav-dropdown__icon .alltoll-icon,
.mobile-nav-dropdown__icon .alltoll-icon {
  width: 20px;
  height: 20px;
}

.nav-dropdown__item > span:not(.nav-dropdown__icon) {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.nav-dropdown__name {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--color-text);
  line-height: 1.3;
}

.nav-dropdown__desc {
  font-size: 11px;
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* Scroll: adjust panel top if header shrinks */
@media (width < 1025px) {
  .nav-dropdown__panel,
  .tools-mega__panel { display: none; }
}

@media (min-width: 1025px) {
  .nav-dropdown__panel { top: 76px; }
}

@media (width < 1025px) {
  .nav-dropdown__panel { top: 70px; }
}

.header-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 8px;
  min-width: 0;
}

.site-header__buttons {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.site-header__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
}
.site-header__action svg { width: 24px; height: 24px; fill: currentColor; }
.site-header__action:hover { color: var(--color-primary); background: color-mix(in srgb, var(--color-primary) 8%, transparent); }
.site-header__action:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.site-header__donate {
  position: relative;
  color: #d64768;
  background: #fff0f3;
  border: 1px solid #f9d6df;
  text-decoration: none;
  transition: color .18s ease, background-color .18s ease, transform .18s ease;
}
.site-header__donate > svg { width: 21px; height: 21px; fill: none; }
.site-header__donate:hover,
.site-header__donate.is-current {
  color: #b92850;
  background: #ffe3ea;
  transform: translateY(-1px);
}
.site-header__donate-spark {
  position: absolute;
  top: 48%;
  left: 50%;
  width: 9px;
  height: 9px;
  color: #ec7590;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(.35);
}
.site-header__donate-spark svg { display: block; width: 100%; height: 100%; fill: currentColor; stroke: none; }
.site-header__donate-spark--one { --burst-x: -19px; --burst-y: -24px; --burst-rotate: -22deg; }
.site-header__donate-spark--two { --burst-x: 1px; --burst-y: -31px; --burst-rotate: 12deg; width: 7px; height: 7px; color: #ff9caa; }
.site-header__donate-spark--three { --burst-x: 20px; --burst-y: -21px; --burst-rotate: 27deg; width: 8px; height: 8px; color: #df5f82; }
.site-header__donate:is(:hover, :focus-visible) .site-header__donate-spark {
  animation: header-heart-burst .72s ease-out both;
}
.site-header__donate:is(:hover, :focus-visible) .site-header__donate-spark--two { animation-delay: .07s; }
.site-header__donate:is(:hover, :focus-visible) .site-header__donate-spark--three { animation-delay: .13s; }
@keyframes header-heart-burst {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.35); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) translate(var(--burst-x), var(--burst-y)) rotate(var(--burst-rotate)) scale(.8); }
}
@media (prefers-reduced-motion: reduce) {
  .site-header__donate,
  .site-header__donate-spark { transition: none; animation: none !important; }
}
[data-theme="dark"] .site-header__donate { color: #ff9bb3; background: #482337; border-color: #754057; }
.site-header__action-status { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* Shared language picker; the native select remains the no-JavaScript fallback. */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--color-text-secondary);
}

.lang-switcher__field {
  position: relative;
  display: flex;
  align-items: center;
  width: 160px;
  height: 40px;
  border: 1px solid color-mix(in srgb, var(--color-border) 90%, transparent);
  border-radius: 11px;
  background: color-mix(in srgb, var(--color-bg) 88%, transparent);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.lang-switcher__field:hover {
  border-color: color-mix(in srgb, var(--color-primary) 32%, var(--color-border));
  background: var(--color-bg);
}

.lang-switcher__field:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 14%, transparent);
}

.lang-switcher__flag {
  position: absolute;
  left: 10px;
  z-index: 1;
  font-size: 15px;
  line-height: 1;
  pointer-events: none;
}

.language-select {
  width: 100%;
  height: 100%;
  padding: 0 34px 0 35px;
  border: 0;
  outline: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  font: 500 13px/1.2 var(--font-sans);
}

.language-select option {
  color: #0f172a;
  background: #fff;
}

.lang-switcher__short { display: none; }

.lang-switcher__chevron {
  position: absolute;
  right: 10px;
  pointer-events: none;
  color: var(--color-text-muted);
}

@media (max-width: 1280px) {
  .header-actions .lang-switcher__field { width: 62px; }
  .header-actions .lang-switcher__flag { display: none; }
  .header-actions .language-select { padding: 0; color: transparent; }
  .header-actions .lang-switcher__short {
    position: absolute;
    inset: 0 18px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
    font: 600 12px/1 var(--font-sans);
    pointer-events: none;
  }
  .header-actions .lang-switcher__chevron { right: 6px; }
}

.mobile-nav__footer .lang-switcher__field {
  width: min(100%, 220px);
}

.lang-switcher.is-enhanced .lang-switcher__field > :is(.language-select, .lang-switcher__flag, .lang-switcher__short, .lang-switcher__chevron) {
  display: none;
}

.lang-switcher__trigger {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 14px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 0 8px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: var(--color-text);
  font: 500 13px/1.2 var(--font-body);
  white-space: nowrap;
  cursor: pointer;
}

.lang-switcher__trigger[hidden],
.lang-switcher__menu[hidden] { display: none; }
.lang-switcher__trigger:focus-visible { outline: none; }
.lang-switcher__code { text-align: center; color: var(--color-text-secondary); font-size: 11px; font-weight: 650; }
.lang-switcher__label { flex: 1; min-width: 0; overflow: hidden; text-align: left; text-overflow: ellipsis; }
.lang-switcher__arrow { flex: 0 0 auto; color: var(--color-text-muted); transition: transform 160ms ease; }
.lang-switcher.is-open .lang-switcher__arrow { transform: rotate(180deg); }
.lang-switcher.is-open .lang-switcher__field { border-color: color-mix(in srgb, var(--color-primary) 40%, var(--color-border)); }

.lang-switcher__menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 1000;
  display: grid;
  gap: 2px;
  width: 176px;
  max-width: calc(100vw - 24px);
  padding: 4px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-bg);
  box-shadow: 0 12px 36px rgba(15, 23, 42, .14), 0 2px 6px rgba(15, 23, 42, .04);
}

.lang-switcher__option {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 38px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--color-text);
  font: 500 13px/1.3 var(--font-body);
  text-align: left;
  cursor: pointer;
}

.lang-switcher__option:hover,
.lang-switcher__option:focus-visible {
  outline: none;
  border-color: color-mix(in srgb, var(--color-primary) 18%, var(--color-border));
  background: color-mix(in srgb, var(--color-primary) 5%, var(--color-bg));
}

.lang-switcher__option[aria-selected="true"] {
  background: color-mix(in srgb, var(--color-primary) 8%, var(--color-bg));
  color: var(--color-primary);
}

.lang-switcher__option-code {
  display: grid;
  place-items: center;
  height: 24px;
  border: 1px solid color-mix(in srgb, currentColor 12%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, currentColor 5%, transparent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
}

.lang-switcher__option-label { min-width: 0; line-height: 1.2; white-space: nowrap; }
.lang-switcher__check { width: 14px; height: 14px; opacity: 0; }
.lang-switcher__option[aria-selected="true"] .lang-switcher__check { opacity: 1; }
.mobile-nav__footer .lang-switcher__menu { top: auto; bottom: calc(100% + 6px); left: 0; right: auto; }
[data-theme="dark"] .lang-switcher__menu { background: var(--color-bg-elevated, #1e293b); box-shadow: 0 14px 40px rgba(0, 0, 0, .3); }

@media (max-width: 1280px) {
  .header-actions .lang-switcher__trigger { grid-template-columns: minmax(0, 1fr) 12px; gap: 3px; padding-inline: 5px; }
  .header-actions .lang-switcher__label { display: none; }
  .header-actions .lang-switcher__code { color: var(--color-text); font-size: 12px; }
  .header-actions .lang-switcher__arrow { width: 12px; height: 12px; }
}

/* Theme Toggle */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: color-mix(in srgb, var(--color-bg) 86%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-border) 90%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-text-secondary);
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
  flex-shrink: 0;
}

.theme-toggle:hover {
  background: color-mix(in srgb, var(--color-primary) 8%, var(--color-bg));
  border-color: color-mix(in srgb, var(--color-primary) 28%, var(--color-border));
  color: var(--color-primary);
  transform: translateY(-1px);
}

/* Tablet/mobile control; the desktop breakpoint below hides it explicitly. */
.mobile-menu-toggle { display: flex; }

[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }

/* Reveal the next theme over the previous snapshot from the top-right corner. */
html.theme-reveal::view-transition-group(root),
html.theme-reveal::view-transition-old(root),
html.theme-reveal::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}
html.theme-reveal::view-transition-old(root) { z-index: 1; }
html.theme-reveal::view-transition-new(root) { z-index: 2; }
html.theme-reveal *,
html.theme-reveal *::before,
html.theme-reveal *::after { transition: none !important; }

/* ===== SITE FOOTER ===== */
.site-footer {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(circle at 12% 28%, rgba(14, 165, 233, 0.12), transparent 28rem),
    radial-gradient(circle at 88% 82%, rgba(37, 99, 235, 0.1), transparent 25rem),
    #0b1f38;
  color: #e7f0fa;
  padding: 0 0 1.25rem;
  margin-top: clamp(6.5rem, 11vw, 8.5rem);
}

.site-footer::before {
  content: '';
  position: absolute;
  z-index: -1;
  top: 0;
  inset-inline: 0;
  height: 100%;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 76%);
}

.site-footer__inner {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-gutter);
}

.site-footer__share {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(1.75rem, 5vw, 5rem);
  min-height: 10.5rem;
  padding: clamp(1.5rem, 3.2vw, 2.25rem) clamp(1.4rem, 4vw, 3.25rem);
  border: 1px solid rgba(186, 230, 253, 0.2);
  border-radius: clamp(1.25rem, 2.4vw, 1.75rem);
  background:
    radial-gradient(circle at 88% 15%, rgba(125, 211, 252, 0.18), transparent 15rem),
    linear-gradient(135deg, #114b78 0%, #0d3b65 54%, #12365c 100%);
  box-shadow: 0 24px 54px rgba(3, 15, 31, 0.3);
  transform: translateY(-50%);
}

.site-footer__share::after {
  content: '';
  position: absolute;
  inset: 1px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.08), transparent 34%);
  pointer-events: none;
}

.site-footer__share-copy {
  min-width: 0;
  text-align: left;
}

.site-footer__share-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
  color: #7dd3fc;
  font-size: 0.74rem;
  font-weight: var(--font-semibold);
  letter-spacing: 0.085em;
  line-height: 1.3;
  text-transform: uppercase;
}

.site-footer__share h2 {
  max-width: none;
  margin: 0;
  color: #fff;
  font-size: clamp(1.25rem, 1.8vw, 1.75rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.17;
}

.site-footer__share-copy > p {
  max-width: 52ch;
  margin: 0.6rem 0 0;
  color: #bdd0e3;
  font-size: 0.9rem;
  line-height: 1.6;
}

.site-footer__share-dock {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 30px rgba(1, 12, 28, 0.22);
}

.site-footer__share-item {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  padding: 0;
  border: 1px solid #dbe7f2;
  border-radius: 50%;
  background: #f4f8fc;
  color: #37536f;
  text-decoration: none;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.site-footer__share-item svg {
  width: 1.05rem;
  height: 1.05rem;
}

.site-footer__share-item:hover {
  border-color: color-mix(in srgb, var(--share-brand, #0284c7) 32%, white);
  background: color-mix(in srgb, var(--share-brand, #0284c7) 10%, white);
  color: var(--share-brand, #0284c7);
  box-shadow: 0 7px 14px rgba(15, 55, 90, 0.13);
  transform: translateY(-2px);
}

.site-footer__share-item:focus-visible,
.site-footer__brand:focus-visible,
.site-footer__nav a:focus-visible {
  outline: 2px solid #7dd3fc;
  outline-offset: 3px;
}

.site-footer__share-item[data-share-network="linkedin"] { --share-brand: #0a66c2; }
.site-footer__share-item[data-share-network="x"] { --share-brand: #111827; }
.site-footer__share-item[data-share-network="whatsapp"] { --share-brand: #16a34a; }
.site-footer__share-item[data-share-network="email"] { --share-brand: #7c3aed; }
.site-footer__share-item[data-share-network="copy"] { --share-brand: #0284c7; }
.site-footer__share-item--donate { --share-brand: #b45309; }

.site-footer__share-tip {
  position: absolute;
  bottom: calc(100% + 0.55rem);
  left: 50%;
  z-index: 2;
  width: max-content;
  max-width: 12rem;
  padding: 0.35rem 0.55rem;
  border-radius: 0.45rem;
  background: #06172a;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.25;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 0.25rem);
  transition: opacity 150ms ease, transform 150ms ease;
}

.site-footer__share-item:hover .site-footer__share-tip,
.site-footer__share-item:focus-visible .site-footer__share-tip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.site-footer__check-icon,
.site-footer__share-item.is-copied .site-footer__copy-icon {
  display: none;
}

.site-footer__share-item.is-copied {
  border-color: #86efac;
  background: #dcfce7;
  color: #15803d;
}

.site-footer__share-item.is-copied .site-footer__check-icon {
  display: block;
}

.site-footer__share-item.has-error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #dc2626;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(13rem, 1.2fr) minmax(0, 0.82fr) minmax(0, 0.82fr) minmax(0, 1.18fr) minmax(0, 0.82fr);
  gap: clamp(1.25rem, 2vw, 2rem);
  margin-top: clamp(-2.5rem, -3vw, -1.5rem);
  padding-bottom: clamp(2.25rem, 4vw, 3.25rem);
}

.site-footer__about {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-self: center;
  width: 100%;
  max-width: 24rem;
  text-align: center;
}

.site-footer__brand {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-md);
}

.site-footer__brand img {
  display: block;
  width: 132px;
  height: 42px;
  object-fit: contain;
}

.site-footer__description {
  max-width: 34ch;
  margin: var(--space-4) auto 0;
  color: #a9bfd4;
  font-size: var(--text-sm);
  line-height: 1.65;
}

.site-footer__trust {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  width: min(100%, 26rem);
  padding: 0;
  margin: var(--space-5) 0 0;
  list-style: none;
  text-align: left;
}

.site-footer__trust li {
  max-width: 100%;
}

.site-footer__trust-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  max-width: 100%;
  padding: 0.42rem 0.65rem;
  border: 1px solid rgba(148, 199, 233, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: #d6e5f2;
  font-size: 0.76rem;
  line-height: 1.35;
  text-align: left;
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.site-footer__trust-trigger:hover,
.site-footer__trust li[data-open="true"] .site-footer__trust-trigger {
  border-color: rgba(125, 211, 252, 0.5);
  background: rgba(125, 211, 252, 0.1);
}

.site-footer__trust-trigger:focus-visible {
  outline: 2px solid #7dd3fc;
  outline-offset: 3px;
}

.site-footer__trust-trigger svg {
  flex: 0 0 auto;
  color: #38bdf8;
}

.site-footer__trust-detail {
  display: block;
  margin-top: 0.5rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid #dce4ef;
  border-radius: 0.65rem;
  background: #f8fafc;
  box-shadow: 0 10px 28px rgba(2, 12, 27, 0.2);
  color: #26364b;
  font-size: 0.78rem;
  line-height: 1.5;
}

.site-footer__trust[data-trust-ready] .site-footer__trust-detail {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 50%;
  z-index: 3;
  width: min(21rem, calc(100vw - 2.5rem));
  margin: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -0.25rem);
  transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
}

.site-footer__trust[data-trust-ready] li[data-open="true"] .site-footer__trust-detail {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.site-footer__nav {
  min-width: 0;
}

.site-footer__nav h2 {
  margin: 0 0 0.85rem;
  color: #f8fbff;
  font-size: 0.82rem;
  font-weight: 750;
  letter-spacing: 0.045em;
  line-height: 1.3;
  text-transform: uppercase;
}

.site-footer__nav ul {
  display: grid;
  gap: 0.45rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.site-footer__nav a {
  display: inline-flex;
  width: fit-content;
  color: #9eb5cb;
  text-decoration: none;
  font-size: var(--text-sm);
  line-height: 1.45;
  padding: 0.2rem 0;
  border-radius: var(--radius-md);
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.site-footer__nav a:hover {
  color: #7dd3fc;
  transform: translateX(3px);
}

.site-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  min-height: 3.5rem;
  padding-top: 1.15rem;
  border-top: 1px solid rgba(180, 207, 232, 0.14);
}

.site-footer__bottom p {
  margin: 0;
  color: #7893ad;
  font-size: 0.78rem;
  line-height: 1.5;
}

.site-footer__bottom a {
  color: #9eb5cb;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.site-footer__bottom a:hover,
.site-footer__bottom a:focus-visible {
  color: #7dd3fc;
}

@media (max-width: 960px) {
  .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer__share {
    gap: 1.5rem;
  }

  .site-footer__share-dock {
    padding: 0.45rem;
  }

  .site-footer__share-item {
    width: 2.4rem;
    height: 2.4rem;
  }
}

@media (max-width: 1100px) {
  .site-footer__share {
    grid-template-columns: 1fr;
    gap: 1.35rem;
  }

  .site-footer__share-copy {
    text-align: center;
  }

  .site-footer__share-copy > p {
    margin-right: auto;
    margin-left: auto;
  }

  .site-footer__share-dock {
    justify-self: center;
    width: fit-content;
  }

  .site-footer__trust[data-has-open="true"] {
    margin-bottom: 5.5rem;
  }

  .site-footer__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem 1.5rem;
  }

  .site-footer__about {
    grid-column: 1 / -1;
    max-width: 36rem;
  }
}

@media (max-width: 840px) {
  .site-footer {
    margin-top: 7rem;
  }

  .site-footer__grid {
    margin-top: -2.5rem;
  }

  .site-footer__description {
    max-width: 62ch;
  }
}

@media (max-width: 560px) {
  .site-footer {
    margin-top: 7.5rem;
  }

  .site-footer__share {
    min-height: 0;
    padding: 1.35rem 1.15rem;
    border-radius: 1.25rem;
  }

  .site-footer__share-eyebrow {
    justify-content: center;
    margin-bottom: 0.5rem;
  }

  .site-footer__share h2 {
    margin-inline: auto;
    font-size: 1.28rem;
  }

  .site-footer__share-copy > p {
    margin-top: 0.45rem;
    font-size: 0.82rem;
  }

  .site-footer__share-dock {
    gap: 0.32rem;
    max-width: 100%;
    padding: 0.38rem;
  }

  .site-footer__share-item {
    width: clamp(2.15rem, 10vw, 2.4rem);
    height: clamp(2.15rem, 10vw, 2.4rem);
  }

  .site-footer__share-tip {
    display: none;
  }

  .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem 1.25rem;
    margin-top: -3.5rem;
  }

  .site-footer__about {
    max-width: none;
    padding-bottom: 0.25rem;
  }

  .site-footer__bottom {
    min-height: 3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-footer__share-item,
  .site-footer__share-tip,
  .site-footer__nav a,
  .site-footer__trust-trigger,
  .site-footer__trust-detail {
    transition: none;
  }
}

/* ===== INPUTS / FORMS ===== */
.input,
input[type="text"],
input[type="email"],
input[type="search"],
input[type="url"],
textarea,
select {
  width: 100%;
  padding: 10px 14px;
  background: var(--color-bg);
  color: var(--color-text);
  border: none;
  border-radius: var(--radius-lg);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  box-shadow: var(--shadow-border);
  transition: all var(--transition-fast);
  outline: none;
}

.input:hover,
input:hover,
textarea:hover,
select:hover {
  box-shadow: var(--shadow-border-hover);
}

.input:focus,
input:focus,
textarea:focus,
select:focus {
  box-shadow: var(--shadow-focus);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

/* Range Slider */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: var(--color-bg-tertiary);
  border-radius: var(--radius-full);
  outline: none;
  box-shadow: var(--shadow-border);
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-primary);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(79, 70, 229, 0.4);
  transition: all var(--transition-fast);
}

input[type="range"]::-webkit-slider-thumb:hover {
  background: var(--color-primary-hover);
  transform: scale(1.15);
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.breadcrumb a:hover { color: var(--color-primary); }

.breadcrumb-sep {
  color: var(--color-border-strong);
  font-size: 10px;
}

.breadcrumb-current { color: var(--color-text); }

/* ===== TOOL AUDIENCE (short, crawlable SEO support block) ===== */
.tool-audience {
  display: grid;
  grid-template-columns: minmax(220px, .72fr) minmax(0, 1.28fr);
  gap: 26px;
  align-items: center;
  margin-top: var(--space-10);
  padding: 26px 30px;
  background:
    radial-gradient(circle at 8% 18%, rgba(124, 58, 237, .09), transparent 34%),
    color-mix(in srgb, var(--color-bg) 97%, #eef2ff);
  border: 1px solid color-mix(in srgb, var(--color-primary) 18%, var(--color-border));
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .055);
}

.tool-audience__heading > span {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--color-primary);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .1em;
}

.tool-audience__heading h2 {
  margin: 0 0 8px;
  color: var(--color-text);
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  line-height: 1.3;
  letter-spacing: -.025em;
}

.tool-audience__heading p {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: .92rem;
  line-height: 1.65;
}

.tool-audience__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tool-audience__list li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 11px 13px;
  color: var(--color-text);
  background: color-mix(in srgb, var(--color-bg) 94%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-primary) 11%, var(--color-border));
  border-radius: 12px;
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.4;
}

.tool-audience__list svg {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  padding: 4px;
  color: #fff;
  background: linear-gradient(135deg, #8b5cf6, #3b82f6);
  border-radius: 7px;
}

/* ===== FAQ SECTION (shared component) ===== */
.faq-section {
  --faq-gradient: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);
  padding: var(--space-16) 0;
  position: relative;
}

.faq-section--tool {
  margin-top: var(--space-12);
  padding: 0;
}

.faq-section::before {
  display: none;
}

.faq-section > .container {
  position: relative;
  z-index: 1;
}

.faq-section--tool > .container,
.faq-section--category > .container {
  width: 100%;
  max-width: none;
  padding-right: 0;
  padding-left: 0;
}

.faq-section__layout {
  display: grid;
  grid-template-columns: minmax(250px, .82fr) minmax(0, 1.48fr);
  gap: 28px;
  align-items: start;
  padding: 32px 36px;
  background: color-mix(in srgb, var(--color-bg) 96%, transparent);
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 24px;
  box-shadow: 0 20px 40px -10px rgba(15, 23, 42, .08);
}

.faq-section__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  align-self: flex-start;
  padding: 6px 14px;
  background: var(--color-bg);
  color: var(--cat-hsl-override, var(--color-primary));
  border: 1px solid color-mix(in srgb, var(--cat-hsl-override, var(--color-primary)) 15%, transparent);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .04);
}

.faq-section__heading {
  font-size: 1.35rem;
  font-weight: var(--font-extrabold);
  line-height: 1.25;
  letter-spacing: -0.03em;
  color: var(--color-text);
  margin: 0 0 var(--space-3);
}

.faq-section__heading-accent {
  color: transparent;
  background: var(--faq-gradient);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: var(--font-extrabold);
}

.faq-section__desc {
  font-size: .95rem;
  color: var(--color-text-secondary);
  line-height: 1.75;
  margin: 0 0 20px;
  max-width: 340px;
}

.faq-section__intro {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.faq-section__contact-card {
  position: relative;
  margin-top: 0;
  padding: 20px;
  overflow: hidden;
  color: var(--color-text);
  background: color-mix(in srgb, var(--color-bg) 90%, transparent);
  border: 1px solid color-mix(in srgb, var(--cat-hsl-override, var(--color-primary)) 14%, var(--color-border));
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .04);
}

.faq-section__contact-card::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  background: color-mix(in srgb, var(--cat-hsl-override, var(--color-primary)) 8%, transparent);
  border-radius: 50%;
  pointer-events: none;
}

.faq-section__contact-card::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 30px;
  width: 80px;
  height: 80px;
  background: color-mix(in srgb, #3b82f6 7%, transparent);
  border-radius: 50%;
  pointer-events: none;
}

.faq-contact-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  position: relative;
  z-index: 1;
}

.faq-contact-icon {
  width: 42px;
  height: 42px;
  color: #fff;
  background: var(--faq-gradient);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
  flex-shrink: 0;
}

.faq-section__contact-card h3 {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--color-text);
  margin: 0;
  position: relative;
  z-index: 1;
}

.faq-section__contact-card p {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.65;
  margin: 0 0 var(--space-4);
  max-width: 300px;
  position: relative;
  z-index: 1;
}

.faq-contact-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  background: var(--color-bg);
  color: var(--cat-hsl-override, var(--color-primary));
  border: 1px solid color-mix(in srgb, var(--cat-hsl-override, var(--color-primary)) 14%, var(--color-border));
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  text-decoration: none;
  transition: color .18s ease, border-color .18s ease, box-shadow .18s ease;
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 10px rgba(15, 23, 42, .05);
}

.faq-contact-btn:hover {
  color: #6d28d9;
  border-color: color-mix(in srgb, #7c3aed 30%, var(--color-border));
  box-shadow: 0 6px 16px rgba(124, 58, 237, .13);
}

.faq-contact-btn:active {
  box-shadow: 0 2px 7px rgba(124, 58, 237, .1);
}

.faq-contact-bubble {
  position: absolute;
  bottom: -10px;
  right: -10px;
  opacity: 0.12;
  z-index: 0;
}

.faq-section__list {
  display: flex;
  width: 100%;
  align-self: start;
  flex-direction: column;
  gap: 14px;
}

.faq-section__item {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .025);
  transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.faq-section__item:hover {
  background: var(--color-bg);
  border-color: color-mix(in srgb, var(--cat-hsl-override, var(--color-primary)) 18%, var(--color-border));
  box-shadow: 0 4px 14px rgba(124, 58, 237, .06);
}

.faq-section__item[open] {
  background: var(--color-bg);
  border-color: color-mix(in srgb, var(--cat-hsl-override, var(--color-primary)) 34%, var(--color-border));
  box-shadow: 0 8px 24px rgba(124, 58, 237, .1);
}

.faq-section__question {
  padding: 18px 20px;
  font-weight: var(--font-semibold);
  font-size: .96rem;
  color: var(--color-text);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  transition: color .18s ease, padding .18s ease;
}

.faq-section__question::-webkit-details-marker { display: none; }

.faq-section__question:hover {
  color: var(--cat-hsl-override, var(--color-primary));
}

/* Numbered marker on each question */
.faq-section__question::before {
  content: attr(data-num);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: color-mix(in srgb, var(--cat-hsl-override, var(--color-primary)) 10%, transparent);
  color: var(--cat-hsl-override, var(--color-primary));
  border-radius: 9px;
  font-size: 13px;
  line-height: 1;
  font-weight: var(--font-bold);
  flex-shrink: 0;
  transition: background 0.2s ease, color 0.2s ease;
}

.faq-section__item[open] .faq-section__question::before {
  background: var(--faq-gradient);
  color: #fff;
}

.faq-section__chevron {
  margin-left: auto;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  color: var(--cat-hsl-override, var(--color-primary));
  background: color-mix(in srgb, var(--cat-hsl-override, var(--color-primary)) 8%, var(--color-bg));
  border-radius: 9px;
  transition: color .2s ease, background-color .2s ease, box-shadow .2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.faq-section__chevron svg {
  transition: transform .24s cubic-bezier(.4, 0, .2, 1);
}

.faq-section__plus-line {
  transform-origin: center;
  transition: opacity .18s ease, transform .24s cubic-bezier(.4, 0, .2, 1);
}

.faq-section__item[open] .faq-section__chevron {
  color: #fff;
  background: var(--faq-gradient);
  box-shadow: 0 4px 10px rgba(124, 58, 237, .23);
}

.faq-section__item[open] .faq-section__chevron svg {
  transform: rotate(180deg);
}

.faq-section__item[open] .faq-section__plus-line {
  opacity: 0;
  transform: scaleY(0);
}

.faq-section__item[open] .faq-section__question {
  padding-bottom: 12px;
  color: var(--cat-hsl-override, var(--color-primary));
}

.faq-section__answer {
  padding: 0 20px 20px 62px;
  font-size: .92rem;
  color: var(--color-text-secondary);
  line-height: 1.65;
  margin: 0;
  animation: faqAnswerIn .25s ease-out both;
}

.faq-section__item--more {
  display: none;
}

.faq-section__list.is-expanded .faq-section__item--more {
  display: block;
  animation: faqMoreReveal .22s ease both;
}

.faq-section__more-toggle {
  align-self: center;
  min-width: 154px;
  min-height: 42px;
  margin: 4px auto 0;
  padding: 9px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--color-primary) 28%, var(--color-border));
  border-radius: 999px;
  color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 6%, var(--color-bg));
  box-shadow: 0 6px 18px rgba(79, 70, 229, .08);
  font: inherit;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  transition: color .16s ease, background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.faq-section__more-toggle:hover {
  color: #fff;
  border-color: var(--color-primary);
  background: var(--color-primary);
  box-shadow: 0 8px 22px rgba(79, 70, 229, .18);
}

.faq-section__more-toggle:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--color-primary) 25%, transparent);
  outline-offset: 3px;
}

.faq-section__more-toggle svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  transition: transform .2s ease;
}

.faq-section__more-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

@keyframes faqMoreReveal {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Slim CTA đặt ngay sau khối FAQ: đủ nổi bật nhưng không tạo cảm giác quảng cáo. */
.faq-support-cta {
  position: relative;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
  padding: 18px 20px;
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 20%, rgba(139, 92, 246, .11), transparent 34%),
    linear-gradient(135deg, color-mix(in srgb, var(--color-bg) 95%, #eef2ff), color-mix(in srgb, var(--color-bg) 96%, #eff6ff));
  border: 1px solid color-mix(in srgb, var(--cat-hsl-override, var(--color-primary)) 20%, var(--color-border));
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
}

.faq-support-cta::after {
  content: '';
  position: absolute;
  top: -55px;
  right: 23%;
  width: 140px;
  height: 140px;
  background: color-mix(in srgb, #3b82f6 6%, transparent);
  border-radius: 50%;
  pointer-events: none;
}

.faq-support-cta__icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  color: #fff;
  background: var(--faq-gradient);
  border-radius: 15px;
  box-shadow: 0 8px 18px rgba(99, 102, 241, .24);
}

.faq-support-cta__icon svg { width: 29px; height: 29px; }
.faq-support-cta__content { position: relative; z-index: 1; min-width: 0; }
.faq-support-cta__content h2 {
  margin: 0 0 5px;
  color: var(--color-text);
  font-size: .92rem;
  font-weight: var(--font-extrabold);
  letter-spacing: .055em;
}
.faq-support-cta__content p {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: .9rem;
  line-height: 1.55;
}

.faq-support-cta__actions {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 9px;
}

.faq-support-cta__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: .78rem;
  font-weight: var(--font-bold);
  letter-spacing: .025em;
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.faq-support-cta__button svg { width: 17px; height: 17px; }
.faq-support-cta__button--support {
  color: #fff;
  background: var(--faq-gradient);
  box-shadow: 0 7px 16px rgba(99, 102, 241, .2);
}
.faq-support-cta__button--advertise {
  color: var(--color-text);
  background: var(--color-bg);
  border-color: var(--color-border);
  box-shadow: 0 4px 12px rgba(15, 23, 42, .05);
}
.faq-support-cta__button:hover {
  transform: translateY(-1px);
}
.faq-support-cta__button--support:hover { color: #fff; box-shadow: 0 9px 22px rgba(99, 102, 241, .28); }
.faq-support-cta__button--advertise:hover {
  color: var(--cat-hsl-override, var(--color-primary));
  border-color: color-mix(in srgb, var(--cat-hsl-override, var(--color-primary)) 35%, var(--color-border));
}
.faq-support-cta__button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--cat-hsl-override, var(--color-primary)) 28%, transparent);
  outline-offset: 3px;
}

/* ===== DONATION POPUP (opened by FAQ support CTA) ===== */
.donation-modal {
  position: fixed;
  inset: 0;
  z-index: 10040;
  display: grid;
  place-items: center;
  padding: 18px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}
.donation-modal.is-open { opacity: 1; visibility: visible; }
.donation-modal__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  background: rgba(15, 23, 42, .68);
  border: 0;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  cursor: default;
}
.donation-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(680px, 100%);
  max-height: calc(100vh - 36px);
  padding: 24px;
  overflow-x: hidden;
  overflow-y: auto;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid rgba(148, 163, 184, .26);
  border-radius: 22px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, .35);
  opacity: 0;
  transform: translateY(18px) scale(.98);
  transition: opacity .22s ease, transform .22s ease;
}
.donation-modal.is-open .donation-modal__dialog { opacity: 1; transform: none; }
.donation-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--color-text-secondary);
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: 11px;
  cursor: pointer;
  transition: color .18s ease, background-color .18s ease, border-color .18s ease;
}
.donation-modal__close svg { width: 19px; height: 19px; }
.donation-modal__close:hover,
.donation-modal__close:focus-visible { color: #dc2626; background: #fff1f2; border-color: #fecdd3; outline: none; }
.donation-modal__header {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 0 42px 18px 0;
  border-bottom: 1px solid var(--color-border);
}
.donation-modal__heart {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  color: #fff;
  background: linear-gradient(135deg, #8b5cf6, #3b82f6);
  border-radius: 15px;
  box-shadow: 0 8px 18px rgba(99, 102, 241, .24);
}
.donation-modal__heart svg { width: 27px; height: 27px; }
.donation-modal__header h2 { margin: 0 0 4px; color: var(--color-text); font-size: 1.22rem; font-weight: var(--font-extrabold); letter-spacing: -.02em; }
.donation-modal__header p { margin: 0; color: var(--color-text-secondary); font-size: .88rem; line-height: 1.55; }
.donation-modal__tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin: 18px 0;
  padding: 5px;
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: 13px;
}
.donation-modal__tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  color: var(--color-text-secondary);
  background: transparent;
  border: 0;
  border-radius: 9px;
  font-size: .84rem;
  font-weight: var(--font-semibold);
  cursor: pointer;
}
.donation-modal__tab svg { width: 18px; height: 18px; }
.donation-modal__tab.is-active { color: #fff; background: linear-gradient(135deg, #6366f1, #3b82f6); box-shadow: 0 5px 12px rgba(99, 102, 241, .2); }
.donation-modal__panel { display: none; }
.donation-modal__panel.is-active { display: grid; animation: donationPanelIn .2s ease both; }
.donation-modal__panel[data-donation-panel="bank"] { grid-template-columns: minmax(190px, .82fr) minmax(0, 1.18fr); gap: 20px; align-items: center; padding-top: 18px; }
.donation-modal__tabs + .donation-modal__panel { padding-top: 0; }
.donation-modal__qr-wrap {
  padding: 12px;
  background: #fff;
  border: 1px solid #dbe4f0;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
}
.donation-modal__qr { display: block; width: 100%; max-height: 265px; object-fit: contain; user-select: none; -webkit-user-select: none; border-radius: 10px; }
.donation-modal__download {
  width: fit-content;
  max-width: 100%;
  min-height: 36px;
  margin: 10px auto 0;
  padding: 0 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #fff;
  background: #172033;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-size: .74rem;
  font-weight: 700;
  cursor: pointer;
}
.donation-modal__download:hover { background: #0f172a; transform: translateY(-1px); }
.donation-modal__download:disabled { opacity: .65; cursor: wait; }
.donation-modal__download svg { width: 16px; height: 16px; }
.donation-modal__scan-label { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 9px; color: #475569; font-size: .72rem; font-weight: 600; text-align: center; }
.donation-modal__scan-label svg { width: 15px; height: 15px; color: #4f46e5; }
.donation-modal__bank-info { display: flex; min-width: 0; flex-direction: column; gap: 9px; }
.donation-modal__info-row,
.donation-modal__copy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 52px;
  padding: 10px 12px;
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: 12px;
}
.donation-modal__info-row span,
.donation-modal__copy-row span { display: block; margin-bottom: 2px; color: var(--color-text-muted, var(--color-text-secondary)); font-size: .7rem; }
.donation-modal__info-row strong,
.donation-modal__copy-row strong { display: block; color: var(--color-text); font-size: .87rem; font-weight: var(--font-bold); overflow-wrap: anywhere; }
.donation-modal__copy-row button {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  padding: 0;
  color: #4f46e5;
  background: color-mix(in srgb, #6366f1 9%, var(--color-bg));
  border: 1px solid color-mix(in srgb, #6366f1 16%, var(--color-border));
  border-radius: 9px;
  cursor: pointer;
}
.donation-modal__copy-row button svg { width: 17px; height: 17px; }
.donation-modal__copy-row button:hover,
.donation-modal__copy-row button.is-copied { color: #15803d; background: #f0fdf4; border-color: #bbf7d0; }
.donation-modal__thanks { margin: 4px 0 0; color: var(--color-text-secondary); font-size: .78rem; line-height: 1.5; text-align: center; }
.donation-modal__panel--paypal { justify-items: center; padding: 32px 20px 16px; text-align: center; }
.donation-modal__paypal-logo { display: grid; place-items: center; width: 70px; height: 70px; margin-bottom: 15px; color: #0070ba; background: #eff8ff; border-radius: 20px; }
.donation-modal__paypal-logo svg { width: 40px; height: 40px; }
.donation-modal__panel--paypal h3 { margin: 0 0 8px; color: var(--color-text); font-size: 1.08rem; }
.donation-modal__panel--paypal p { max-width: 400px; margin: 0 0 18px; color: var(--color-text-secondary); font-size: .87rem; line-height: 1.6; }
.donation-modal__paypal-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; color: #fff; background: linear-gradient(135deg, #0070ba, #003087); border-radius: 11px; box-shadow: 0 8px 20px rgba(0, 48, 135, .22); font-size: .85rem; font-weight: 700; text-decoration: none; }
.donation-modal__paypal-button:hover { color: #fff; transform: translateY(-1px); }
.donation-modal__paypal-button svg { width: 19px; height: 19px; }
.donation-modal__status { min-height: 18px; margin-top: 8px; color: #15803d; font-size: .75rem; font-weight: 700; text-align: center; }
@keyframes donationPanelIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

@keyframes faqAnswerIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

/* Tool page FAQ: heading style */
.faq-section__tool-heading {
  font-size: var(--text-2xl);
  font-weight: var(--font-extrabold);
  color: var(--color-text);
  margin: 0 0 var(--space-6);
  letter-spacing: -0.02em;
}

/* ===== BACKWARD COMPAT: old .faq-item classes → unified .faq-section__* ===== */
/* Tool pages that still use inline HTML with old class names get the new look */
.faq-item {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.faq-item:hover {
  border-color: color-mix(in srgb, var(--color-primary) 40%, var(--color-border));
}

.faq-question {
  padding: var(--space-4) var(--space-5);
  font-weight: var(--font-semibold);
  font-size: var(--text-sm);
  color: var(--color-text);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  transition: background 0.15s ease;
}

.faq-question::-webkit-details-marker { display: none; }

.faq-question::after {
  content: '';
  width: 18px;
  height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%234f46e5' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item[open] .faq-question::after {
  transform: rotate(180deg);
}

.faq-question:hover { background: var(--color-bg-secondary); }

.faq-answer {
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.75;
  margin: 0;
}

/* FAQ section wrapper for inline HTML tool pages */
.faq > h2 {
  font-size: var(--text-2xl);
  font-weight: var(--font-extrabold);
  color: var(--color-text);
  margin: 0 0 var(--space-6);
  letter-spacing: -0.02em;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

@media (max-width: 860px) {
  .faq-section__layout {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 28px 24px;
  }

  .faq-section__heading { font-size: 1.35rem; }
  .faq-section__desc { max-width: 620px; }
  .faq-section__contact-card { margin-top: 0; }
  .faq-support-cta { grid-template-columns: 48px minmax(0, 1fr); padding: 17px 18px; }
  .faq-support-cta__icon { width: 48px; height: 48px; border-radius: 14px; }
  .faq-support-cta__actions { grid-column: 1 / -1; justify-content: flex-end; }
}

@media (max-width: 480px) {
  .faq-section { padding: var(--space-10) 0; }
  .faq-section--tool { margin-top: var(--space-10); padding: 0; }
  .faq-section::before { display: none; }
  .faq-section__layout {
    gap: 24px;
    padding: 22px 18px;
    background: var(--color-bg);
    border-radius: 20px;
  }
  .faq-section__badge { margin-bottom: 16px; }
  .faq-section__heading { font-size: 1.3rem; }
  .faq-section__desc { margin-bottom: 22px; font-size: .94rem; }
  .faq-section__contact-card { padding: 20px; }
  .faq-section__question { padding: 16px; font-size: .94rem; }
  .faq-section__item[open] .faq-section__question { padding-bottom: 10px; }
  .faq-section__answer { padding: 0 16px 16px 58px; font-size: .88rem; }
  .faq-support-cta { grid-template-columns: 42px minmax(0, 1fr); gap: 13px; margin-top: 14px; padding: 16px; border-radius: 16px; }
  .faq-support-cta__icon { width: 42px; height: 42px; border-radius: 12px; }
  .faq-support-cta__icon svg { width: 23px; height: 23px; }
  .faq-support-cta__content h2 { font-size: .84rem; }
  .faq-support-cta__content p { font-size: .84rem; }
  .faq-support-cta__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .faq-support-cta__button { min-width: 0; padding: 0 10px; font-size: .73rem; }
  .donation-modal { padding: 10px; }
  .donation-modal__dialog { max-height: calc(100vh - 20px); padding: 18px 15px 15px; border-radius: 18px; }
  .donation-modal__close { top: 10px; right: 10px; width: 32px; height: 32px; }
  .donation-modal__header { grid-template-columns: 42px minmax(0, 1fr); gap: 11px; padding: 0 34px 15px 0; }
  .donation-modal__heart { width: 42px; height: 42px; border-radius: 12px; }
  .donation-modal__heart svg { width: 23px; height: 23px; }
  .donation-modal__header h2 { font-size: 1.02rem; }
  .donation-modal__header p { font-size: .78rem; }
  .donation-modal__tabs { margin: 14px 0; }
  .donation-modal__panel[data-donation-panel="bank"] { grid-template-columns: 1fr; gap: 13px; padding-top: 14px; }
  .donation-modal__tabs + .donation-modal__panel { padding-top: 0; }
  .donation-modal__qr-wrap { width: min(245px, 100%); margin: auto; padding: 9px; }
  .donation-modal__qr { max-height: 220px; }
  .donation-modal__info-row,
  .donation-modal__copy-row { min-height: 46px; padding: 8px 10px; }
}

[data-theme="dark"] .faq-section__layout {
  background: color-mix(in srgb, var(--color-bg) 92%, transparent);
  border-color: rgba(148, 163, 184, .16);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .28);
}
[data-theme="dark"] .faq-section__badge,
[data-theme="dark"] .faq-section__contact-card,
[data-theme="dark"] .faq-section__item[open] { background: var(--color-bg-secondary); }
[data-theme="dark"] .faq-section__item { border-color: rgba(148, 163, 184, .16); }
[data-theme="dark"] .faq-support-cta {
  background: linear-gradient(135deg, color-mix(in srgb, var(--color-bg-secondary) 92%, #312e81), var(--color-bg-secondary));
  border-color: rgba(129, 140, 248, .22);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .22);
}
[data-theme="dark"] .faq-support-cta__button--advertise { background: var(--color-bg-secondary); }
[data-theme="dark"] .donation-modal__dialog { border-color: rgba(148, 163, 184, .2); }
[data-theme="dark"] .donation-modal__close:hover { color: #fecaca; background: rgba(127, 29, 29, .35); border-color: rgba(248, 113, 113, .35); }

@media (prefers-reduced-motion: reduce) {
  .faq-section__item,
  .faq-section__question,
  .faq-section__chevron,
  .faq-contact-btn,
  .faq-support-cta__button,
  .faq-section__more-toggle,
  .faq-section__more-toggle svg,
  .donation-modal,
  .donation-modal__dialog { transition: none; }
  .faq-section__answer,
  .faq-section__list.is-expanded .faq-section__item--more { animation: none; }
  .donation-modal__panel.is-active { animation: none; }
}

/* ===== BENEFIT CARD ===== */
.benefit-card {
  background: var(--color-bg);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  box-shadow: var(--shadow-card);
  transition: all var(--transition-fast);
}

.benefit-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.benefit-icon {
  font-size: 1.75rem;
  line-height: 1;
  margin-bottom: var(--space-4);
}

.benefit-card h3 {
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  color: var(--color-text);
  margin: 0 0 var(--space-2);
}

.benefit-card p {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  margin: 0;
}

/* ===== SECTION HEADER ===== */
.section__header {
  text-align: center;
  margin-bottom: var(--space-10);
}

.section__title {
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  color: var(--color-text);
  margin: 0 0 var(--space-3);
  letter-spacing: -0.02em;
}

.section__subtitle {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  margin: 0;
}

/* ===== TOAST ===== */
.toast-container {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  pointer-events: none;
}

.toast {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-5);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-text);
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: toastIn 0.25s var(--ease-spring);
  border: 1px solid var(--color-border);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== SHARED AD SLOTS =====
   Inactive slots never reserve space. Markup is emitted only when Ad Manager
   is enabled and the selected provider has valid credentials for that slot. */
.ad-slot {
  display: none;
  width: 100%;
  overflow: hidden;
}

.ad-slot.is-active {
  display: block;
  margin: var(--space-6) 0;
}

.ad-slot--banner.is-active,
.ad-slot--mobile.is-active {
  min-height: 90px;
}

.ad-slot--rectangle.is-active,
.ad-slot--fluid.is-active {
  min-height: 180px;
}

.ad-slot--sidebar.is-active {
  min-height: 250px;
}

.ad-slot--mobile.is-active {
  display: none;
}

@media (max-width: 700px) {
  .ad-slot--sidebar.is-active {
    display: none;
  }

  .ad-slot--mobile.is-active {
    display: block;
  }
}

/* ===== TOOL PAGE LAYOUT ===== */
.tool-page {
  --container-max: 1320px;
  padding-top: var(--space-8);
  padding-bottom: var(--space-16);
}

.tool-h1 {
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  color: var(--color-text);
  margin: 0 0 var(--space-4);
  letter-spacing: -0.02em;
}

.tool-intro {
  margin-bottom: var(--space-8);
}

.tool-intro p {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
}

.tool-ui {
  background: var(--color-bg);
  border-radius: var(--radius-2xl);
  padding: var(--space-6);
  margin-bottom: var(--space-8);
  box-shadow: var(--shadow-card);
}

.tool-ui__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.tool-ui__heading { min-width: 0; }
.tool-ui__kicker { display: block; margin-bottom: var(--space-1); color: var(--color-primary); font-size: var(--text-xs); font-weight: var(--font-semibold); letter-spacing: .08em; }
.tool-ui__title { margin: 0; color: var(--color-text); font-size: var(--text-xl); line-height: 1.4; }
.tool-ui__description { margin: var(--space-1) 0 0; color: var(--color-text-secondary); font-size: var(--text-sm); line-height: 1.6; }
.tool-ui__badge { flex: 0 0 auto; }

@media (max-width: 720px) {
  .tool-ui__header { flex-direction: column; }
  .tool-ui__title { font-size: var(--text-lg); }
}

/* ===== MODAL ===== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--color-overlay);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  backdrop-filter: blur(4px);
}

.modal {
  background: var(--color-bg);
  border-radius: var(--radius-2xl);
  padding: var(--space-6);
  max-width: 500px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
}

/* ===== STEPS ===== */
.step {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}

.step-number {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-bold);
  font-size: var(--text-sm);
}

.step-body {
  flex: 1;
}

.step-body h3,
.step-title {
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  color: var(--color-text);
  margin: 0 0 var(--space-2);
}

.step-body p,
.step-desc {
  font-size: .875rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* ===== PANEL ===== */
.panel {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--color-bg);
  box-shadow: var(--shadow-card);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  background: var(--color-bg-secondary);
  border-bottom: 1px solid var(--color-border);
  gap: var(--space-3);
}

.panel-title {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--color-text);
  margin: 0;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.char-count {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  white-space: nowrap;
}

.panel textarea,
.result-output {
  border: none;
  border-radius: 0;
  resize: none;
  min-height: 240px;
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  flex: 1;
  padding: var(--space-4);
  background: var(--color-bg);
  box-shadow: none;
}

.panel textarea:focus,
.result-output:focus {
  outline: none;
  box-shadow: none;
}

/* ===== CHECKBOX ===== */
.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  cursor: pointer;
}

input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

/* ===== RESPONSIVE — Tablet & Mobile Navigation ===== */
.mobile-nav,
.mobile-nav-backdrop,
.mobile-menu-toggle { display: none; }

@media (width < 1025px) {
  .site-header {
    height: 68px;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    transition: none;
  }
  .site-header,
  .site-header.is-top,
  .site-header.is-scrolled,
  [data-theme="light"] .site-header.is-scrolled {
    background: var(--color-bg);
    border-bottom-color: var(--color-border);
    box-shadow: 0 1px 6px rgba(15, 23, 42, .08);
  }
  .site-header__inner {
    display: flex;
    max-width: none;
    gap: 10px;
    padding: 0 var(--container-gutter);
  }
  .site-header__logo { flex-shrink: 0; }
  .site-header__logo-icon { width: clamp(120px, 20vw, 160px); height: auto; }
  .site-header__nav {
    display: none;
  }
  .site-header.is-top .site-header__logo-icon,
  .site-header.is-scrolled .site-header__logo-icon { transform: none; }
  .header-actions { margin-left: auto; flex-shrink: 0; }
  .site-footer { padding: clamp(2.75rem, 6vw, 3.75rem) 0 1.15rem; }

  /* Mobile toggle button */
  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid color-mix(in srgb, var(--color-border) 90%, transparent);
    border-radius: 10px;
    background: color-mix(in srgb, var(--color-bg) 86%, transparent);
    cursor: pointer;
    color: inherit;
    transition: background 150ms ease;
    flex-shrink: 0;
    padding: 0;
  }
  .mobile-menu-toggle:hover {
    background: color-mix(in srgb, var(--color-primary) 8%, var(--color-bg));
    border-color: color-mix(in srgb, var(--color-primary) 28%, var(--color-border));
    color: var(--color-primary);
  }
  .mobile-menu-toggle .icon-close { display: none; }
  .mobile-menu-toggle.is-open .icon-hamburger { display: none; }
  .mobile-menu-toggle.is-open .icon-close { display: block; }

  /* Mobile nav overlay */
  .mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-width: none;
    z-index: var(--z-modal, 9999);
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateX(100%);
    transition: transform 220ms ease, opacity 180ms ease, visibility 180ms ease;
    background: var(--color-surface, #fff);
    border: 0;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
  }
  .mobile-nav.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
  }
  body.mobile-nav-open .arcontactus-widget,
  body.mobile-nav-open .alltoll-feedback-dock {
    visibility: hidden !important;
    pointer-events: none !important;
  }
  .mobile-nav__inner {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 640px;
    height: 100%;
    margin: 0 auto;
    padding: 12px 12px 10px;
  }
  .mobile-nav__header {
    display: grid;
    grid-template-columns: minmax(36px, 1fr) auto minmax(36px, 1fr);
    align-items: center;
    padding: 0 6px 12px;
    margin-bottom: 4px;
  }
  .mobile-nav__title {
    color: var(--color-text, #171717);
    font-size: 1.05rem;
    font-weight: 750;
    letter-spacing: -0.01em;
  }
  .mobile-nav__brand { display: inline-flex; grid-column: 2; align-items: center; justify-self: center; text-decoration: none; }
  .mobile-nav__brand-logo { display: block; width: 140px; height: auto; object-fit: contain; }
  .mobile-nav__brand-logo--dark { display: none; }
  [data-theme="dark"] .mobile-nav__brand-logo--light { display: none; }
  [data-theme="dark"] .mobile-nav__brand-logo--dark { display: block; }
  .mobile-nav__close {
    display: inline-flex;
    grid-column: 3;
    align-items: center;
    justify-content: center;
    justify-self: end;
    gap: 5px;
    width: 36px;
    min-height: 36px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--color-text-secondary);
    font: inherit;
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
  }
  .mobile-nav__close:hover {
    background: color-mix(in srgb, var(--color-primary) 13%, var(--color-surface, #ffffff));
    border-color: color-mix(in srgb, var(--color-primary) 40%, var(--color-border));
  }
  .mobile-nav__close:active { transform: scale(.96); }
  .mobile-nav__close:focus-visible { outline: 3px solid color-mix(in srgb, var(--color-primary) 32%, transparent); outline-offset: 2px; }
  .mobile-nav__close svg { flex: 0 0 auto; }
  .mobile-nav__scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--color-primary) 30%, transparent) transparent;
  }
  .mobile-nav__scroll::-webkit-scrollbar { width: 3px; }
  .mobile-nav__scroll::-webkit-scrollbar-track { background: transparent; }
  .mobile-nav__scroll::-webkit-scrollbar-thumb { border-radius: 999px; background: color-mix(in srgb, var(--color-primary) 35%, transparent); }
  .mobile-nav__scroll::-webkit-scrollbar-button { display: none; }
  .mobile-nav__scroll--compact { scrollbar-width: none; }
  .mobile-nav__scroll--compact::-webkit-scrollbar { display: none; }
  .mobile-nav__scrollbar {
    position: absolute;
    right: 1px;
    width: 12px;
    touch-action: none;
    cursor: grab;
  }
  .mobile-nav__scrollbar[hidden] { display: none; }
  .mobile-nav__scrollbar:active { cursor: grabbing; }
  .mobile-nav__scrollbar-thumb {
    position: absolute;
    top: 0;
    right: 4px;
    width: 3px;
    height: 40px;
    max-height: 100%;
    border-radius: 999px;
    background: color-mix(in srgb, var(--color-primary) 40%, transparent);
    pointer-events: none;
  }
  .mobile-nav__scrollbar:hover .mobile-nav__scrollbar-thumb { background: var(--color-primary); }
  .mobile-nav__links {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .mobile-nav__bottom-links {
    margin-top: 12px;
    padding: 12px 0 10px;
    border-top: 1px solid var(--color-border);
  }
  .mobile-tools-search {
    display: grid;
    flex: 0 0 auto;
    margin: 0 3px 10px;
  }
  .mobile-nav .mobile-tools-search { grid-template-columns: 18px minmax(0,1fr) 32px; min-height: 40px; gap: 7px; padding: 0 4px 0 11px; border: 1px solid var(--color-border); border-radius: 9px; background: var(--color-bg); box-shadow: none; }
  .mobile-nav .mobile-tools-search > svg { width: 17px; height: 17px; color: var(--color-text-muted); }
  .mobile-nav .mobile-tools-search input { height: 38px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; font-size: calc(.8rem + 2px); font-weight: 400; }
  .mobile-nav .mobile-tools-search > button { width: 32px; height: 32px; border-radius: 8px; background: color-mix(in srgb, var(--color-primary) 10%, var(--color-surface)); color: var(--color-primary); box-shadow: none; transition: background 160ms ease, color 160ms ease, transform 160ms ease; }
  .mobile-nav .mobile-tools-search > button svg { width: 18px; height: 18px; }
  .mobile-nav .mobile-tools-search > button:hover { background: var(--color-primary); color: #fff; transform: none; }
  .mobile-nav .mobile-tools-search > button:active { transform: scale(.94); }
  .mobile-nav .mobile-tools-search > button:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
  @media (prefers-reduced-motion: reduce) { .mobile-nav .mobile-tools-search > button { transition: none; } }
  .mobile-tools-search .header-tools-search__results {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    width: auto;
    max-height: min(390px, calc(100dvh - 220px));
  }
  .mobile-nav__link {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 44px;
    padding: 8px 11px;
    border-radius: 10px;
    font-size: calc(.86rem + 2px);
    font-weight: 450;
    color: var(--color-text, #171717);
    text-decoration: none;
    transition: background 150ms ease, color 150ms ease;
  }
  .mobile-nav__link:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--color-primary, #4f46e5);
  }
  .mobile-nav__link.active {
    background: rgba(79, 70, 229, 0.08);
    color: var(--color-primary, #4f46e5);
    font-weight: 600;
    box-shadow: none;
  }
  .mobile-nav__link-icon { display: inline-flex; align-items: center; justify-content: center; width: 28px; flex: 0 0 28px; color: var(--color-text-secondary); }
  .mobile-nav__link-icon svg { flex: none; width: 23px; height: 23px; max-width: none; }
  .mobile-nav__link > span:not(.mobile-nav__link-icon) { min-width: 0; overflow-wrap: anywhere; }
  .mobile-nav__link[data-nav="ai-hub"] { --mobile-link-ink: #7452ed; --mobile-link-dark: #b59bff; }
  .mobile-nav__link[data-nav="tools"] { --mobile-link-ink: #5964cb; --mobile-link-dark: #a8afff; }
  .mobile-nav__link[data-nav="blog"] { --mobile-link-ink: #2878dc; --mobile-link-dark: #83baff; }
  .mobile-nav__link[data-nav="about"] { --mobile-link-ink: #4e6bdd; --mobile-link-dark: #a0b5ff; }
  .mobile-nav__link[data-nav="contact"] { --mobile-link-ink: #0891a5; --mobile-link-dark: #67d8e3; }
  .mobile-nav__link[data-nav="content-partnership"] { --mobile-link-ink: #7660d6; --mobile-link-dark: #bda7ff; }
  .mobile-nav__link[data-nav="promote-kitotool"] { --mobile-link-ink: #cc589b; --mobile-link-dark: #f9a0d1; }
  .mobile-nav__link[data-nav="partner-network"] { --mobile-link-ink: #109985; --mobile-link-dark: #6bdcc7; }
  .mobile-nav__link[data-nav] .mobile-nav__link-icon { color: var(--mobile-link-ink, var(--color-text-secondary)); }
  .mobile-nav__link:is([data-nav="ai-hub"], [data-nav="tools"], [data-nav="blog"]) .mobile-nav__link-icon svg {
    flex: none;
    width: 28px;
    height: 28px;
    max-width: none;
  }
  [data-theme="dark"] .mobile-nav__link[data-nav] .mobile-nav__link-icon {
    color: var(--mobile-link-dark, var(--color-text-secondary));
  }
  .mobile-nav__link.active .mobile-nav__link-icon { color: inherit; }
  .mobile-nav__link.active::after { content: ''; width: 5px; height: 5px; margin-left: auto; border-radius: 50%; background: currentColor; }
  .mobile-nav__audience-label { flex: 1; }
  .mobile-nav__footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 3px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
  }
  .mobile-nav__footer .lang-switcher { flex: 1; min-width: 0; }
  .mobile-nav__footer .lang-switcher__field { height: 38px; min-height: 38px; border-radius: 9px; box-shadow: none; }
  .mobile-nav__footer .language-select { font-size: calc(.8rem + 2px); }
  .mobile-nav__support { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; color: #d35a72; text-decoration: none; }
  .mobile-nav__support:hover { background: color-mix(in srgb,#e65d7d 8%,var(--color-surface)); }

  .mobile-nav__catalog {
    margin-top: 12px;
    padding: 12px 0 10px;
    border-top: 1px solid var(--color-border);
  }
  .mobile-nav__catalog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 11px 6px;
    color: var(--color-text-secondary);
    font-size: calc(.7rem + 2px);
    font-weight: 500;
  }
  .mobile-nav__catalog-head a {
    color: var(--color-primary);
    text-decoration: none;
    letter-spacing: 0;
    text-transform: none;
  }
  .mobile-nav__category-trigger {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    min-height: 44px;
    padding: 8px 11px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--color-text);
    font: inherit;
    font-size: calc(.86rem + 2px);
    font-weight: 450;
    text-align: left;
    cursor: pointer;
    transition: background 150ms ease, color 150ms ease;
  }
  .mobile-nav__category-trigger:hover,
  .mobile-nav__category-trigger[aria-expanded="true"] {
    background: color-mix(in srgb, var(--color-primary) 8%, var(--color-surface));
    color: var(--color-primary);
  }
  .mobile-nav__category-trigger:focus-visible,
  .mobile-nav__category-panel a:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
  }
  .mobile-nav__category-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    color: var(--color-text-secondary);
  }
  .mobile-nav__category-icon svg { width: 23px; height: 23px; }
  .mobile-nav__category-icon--shared { color: var(--mobile-category-ink); }
  .mobile-nav__category-icon--shared svg { flex: none; width: 28px; height: 28px; max-width: none; }
  .mobile-nav__category-icon[data-category="text-tools"] { --mobile-category-ink: #4267dc; --mobile-category-dark: #92b0ff; }
  .mobile-nav__category-icon[data-category="video-tools"] { --mobile-category-ink: #e87541; --mobile-category-dark: #ffad83; }
  .mobile-nav__category-icon[data-category="pdf-tools"] { --mobile-category-ink: #e05c69; --mobile-category-dark: #ff99a3; }
  .mobile-nav__category-icon[data-category="developer-tools"] { --mobile-category-ink: #5964cb; --mobile-category-dark: #a8afff; }
  .mobile-nav__category-icon[data-category="image-tools"] { --mobile-category-ink: #bf58d2; --mobile-category-dark: #e7a1f5; }
  .mobile-nav__category-icon[data-category="seo-tools"] { --mobile-category-ink: #0d9d91; --mobile-category-dark: #65dfcc; }
  .mobile-nav__category-icon[data-category="utility-tools"] { --mobile-category-ink: #de9b26; --mobile-category-dark: #f8cd73; }
  .mobile-nav__category-icon[data-category="ai-writing-tools"] { --mobile-category-ink: #7452ed; --mobile-category-dark: #b59bff; }
  .mobile-nav__category-icon[data-category="audio-tools"] { --mobile-category-ink: #dd5b9d; --mobile-category-dark: #ffa0ce; }
  .mobile-nav__category-icon[data-category="social-tools"] { --mobile-category-ink: #2878dc; --mobile-category-dark: #83baff; }
  [data-theme="dark"] .mobile-nav__category-icon--shared { color: var(--mobile-category-dark); }
  .mobile-nav__category-name { flex: 1; min-width: 0; }
  .mobile-nav__category-chevron { flex: 0 0 auto; color: var(--color-text-secondary); transition: transform 160ms ease; }
  .mobile-nav__category-trigger[aria-expanded="true"] .mobile-nav__category-chevron { transform: rotate(90deg); }
  .mobile-nav__category-panel {
    display: grid;
    gap: 2px;
    margin: 0 8px 5px 37px;
    padding: 2px 0 3px 14px;
    border-left: 1px solid var(--color-border);
  }
  .mobile-nav__category-panel[hidden] { display: none; }
  .mobile-nav__category-panel a {
    display: block;
    padding: 7px 8px;
    border-radius: 7px;
    color: var(--color-text-secondary);
    font-size: calc(.8rem + 2px);
    line-height: 1.35;
    text-decoration: none;
  }
  .mobile-nav__category-panel a:hover { background: color-mix(in srgb, var(--color-primary) 7%, var(--color-surface)); color: var(--color-primary); }
  .mobile-nav__category-panel .mobile-nav__category-all { color: var(--color-primary); font-weight: 700; }

  /* Mobile backdrop */
  .mobile-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: calc(var(--z-modal, 9999) - 1);
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 300ms ease;
  }
  .mobile-nav-backdrop.is-visible {
    opacity: 1;
    pointer-events: all;
  }

  /* Mobile Danh mục accordion */
  .mobile-nav-dropdown {
    display: flex;
    flex-direction: column;
  }

  .mobile-nav-dropdown__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    color: var(--color-text, #171717);
    font-size: calc(.86rem + 2px);
    font-weight: 450;
    padding: 8px 11px;
    border-radius: 8px;
    transition: background 150ms ease, color 150ms ease;
  }

  .mobile-nav-dropdown__trigger:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--color-primary, #4f46e5);
  }

  .mobile-nav-dropdown__trigger.active {
    background: rgba(79, 70, 229, 0.08);
    color: var(--color-primary, #4f46e5);
    font-weight: 600;
  }

  .mobile-nav-dropdown__chevron {
    flex-shrink: 0;
    transition: transform 200ms ease;
  }

  .mobile-nav-dropdown.is-open .mobile-nav-dropdown__chevron {
    transform: rotate(180deg);
  }

  .mobile-nav-dropdown__panel {
    display: none;
    flex-direction: column;
    padding: 0 8px 8px 42px;
    gap: 2px;
  }

  .mobile-nav-dropdown.is-open .mobile-nav-dropdown__panel {
    display: flex;
  }

  .mobile-nav-dropdown__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: calc(.9rem + 2px);
    font-weight: 500;
    color: var(--color-text-secondary, #64748b);
    text-decoration: none;
    transition: background 150ms ease, color 150ms ease;
  }

  .mobile-nav-dropdown__item:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--color-primary, #4f46e5);
  }

  .mobile-nav-dropdown__item--all {
    margin-bottom: 5px;
    color: var(--color-primary, #4f46e5);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    font-weight: 700;
  }

  .mobile-nav-dropdown__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
  }

  .mobile-nav-dropdown--audience .mobile-nav-dropdown__item {
    font-size: calc(.8rem + 2px);
  }
  .mobile-nav-dropdown--audience .mobile-nav-dropdown__icon {
    width: 39px;
    height: 39px;
  }
  .mobile-nav-dropdown--audience .mobile-nav-dropdown__icon .audience-icon {
    width: 27px;
    height: 27px;
  }
}

/* Desktop: always hide mobile nav */
@media (min-width: 1025px) {
  .mobile-nav { display: none; }
  .mobile-nav-backdrop { display: none; }
  .mobile-menu-toggle { display: none; }
}

/* ===== DARK MODE — Mobile nav overrides ===== */
@media (width < 1025px) {
  [data-theme="dark"] .mobile-nav {
    background: var(--color-bg-secondary, #0f172a);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.4);
  }
  [data-theme="dark"] .mobile-nav-dropdown__trigger {
    color: var(--color-text-secondary, #94a3b8);
  }
  [data-theme="dark"] .mobile-nav-dropdown__trigger:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--color-text, #f1f5f9);
  }
  [data-theme="dark"] .mobile-nav-dropdown__trigger.active {
    background: rgba(79, 70, 229, 0.15);
    color: #a5b4fc;
  }
  [data-theme="dark"] .mobile-nav-dropdown__item {
    color: var(--color-text-secondary, #94a3b8);
  }
  [data-theme="dark"] .mobile-nav-dropdown__item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--color-text, #f1f5f9);
  }
  [data-theme="dark"] .mobile-nav__footer {
    border-top-color: rgba(255, 255, 255, 0.08);
  }
  [data-theme="dark"] .mobile-nav-backdrop {
    background: rgba(0, 0, 0, 0.6);
  }
}

/* ===== TOOLS GRID ===== */
.tools-grid {
  display: grid;
  gap: var(--space-4);
}

.tools-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.tools-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 768px) {
  .tool-audience {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-top: var(--space-8);
    padding: 22px 20px;
  }

  .tool-audience__list { grid-template-columns: 1fr; }

  .tools-grid-3,
  .tools-grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .tools-grid-3,
  .tools-grid-2 {
    grid-template-columns: 1fr;
  }
}

/* ===== TOOL CARD ===== */
.tool-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-5);
  background: var(--color-bg);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.tool-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.tool-card__icon {
    line-height: 1;
    margin-bottom: var(--space-1);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Inline SVG icons (from get_tool_icon) */
.tool-card__icon svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

/* Animated SVG icons (from get_tool_card_icon via <img>) */
.tool-card__icon img,
.tool-card__icon .tool-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.tool-card__name {
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  color: var(--color-text);
  margin: 0;
}

.tool-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  margin: 0;
}

/* ===== STEPS ===== */
.steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.step-content h3,
.step-content p {
  margin: 0;
}

/* ===== BENEFITS GRID ===== */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

@media (max-width: 768px) {
  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .benefits-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== FAQ LIST ===== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* ===== SLIDE UP KEYFRAME (used by toast) ===== */
@keyframes slideUp {
  from { opacity: 0; transform: translateX(-50%) translateY(16px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ===== Floating contact widget + tool feedback ===== */
.arcontactus-widget {
  --arc-primary: #0066b2;
  --floating-inset: 24px;
  position: fixed;
  right: 24px;
  bottom: 146px;
  width: 64px;
  height: 64px;
  z-index: 10000;
  font-family: inherit;
  transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}

.alltoll-feedback-dock {
  --floating-inset: 24px;
  position: fixed;
  display: flex;
  right: 24px;
  bottom: 24px;
  z-index: 10001;
  transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}

.floating-widget-dismiss {
  position: absolute;
  top: -7px;
  right: -7px;
  z-index: 6;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 4px;
  border: 1px solid var(--color-border, #dce3ed);
  border-radius: 50%;
  color: var(--color-text-secondary, #64748b);
  background: var(--color-surface, #fff);
  box-shadow: 0 2px 8px rgba(15, 23, 42, .12);
  cursor: pointer;
}
.floating-widget-dismiss svg { display: block; width: 100%; height: 100%; }
.floating-widget-dismiss:hover { color: var(--color-primary, #5144ef); }
.floating-widget-dismiss:focus-visible { outline: 2px solid #6352ef; outline-offset: 2px; }

.arcontactus-widget.is-tucked,
.alltoll-feedback-dock.is-tucked {
  transform: translateX(calc(100% + var(--floating-inset) - 28px));
}
.is-tucked > .floating-widget-dismiss { display: none; }
.arcontactus-widget.is-tucked > .arcontactus-message-button,
.alltoll-feedback-dock.is-tucked > .alltoll-feedback-launch { transform: none; box-shadow: 0 2px 8px rgba(15, 23, 42, .12); }
.is-tucked > .arcontactus-message-button > *,
.is-tucked > .alltoll-feedback-launch > * { visibility: hidden; animation: none; }
.is-tucked > .arcontactus-message-button::after,
.is-tucked > .alltoll-feedback-launch::after {
  content: '';
  position: absolute;
  left: 11px;
  top: calc(50% - 4px);
  width: 8px;
  height: 8px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.arcontactus-toggle-check {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.arcontactus-message-button {
  position: relative;
  z-index: 5;
  isolation: isolate;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  min-width: 64px;
  height: 64px;
  min-height: 64px;
  margin: 0;
  padding: 0;
  color: var(--arc-primary);
  background: #fff;
  border: 2px solid var(--arc-primary);
  border-radius: 50%;
  box-shadow: 0 6px 20px rgba(15, 23, 42, .18);
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}

.arcontactus-message-button:hover { transform: scale(1.05); box-shadow: 0 8px 24px rgba(15, 23, 42, .22); }
.arcontactus-message-button:focus-visible,
.messanger:focus-visible { outline: 3px solid rgba(49, 88, 245, .32); outline-offset: 4px; }

.arcontactus-message-button .pulsation {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(circle, rgba(0, 132, 230, .42) 0%, rgba(0, 102, 178, .3) 58%, rgba(0, 102, 178, .08) 76%, transparent 100%);
  border-radius: inherit;
  pointer-events: none;
  transform-origin: 50% 75%;
  animation: arcontactusPulse 3s infinite;
}
.arcontactus-message-button .pulsation:nth-child(2) { animation-delay: .8s; }
.arcontactus-toggle-check:checked ~ .arcontactus-message-button .pulsation { display: none; }
@keyframes arcontactusPulse {
  0% { opacity: .9; transform: scale(.94); box-shadow: 0 0 0 rgba(0, 102, 178, 0); }
  65% { opacity: .34; box-shadow: 0 0 18px rgba(0, 132, 230, .28); }
  100% { opacity: 0; transform: scale(1.75); box-shadow: 0 0 28px rgba(0, 132, 230, 0); }
}

.arcontactus-message-button > svg,
.arcontactus-message-button > img {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  width: 34px;
  height: 34px;
  object-fit: contain;
  pointer-events: none;
  transform-origin: center;
  transition: opacity .35s ease, transform .35s ease;
}
.arcontactus-cycle-icon {
  opacity: 0;
  animation: arcontactusIconCycle 15s linear infinite;
  will-change: opacity, transform;
}
.arcontactus-message-button svg.cycle-1 { width: 36px; height: 36px; }
.arcontactus-cycle-icon.cycle-1 { animation-delay: 0s; }
.arcontactus-cycle-icon.cycle-2 { animation-delay: 3s; }
.arcontactus-cycle-icon.cycle-3 { animation-delay: 6s; }
.arcontactus-cycle-icon.cycle-4 { animation-delay: 9s; }
.arcontactus-cycle-icon.cycle-5 { animation-delay: 12s; }
@keyframes arcontactusIconCycle {
  0%, 17% { opacity: 1; transform: translate(-50%, -50%) translateX(0) scale(1); }
  20%, 100% { opacity: 0; transform: translate(-50%, -50%) translateX(-12px) scale(.85); }
}

.arcontactus-message-button .icon-close {
  z-index: 4;
  width: 28px;
  height: 28px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.5) rotate(-90deg);
}
.arcontactus-toggle-check:checked ~ .arcontactus-message-button .arcontactus-cycle-icon {
  animation: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.5) rotate(90deg);
}
.arcontactus-toggle-check:checked ~ .arcontactus-message-button .icon-close { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0); }

.messangers-block { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.messanger {
  position: absolute;
  top: 8px;
  left: 8px;
  display: grid;
  width: 48px;
  height: 48px;
  padding: 9px;
  place-items: center;
  color: #fff;
  background: #fff;
  border: 0;
  border-radius: 50%;
  box-shadow: 0 5px 18px rgba(15, 23, 42, .2);
  cursor: pointer;
  opacity: 0;
  transform: translate(0, 0) scale(.35);
  pointer-events: none;
  transition: transform .32s cubic-bezier(.2, .8, .2, 1), opacity .18s ease;
}
.messanger img, .messanger svg { display: block; width: 100%; height: 100%; object-fit: contain; }
.messanger::after {
  content: attr(aria-label);
  position: absolute;
  right: 58px;
  padding: 6px 9px;
  color: #fff;
  background: #111827;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(5px);
  pointer-events: none;
  transition: .18s ease;
}
.messanger:hover::after { opacity: 1; transform: none; }
.arcontactus-toggle-check:checked ~ .messangers-block .messanger { opacity: 1; pointer-events: auto; }

.arcontactus-toggle-check:checked ~ .channels-1 .messanger:nth-child(1) { transform: translate(-72px, -12px) scale(1); }
.arcontactus-toggle-check:checked ~ .channels-2 .messanger:nth-child(1) { transform: translate(-70px, 36px) scale(1); }
.arcontactus-toggle-check:checked ~ .channels-2 .messanger:nth-child(2) { transform: translate(-36px, -70px) scale(1); }
.arcontactus-toggle-check:checked ~ .channels-3 .messanger:nth-child(1) { transform: translate(-62px, 54px) scale(1); }
.arcontactus-toggle-check:checked ~ .channels-3 .messanger:nth-child(2) { transform: translate(-82px, -12px) scale(1); }
.arcontactus-toggle-check:checked ~ .channels-3 .messanger:nth-child(3) { transform: translate(-22px, -79px) scale(1); }
.arcontactus-toggle-check:checked ~ .channels-4 .messanger:nth-child(1) { transform: translate(-59px, 58px) scale(1); }
.arcontactus-toggle-check:checked ~ .channels-4 .messanger:nth-child(2) { transform: translate(-78px, 4px) scale(1); }
.arcontactus-toggle-check:checked ~ .channels-4 .messanger:nth-child(3) { transform: translate(-67px, -47px) scale(1); }
.arcontactus-toggle-check:checked ~ .channels-4 .messanger:nth-child(4) { transform: translate(-23px, -79px) scale(1); }
.arcontactus-toggle-check:checked ~ .channels-5 .messanger:nth-child(1) { transform: translate(-70px, 70px) scale(1); }
.arcontactus-toggle-check:checked ~ .channels-5 .messanger:nth-child(2) { transform: translate(-98px, 17px) scale(1); }
.arcontactus-toggle-check:checked ~ .channels-5 .messanger:nth-child(3) { transform: translate(-91px, -41px) scale(1); }
.arcontactus-toggle-check:checked ~ .channels-5 .messanger:nth-child(4) { transform: translate(-53px, -85px) scale(1); }
.arcontactus-toggle-check:checked ~ .channels-5 .messanger:nth-child(5) { transform: translate(3px, -100px) scale(1); }
.arcontactus-toggle-check:checked ~ .channels-6 .messanger:nth-child(1) { transform: translate(-89px, 75px) scale(1); }
.arcontactus-toggle-check:checked ~ .channels-6 .messanger:nth-child(2) { transform: translate(-113px, 24px) scale(1); }
.arcontactus-toggle-check:checked ~ .channels-6 .messanger:nth-child(3) { transform: translate(-111px, -32px) scale(1); }
.arcontactus-toggle-check:checked ~ .channels-6 .messanger:nth-child(4) { transform: translate(-83px, -81px) scale(1); }
.arcontactus-toggle-check:checked ~ .channels-6 .messanger:nth-child(5) { transform: translate(-36px, -110px) scale(1); }
.arcontactus-toggle-check:checked ~ .channels-6 .messanger:nth-child(6) { transform: translate(20px, -114px) scale(1); }

/* Nút góp ý độc lập: giữ vòng liên hệ gọn và vẫn dễ nhận biết trên mọi trang. */
.alltoll-feedback-launch {
  --brand-300: #b8adff;
  --brand-400: #8d7cff;
  --brand-600: #6549ef;
  --brand-700: #4d35d4;
  --card: #fff;
  position: relative;
  display: inline-flex;
  min-width: 102px;
  height: 46px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 17px 0 14px;
  color: #fff;
  background: linear-gradient(135deg, #6d3df0, #405cf4);
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(70, 55, 220, .34);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  isolation: isolate;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.alltoll-feedback-launch:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(70, 55, 220, .42); filter: saturate(1.08); }
.alltoll-feedback-launch:focus-visible { outline: 3px solid rgba(99, 82, 239, .28); outline-offset: 3px; }
.alltoll-feedback-launch__bubble { width: 18px; height: 18px; flex: 0 0 18px; }
.feedback-mascot {
  position: absolute;
  top: -29px;
  right: 8px;
  z-index: -1;
  display: block;
  width: 40px;
  height: 40px;
  overflow: visible;
  pointer-events: none;
  filter: drop-shadow(0 3px 3px rgba(15, 23, 42, .16));
}
.feedback-mascot-eyes {
  transform-box: fill-box;
  transform-origin: center;
  animation: alltollFeedbackBlink 5s ease-in-out infinite;
}
@keyframes alltollFeedbackBlink {
  0%, 45%, 49%, 100% { transform: scaleY(1); }
  47% { transform: scaleY(.12); }
}

.has-feedback-modal { overflow: hidden; }
.alltoll-feedback { position: fixed; inset: 0; z-index: 10050; visibility: hidden; opacity: 0; transition: opacity .2s ease, visibility .2s ease; }
.alltoll-feedback.is-open { visibility: visible; opacity: 1; }
.alltoll-feedback__backdrop { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; background: rgba(15, 23, 42, .62); border: 0; cursor: default; backdrop-filter: blur(3px); }
.alltoll-feedback__dialog {
  position: absolute;
  right: 24px;
  bottom: 24px;
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 24px;
  overflow: auto;
  color: var(--color-text, #111827);
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
  transform: translateY(22px) scale(.98);
  transition: transform .24s ease;
}
.alltoll-feedback.is-open .alltoll-feedback__dialog { transform: none; }
.alltoll-feedback__close { position: absolute; top: 12px; right: 12px; display: grid; width: 34px; height: 34px; padding: 0; place-items: center; color: #64748b; background: transparent; border: 0; border-radius: 50%; font-size: 25px; cursor: pointer; }
.alltoll-feedback__close:hover { color: #111827; background: #f1f5f9; }
.alltoll-feedback__heading { display: flex; gap: 12px; padding-right: 25px; margin-bottom: 18px; }
.alltoll-feedback__heading h2 { margin: 0 0 4px; font-size: 20px; line-height: 1.35; }
.alltoll-feedback__heading p { margin: 0; color: var(--color-text-muted, #64748b); font-size: 14px; line-height: 1.55; }
.alltoll-feedback__icon { display: grid; flex: 0 0 42px; width: 42px; height: 42px; place-items: center; color: #5b43ee; background: #eeebff; border-radius: 12px; }
.alltoll-feedback__icon svg { width: 24px; height: 24px; }
.alltoll-feedback form { display: grid; gap: 13px; }
.alltoll-feedback label { display: grid; gap: 6px; color: var(--color-text, #111827); font-size: 13px; font-weight: 600; }
.alltoll-feedback label > span { color: #94a3b8; font-weight: 400; }
.alltoll-feedback input,
.alltoll-feedback select,
.alltoll-feedback textarea { width: 100%; padding: 11px 13px; color: inherit; background: var(--color-bg, #fff); border: 1px solid var(--color-border, #d9e0ea); border-radius: 12px; font: inherit; font-weight: 400; outline: none; transition: border-color .18s, box-shadow .18s; }
.alltoll-feedback textarea { min-height: 116px; resize: vertical; line-height: 1.5; }
.alltoll-feedback input:focus,
.alltoll-feedback select:focus,
.alltoll-feedback textarea:focus { border-color: #6654ef; box-shadow: 0 0 0 3px rgba(102, 84, 239, .13); }
.alltoll-feedback__trap { position: fixed !important; top: 0 !important; left: 0 !important; width: 1px !important; height: 1px !important; padding: 0 !important; opacity: 0 !important; pointer-events: none !important; }
.alltoll-feedback__meta { display: flex; min-height: 20px; justify-content: space-between; gap: 12px; color: #94a3b8; font-size: 12px; }
.alltoll-feedback__meta b { font-weight: 500; }
#alltollFeedbackStatus.is-error { color: #dc2626; }
#alltollFeedbackStatus.is-success { color: #059669; }
.alltoll-feedback__submit { justify-self: end; min-width: 112px; padding: 11px 18px; color: #fff; background: linear-gradient(135deg, #6d3df0, #3f5df4); border: 0; border-radius: 999px; font: inherit; font-weight: 700; cursor: pointer; box-shadow: 0 7px 18px rgba(79, 70, 229, .23); }
.alltoll-feedback__submit:disabled { opacity: .65; cursor: wait; }

[data-theme="dark"] .alltoll-feedback__dialog { background: #151d2d; border-color: #334155; }
[data-theme="dark"] .alltoll-feedback__close:hover { color: #fff; background: #263247; }
[data-theme="dark"] .alltoll-feedback__icon { background: rgba(109, 61, 240, .2); }
[data-theme="dark"] .alltoll-feedback input,
[data-theme="dark"] .alltoll-feedback select,
[data-theme="dark"] .alltoll-feedback textarea { background: #0f172a; border-color: #334155; }

@media (max-width: 768px) {
  .arcontactus-widget { --floating-inset: 14px; right: 14px; bottom: calc(126px + env(safe-area-inset-bottom)); width: 56px; height: 56px; }
  .alltoll-feedback-dock { --floating-inset: 14px; right: 14px; bottom: calc(16px + env(safe-area-inset-bottom)); }
  .alltoll-feedback-launch { min-width: 94px; height: 42px; padding: 0 15px 0 12px; font-size: 13px; }
  .alltoll-feedback-launch__bubble { width: 17px; height: 17px; flex-basis: 17px; }
  .feedback-mascot { top: -26px; right: 7px; width: 36px; height: 36px; }
  .arcontactus-message-button { width: 56px; min-width: 56px; height: 56px; min-height: 56px; }
  .arcontactus-message-button > svg, .arcontactus-message-button > img { width: 31px; height: 31px; }
  .arcontactus-message-button svg.cycle-1 { width: 33px; height: 33px; }
  .arcontactus-message-button .icon-close { width: 26px; height: 26px; }
  .messanger { top: 5px; left: 5px; width: 46px; height: 46px; }
  .messanger::after { display: none; }
  .arcontactus-toggle-check:checked ~ .channels-1 .messanger:nth-child(1) { transform: translate(-62px, -10px) scale(1); }
  .arcontactus-toggle-check:checked ~ .channels-2 .messanger:nth-child(1) { transform: translate(-60px, 31px) scale(1); }
  .arcontactus-toggle-check:checked ~ .channels-2 .messanger:nth-child(2) { transform: translate(-31px, -60px) scale(1); }
  .arcontactus-toggle-check:checked ~ .channels-3 .messanger:nth-child(1) { transform: translate(-46px, 39px) scale(1); }
  .arcontactus-toggle-check:checked ~ .channels-3 .messanger:nth-child(2) { transform: translate(-58px, -16px) scale(1); }
  .arcontactus-toggle-check:checked ~ .channels-3 .messanger:nth-child(3) { transform: translate(-21px, -56px) scale(1); }
  .arcontactus-toggle-check:checked ~ .channels-4 .messanger:nth-child(1) { transform: translate(-56px, 55px) scale(1); }
  .arcontactus-toggle-check:checked ~ .channels-4 .messanger:nth-child(2) { transform: translate(-74px, 4px) scale(1); }
  .arcontactus-toggle-check:checked ~ .channels-4 .messanger:nth-child(3) { transform: translate(-64px, -45px) scale(1); }
  .arcontactus-toggle-check:checked ~ .channels-4 .messanger:nth-child(4) { transform: translate(-22px, -75px) scale(1); }
  .arcontactus-toggle-check:checked ~ .channels-5 .messanger:nth-child(1) { transform: translate(-60px, 60px) scale(1); }
  .arcontactus-toggle-check:checked ~ .channels-5 .messanger:nth-child(2) { transform: translate(-85px, 15px) scale(1); }
  .arcontactus-toggle-check:checked ~ .channels-5 .messanger:nth-child(3) { transform: translate(-79px, -35px) scale(1); }
  .arcontactus-toggle-check:checked ~ .channels-5 .messanger:nth-child(4) { transform: translate(-46px, -73px) scale(1); }
  .arcontactus-toggle-check:checked ~ .channels-5 .messanger:nth-child(5) { transform: translate(3px, -86px) scale(1); }
  .arcontactus-toggle-check:checked ~ .channels-6 .messanger:nth-child(1) { transform: translate(-75px, 63px) scale(1); }
  .arcontactus-toggle-check:checked ~ .channels-6 .messanger:nth-child(2) { transform: translate(-96px, 20px) scale(1); }
  .arcontactus-toggle-check:checked ~ .channels-6 .messanger:nth-child(3) { transform: translate(-94px, -27px) scale(1); }
  .arcontactus-toggle-check:checked ~ .channels-6 .messanger:nth-child(4) { transform: translate(-70px, -68px) scale(1); }
  .arcontactus-toggle-check:checked ~ .channels-6 .messanger:nth-child(5) { transform: translate(-30px, -93px) scale(1); }
  .arcontactus-toggle-check:checked ~ .channels-6 .messanger:nth-child(6) { transform: translate(17px, -96px) scale(1); }
  .alltoll-feedback__dialog { right: 0; bottom: 0; width: 100%; max-height: min(88vh, 760px); padding: 22px 18px calc(18px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; transform: translateY(100%); }
  .alltoll-feedback__heading { margin-bottom: 15px; }
  .alltoll-feedback__heading h2 { font-size: 18px; }
}

@media (max-width: 640px) {
  .site-header { height: 64px; }
  .site-header__inner { gap: 7px; padding-right: 12px; padding-left: 12px; }
  .site-header__logo { flex-shrink: 0; }
  .site-header__logo-icon { width: clamp(124px, calc(20vw + 4px), 164px); }
  .site-header.is-top .site-header__logo-icon,
  .site-header.is-scrolled .site-header__logo-icon { transform: none; }
  .header-actions { gap: 4px; margin-left: auto; flex-shrink: 0; }
  .header-actions .lang-switcher { gap: 0; }
  .header-actions .lang-switcher__field { width: 132px; height: 38px; }
  .header-actions .theme-toggle { width: 38px; height: 38px; }
  .mobile-menu-toggle { display: flex !important; width: 38px; height: 38px; }
}

@media (max-width: 480px) {
  .site-header__logo-icon { width: clamp(80px, calc(100vw - 286px), 108px); }
}

@media (max-width: 390px) {
  .site-header__inner { gap: 6px; padding-right: 9px; padding-left: 9px; }
  .header-actions .lang-switcher__field { width: 118px; }
  .header-actions .language-select { padding-right: 27px; padding-left: 30px; font-size: 12px; }
  .header-actions .lang-switcher__flag { left: 8px; }
  .header-actions .lang-switcher__chevron { right: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  /* Chu kỳ icon là tín hiệu chức năng; vẫn chạy như widget mẫu WebTamDuc. */
  .arcontactus-message-button .arcontactus-cycle-icon {
    animation-duration: 15s !important;
    animation-iteration-count: infinite !important;
  }
  .arcontactus-message-button > img,
  .arcontactus-message-button > svg { transition-duration: .35s !important; }
  .arcontactus-message-button .pulsation {
    animation-duration: 3s !important;
    animation-iteration-count: infinite !important;
  }
  .feedback-mascot-eyes { animation: none; }
  .arcontactus-widget, .alltoll-feedback-dock, .messanger, .alltoll-feedback-launch, .alltoll-feedback, .alltoll-feedback__dialog { transition: none; }
}

/* ===== SECTION SPACING ===== */
.how-to-use,
.benefits,
.faq,
.related-tools {
  margin-top: var(--space-12);
}

.how-to-use h2,
.benefits h2,
.faq h2,
.related-tools h2 {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--color-text);
  margin: 0 0 var(--space-6);
  letter-spacing: -0.02em;
}

/* ===== PERSONAL TOOL LIBRARY ===== */
.tt-library-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
  width: 40px;
  min-width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--color-border) 90%, transparent);
  border-radius: 10px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--color-primary) 5%, var(--color-bg)), color-mix(in srgb, var(--color-bg) 94%, transparent));
  color: var(--color-text-secondary);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.tt-library-trigger__icon {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.tt-library-trigger:hover,
.tt-library-trigger[aria-expanded="true"] {
  border-color: color-mix(in srgb, var(--color-primary) 34%, var(--color-border));
  background: color-mix(in srgb, var(--color-primary) 10%, var(--color-bg));
  color: var(--color-primary);
  box-shadow: 0 5px 12px color-mix(in srgb, var(--color-primary) 10%, transparent);
  transform: translateY(-1px);
}

.tt-library-trigger:focus-visible,
.tt-tool-library button:focus-visible,
.tt-tool-library a:focus-visible,
.tt-save-current:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

.tt-tabbar__label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.tt-library-trigger__count {
  position: absolute;
  top: -0.3rem;
  right: -0.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.05rem;
  height: 1.05rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: var(--color-primary);
  color: #fff;
  border: 2px solid var(--color-bg);
  font-size: 0.6rem;
  font-weight: var(--font-semibold);
  line-height: 1;
}

.tt-library-trigger__count[hidden] {
  display: none;
}

.tt-library-trigger__count.is-popping {
  animation: tt-library-count-pop 260ms ease-out;
}

@keyframes tt-library-count-pop {
  0%, 100% { transform: scale(1); }
  45% { transform: scale(1.2); }
}

.tt-library-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10010;
  background: rgba(15, 23, 42, 0.48);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  transition: opacity 280ms ease, visibility 0s linear 320ms;
}

.tt-library-backdrop.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.tt-library-backdrop.is-closing {
  visibility: visible;
  pointer-events: auto;
}

.tt-tool-library {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 10020;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(460px, 100vw);
  height: 100dvh;
  border-right: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
  box-shadow: 20px 0 55px rgba(15, 23, 42, 0.2);
  visibility: hidden;
  transform: translate3d(-102%, 0, 0);
  pointer-events: none;
  transition: transform 320ms cubic-bezier(0.32, 0.72, 0, 1), visibility 0s linear 320ms;
}

.tt-tool-library.is-open {
  visibility: visible;
  transform: translate3d(0, 0, 0);
  pointer-events: auto;
  transition-delay: 0s;
}

body.tt-library-lock {
  overflow: hidden;
}

.tt-tool-library__header {
  position: relative;
  padding: 1rem 4rem 1rem 1.35rem;
  border-bottom: 1px solid var(--color-border);
  background:
    radial-gradient(circle at 5% 10%, color-mix(in srgb, var(--color-primary) 12%, transparent), transparent 10rem),
    var(--color-bg);
}

.tt-tool-library__header h2 {
  margin: 0;
  color: var(--color-text);
  font-size: 1.28rem;
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.tt-tool-library__header p {
  margin: 0.25rem 0 0;
  color: var(--color-text-secondary);
  font-size: 0.78rem;
  line-height: 1.5;
}

.tt-tool-library__close {
  position: absolute;
  top: 1rem;
  right: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 0.7rem;
  background: var(--color-bg);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

.tt-tool-library__close:hover {
  border-color: var(--color-border-hover);
  background: var(--color-bg-tertiary);
  color: var(--color-text);
}

.tt-tool-library__close svg {
  width: 1.1rem;
  height: 1.1rem;
}

.tt-tool-library__body {
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0.45rem 1rem 1.25rem;
  overscroll-behavior: contain;
}

.tt-tool-library__section {
  padding: 1rem 0 0.35rem;
}

.tt-tool-library__section + .tt-tool-library__section {
  margin-top: 0.35rem;
  border-top: 1px solid color-mix(in srgb, var(--color-border) 75%, transparent);
}

.tt-tool-library__section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 2rem;
  padding: 0 0.35rem;
}

.tt-tool-library__section-head h3 {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 0.69rem;
  font-weight: var(--font-semibold);
  letter-spacing: 0.075em;
  line-height: 1.3;
  text-transform: uppercase;
}

.tt-tool-library__section-head h3 svg {
  width: 0.95rem;
  height: 0.95rem;
  color: var(--color-primary);
}

.tt-tool-library__clear {
  padding: 0.35rem 0.45rem;
  border: 0;
  border-radius: 0.45rem;
  background: transparent;
  color: var(--color-text-muted);
  font: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
}

.tt-tool-library__clear:hover {
  background: var(--color-bg-tertiary);
  color: var(--color-error);
}

.tt-tool-library__clear[hidden] {
  display: none;
}

.tt-tool-library__list {
  display: grid;
  gap: 0.35rem;
  padding: 0;
  margin: 0.45rem 0 0;
  list-style: none;
}

.tt-tool-library__list[hidden] {
  display: none;
}

.tt-tool-library__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.2rem;
  min-width: 0;
  padding: 0.35rem;
  border: 1px solid transparent;
  border-radius: 0.85rem;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.tt-tool-library__item:hover {
  border-color: var(--color-border);
  background: color-mix(in srgb, var(--color-primary) 4%, var(--color-bg));
}

.tt-tool-library__link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.tt-tool-library__glyph {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid color-mix(in srgb, var(--color-primary) 13%, var(--color-border));
  border-radius: 0.7rem;
  background: color-mix(in srgb, var(--color-primary) 9%, var(--color-bg));
  color: var(--color-primary);
  font-size: 0.85rem;
  font-weight: 750;
}

.tt-tool-library__item-copy {
  display: grid;
  min-width: 0;
}

.tt-tool-library__item-copy strong,
.tt-tool-library__item-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tt-tool-library__item-copy strong {
  color: var(--color-text);
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1.4;
}

.tt-tool-library__item-copy small {
  margin-top: 0.08rem;
  color: var(--color-text-muted);
  font-size: 0.65rem;
  line-height: 1.3;
  text-transform: capitalize;
}

.tt-tool-library__item-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 0.6rem;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color 150ms ease, background-color 150ms ease, transform 150ms ease;
}

.tt-tool-library__item-action svg {
  width: 0.95rem;
  height: 0.95rem;
}

.tt-tool-library__item-action:hover {
  background: var(--color-bg-tertiary);
  color: var(--color-primary);
  transform: translateY(-1px);
}

.tt-tool-library__item-save.is-saved {
  background: var(--color-warning-light);
  color: var(--color-warning);
}

.tt-tool-library__item-save.is-saved svg,
.tt-save-current.is-saved svg {
  fill: currentColor;
}

.tt-tool-library__item-remove:hover {
  background: var(--color-error-light);
  color: var(--color-error);
}

.tt-tool-library__empty {
  margin: 0.5rem 0 0;
  padding: 1rem;
  border: 1px dashed var(--color-border);
  border-radius: 0.85rem;
  color: var(--color-text-muted);
  font-size: 0.76rem;
  line-height: 1.5;
  text-align: center;
}

.tt-tool-library__empty[hidden] {
  display: none;
}

.tt-tool-library__install {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  column-gap: 12px;
  align-items: center;
  margin: 0.8rem 0.35rem 0;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--color-primary) 24%, var(--color-border));
  border-radius: 14px;
  background: linear-gradient(125deg, color-mix(in srgb, var(--color-primary) 10%, var(--color-bg)), color-mix(in srgb, var(--color-primary) 3%, var(--color-bg)));
  box-shadow: 0 5px 18px -12px color-mix(in srgb, var(--color-primary) 35%, transparent);
}

.tt-tool-library__install-icon {
  display: grid;
  place-items: center;
  grid-column: 1;
  grid-row: 1 / 3;
  width: 44px;
  height: 44px;
  border: 1px solid color-mix(in srgb, var(--color-primary) 14%, var(--color-border));
  border-radius: 12px;
  background: var(--color-bg);
}

.tt-tool-library__install-icon img {
  display: block;
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.tt-tool-library__install[hidden],
.tt-install-nudge[hidden],
.tt-install-help[hidden] {
  display: none;
}

.tt-tool-library__install strong,
.tt-install-nudge strong {
  display: block;
  color: var(--color-text);
  font-size: 0.78rem;
  font-weight: 700;
}

.tt-tool-library__install > p,
.tt-install-nudge > p {
  margin: 0.25rem 0 0;
  color: var(--color-text-secondary);
  font-size: 0.72rem;
  line-height: 1.45;
}

.tt-tool-library__install > button,
.tt-install-nudge__button {
  min-height: 2rem;
  margin-top: 0.6rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid color-mix(in srgb, var(--color-primary) 35%, var(--color-border));
  border-radius: 0.55rem;
  background: var(--color-bg);
  color: var(--color-primary);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.tt-tool-library__install > button:hover,
.tt-install-nudge__button:hover {
  background: var(--color-primary-light);
}

.tt-tool-library__install > button:focus-visible,
.tt-install-nudge button:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.tt-tool-library__install > strong {
  grid-column: 2;
  font-size: 14px;
  line-height: 1.5;
}

.tt-tool-library__install > p {
  grid-column: 2;
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.6;
}

.tt-tool-library__install > button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  grid-column: 1 / -1;
  min-height: 40px;
  margin-top: 14px;
  padding: 9px 14px;
  border-color: transparent;
  border-radius: 9px;
  background: #2563eb;
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.16);
  transition: background-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.tt-tool-library__install > button svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.tt-tool-library__install > button:hover {
  background: #1d4ed8;
  box-shadow: 0 5px 12px rgba(37, 99, 235, 0.22);
  transform: translateY(-1px);
}

.tt-tool-library__install > button:active {
  transform: translateY(0);
}

.tt-tool-library__install > .tt-install-help {
  grid-column: 1 / -1;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid color-mix(in srgb, var(--color-primary) 18%, var(--color-border));
}

.tt-install-nudge {
  position: fixed;
  top: calc(76px + env(safe-area-inset-top) + 10px);
  right: max(14px, env(safe-area-inset-right));
  z-index: 10030;
  width: min(310px, calc(100vw - 28px));
  padding: 1rem 2.2rem 1rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 0.85rem;
  background: var(--color-bg);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
  animation: tt-install-nudge-in 190ms ease-out;
}

.tt-install-nudge__close {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  padding: 0;
  border: 0;
  border-radius: 0.4rem;
  background: transparent;
  color: var(--color-text-muted);
  font: inherit;
  font-size: 1.15rem;
  cursor: pointer;
}

.tt-install-nudge__close:hover {
  background: var(--color-bg-tertiary);
  color: var(--color-text);
}

.tt-install-nudge__button {
  display: block;
  margin-left: auto;
}

.tt-install-help {
  color: var(--color-text-secondary) !important;
  font-size: 0.7rem !important;
}

@keyframes tt-install-nudge-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.tt-tool-library__footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.35rem calc(0.9rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--color-border);
  background: color-mix(in srgb, var(--color-bg-secondary) 82%, var(--color-bg));
  color: var(--color-text-muted);
  font-size: 0.69rem;
  line-height: 1.4;
}

.tt-tool-library__footer svg {
  width: 0.9rem;
  height: 0.9rem;
  flex: 0 0 auto;
  color: var(--color-success);
}

.tool-ui--has-save {
  position: relative;
}

.tt-tool-save-scope {
  position: relative;
}

.tt-save-current {
  position: absolute;
  top: var(--tt-save-top, 0);
  right: var(--tt-save-right, 0);
  z-index: 8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.15rem;
  margin: 0;
  padding: 0.42rem 0.68rem;
  border: 1px solid color-mix(in srgb, var(--color-primary) 22%, var(--color-border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-bg) 92%, transparent);
  color: var(--color-primary);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.09);
  transform: translate(18%, -50%);
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.tt-save-current svg {
  width: 1rem;
  height: 1rem;
}

.tt-save-current[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 2;
  padding: 7px 10px;
  border-radius: 7px;
  background: var(--color-text, #0f172a);
  color: var(--color-bg, #fff);
  box-shadow: 0 3px 12px rgba(15, 23, 42, .14);
  font-size: .75rem;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
}

.tt-save-current[data-tooltip]:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: none;
}

@media (hover: hover) {
  .tt-save-current[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
}

.tt-save-current:hover {
  border-color: color-mix(in srgb, var(--color-primary) 45%, var(--color-border));
  background: color-mix(in srgb, var(--color-primary) 10%, var(--color-bg));
  box-shadow: 0 6px 14px color-mix(in srgb, var(--color-primary) 12%, transparent);
  transform: translate(18%, -56%);
}

.tt-save-current.is-saved {
  border-color: color-mix(in srgb, var(--color-warning) 35%, var(--color-border));
  background: var(--color-warning-light);
  color: var(--color-warning-dark);
}

.tt-save-flight {
  position: fixed;
  z-index: 10020;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid color-mix(in srgb, var(--color-primary) 24%, var(--color-border));
  border-radius: 50%;
  background: var(--color-bg);
  color: var(--color-primary);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.12);
  pointer-events: none;
}

.tt-save-flight svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

@media (max-width: 1320px) {
  .tt-library-trigger {
    width: 38px;
    min-width: 38px;
    height: 38px;
    padding: 0;
  }
}

@media (max-width: 640px) {
  .tt-library-trigger {
    width: 36px;
    min-width: 36px;
    height: 38px;
    border-radius: 10px;
  }

  .tt-tool-library {
    width: 100%;
    border-right: 0;
  }

  .tt-tool-library__header {
    padding: 1rem 3.75rem 0.9rem 1.05rem;
  }

  .tt-tool-library__body {
    padding-inline: 0.75rem;
  }

  .tt-tool-library__item {
    padding: 0.3rem;
  }

  .tt-save-current {
    min-height: 2.1rem;
  }
}

@media (max-width: 390px) {
  .tt-library-trigger,
  .header-actions .tt-library-trigger {
    width: 36px;
    min-width: 36px;
    height: 36px;
  }

  .tt-library-trigger__icon {
    width: 16px;
    height: 16px;
  }

  .tt-save-current {
    width: 2.15rem;
    min-width: 2.15rem;
    height: 2.15rem;
    min-height: 2.15rem;
    padding: 0;
    transform: translate(10%, -50%);
  }

  .tt-save-current:hover {
    transform: translate(10%, -56%);
  }

  .tt-save-current > span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tt-install-nudge {
    animation: none;
  }

  .tt-library-trigger,
  .tt-library-backdrop,
  .tt-tool-library,
  .tt-tool-library__item,
  .tt-tool-library__item-action,
  .tt-tool-library__install > button,
  .tt-save-current,
  .tt-save-current::after {
    transition: none;
  }
}

@media (max-width: 640px) {
  .header-actions .lang-switcher__field { width: 58px; }
  .site-header__action { width: 36px; height: 38px; }
  .site-header__action svg { width: 22px; height: 22px; }
  .site-header__donate > svg { width: 19px; height: 19px; }
}

@media (max-width: 360px) {
  .site-header__logo-icon { width: 60px; }
}

@media (max-width: 480px) {
  .header-actions { gap: 2px; flex-shrink: 0; }
  .header-actions .lang-switcher__field { width: 50px; }
  .header-actions .lang-switcher__flag { left: 6px; }
  .header-actions .lang-switcher__chevron { right: 5px; }
  .site-header__buttons { gap: 2px; }
  .site-header__action { width: 32px; }
  .header-actions .theme-toggle,
  .header-actions .tt-library-trigger,
  .mobile-menu-toggle { width: 32px; min-width: 32px; }
}

@media (max-width: 340px) {
  .site-header__inner { gap: 4px; padding-inline: 6px; }
  .header-actions .lang-switcher__field { width: 44px; }
  .site-header__buttons { gap: 0; }
}
/* Cookie choice is shared by every public page. */
.at-cookie-notice[hidden] { display: none !important; }
.at-cookie-notice {
  position: fixed;
  z-index: 1000;
  left: 16px;
  bottom: 16px;
  width: min(360px, calc(100vw - 32px));
  padding: 14px;
  border: 1px solid var(--color-border, #dce3eb);
  border-radius: 12px;
  color: var(--color-text, #172033);
  background: var(--color-surface, #fff);
  box-shadow: 0 8px 28px rgba(15, 23, 42, .12);
}
.at-cookie-notice p { margin: 0 0 10px; font-size: .8rem; line-height: 1.5; }
.at-cookie-notice__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.at-cookie-notice__actions button,
.at-cookie-notice__actions a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border: 1px solid var(--color-border, #dce3eb);
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: .78rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.at-cookie-notice__actions [data-cookie-choice="all"] { border-color: #087cf0; background: #087cf0; color: #fff; }
.at-cookie-notice__actions a { border-color: transparent; color: #086bc4; }
[data-theme="dark"] .at-cookie-notice__actions a { color: #93c5fd; }
.at-cookie-notice__actions button:focus-visible,
.at-cookie-notice__actions a:focus-visible { outline: 3px solid #087cf0; outline-offset: 2px; }
@media (max-width: 480px) {
  .at-cookie-notice { left: 12px; bottom: 12px; width: calc(100vw - 118px); }
  .at-cookie-notice__actions { gap: 4px; }
  .at-cookie-notice__actions button { padding-inline: 8px; font-size: .72rem; }
  .at-cookie-notice__actions a { padding-inline: 0; font-size: .72rem; }
}

/* Shared by regular and standalone tool shells during an operational pause. */
.tool-ui.tool-maintenance {
    display: block;
    min-height: 180px;
    padding: clamp(20px, 4vw, 36px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl, 16px);
    background: var(--color-surface, var(--color-bg));
}
.tool-maintenance h2 { margin: 0 0 12px; color: var(--color-text); font-size: 1.25rem; line-height: 1.5; }
.tool-maintenance p { margin: 0; color: var(--color-text-secondary); line-height: 1.7; }
.tool-maintenance p + p { margin-top: 14px; }
.tool-maintenance a { color: var(--color-primary, #4f46e5); text-decoration: underline; text-underline-offset: 3px; }
.tool-maintenance a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
