*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ── */
.header {
  position: sticky; top: 0; width: 100%;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #f3f4f6;
  z-index: 200;
}
.header-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 32px;
  height: 60px; display: flex; align-items: center; justify-content: space-between;
}
.header-logo {
  font-size: 18px; font-weight: 700; color: #111;
  text-decoration: none; letter-spacing: -0.3px; cursor: pointer;
}
.header-logo span { color: #6366f1; }
.header-nav { display: flex; align-items: center; gap: 10px; }
.header-fav-link {
  display: flex; align-items: center; gap: 5px;
  height: 32px; padding: 0 10px; border-radius: 7px;
  font-size: 13px; font-weight: 500; color: #6b7280;
  text-decoration: none; transition: color .15s, background .15s;
}
.header-fav-link:hover { color: #6366f1; background: #f5f3ff; }

.btn-ghost {
  height: 36px; padding: 0 16px;
  border: 1.5px solid #e5e7eb; border-radius: 8px;
  background: #fff; font-size: 14px; font-weight: 500; color: #374151;
  cursor: pointer; transition: border-color .15s, color .15s;
}
.btn-ghost:hover { border-color: #6366f1; color: #6366f1; }
.btn-primary {
  height: 36px; padding: 0 16px; border: none; border-radius: 8px;
  background: #6366f1; font-size: 14px; font-weight: 500; color: #fff;
  cursor: pointer; transition: background .15s;
}
.btn-primary:hover { background: #4f46e5; }

.user-dropdown-wrap { position: relative; }
.user-btn {
  display: flex; align-items: center; gap: 6px;
  background: none; border: none; cursor: pointer;
  font-size: 14px; font-weight: 500; color: #374151;
  padding: 6px 10px; border-radius: 8px; transition: background .15s;
}
.user-btn:hover { background: #f3f4f6; }
.user-btn svg { transition: transform .15s; color: #9ca3af; }
.user-btn.open svg { transform: rotate(180deg); }
.user-dropdown {
  position: absolute; right: 0; top: calc(100% + 6px);
  background: #fff; border: 1.5px solid #e5e7eb; border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.09); min-width: 200px;
  z-index: 300; overflow: hidden; display: none;
}
.user-dropdown.open { display: block; }
.dropdown-item { padding: 10px 16px; font-size: 14px; color: #374151; cursor: pointer; transition: background .1s; }
.dropdown-item:hover { background: #f9fafb; }
.dropdown-item.danger { color: #ef4444; }
.dropdown-item.danger:hover { background: #fff5f5; }
.dropdown-divider { height: 1px; background: #f3f4f6; margin: 4px 0; }
.dropdown-item a { text-decoration: none; color: inherit; }

/* ── Star / favoritos ── */
.fav-btn {
  background: none; border: none; cursor: pointer; padding: 0 2px;
  color: #d1d5db; display: flex; align-items: center;
  transition: color .15s, transform .15s;
}
.fav-btn:hover { color: #f59e0b; transform: scale(1.2); }
.fav-btn.active { color: #f59e0b; }

/* ── Main / page-wrap ── */
main { flex: 1; display: flex; align-items: flex-start; justify-content: center; }

.page-wrap {
  width: 100%; max-width: 700px;
  padding: 0 24px 60px;
  padding-top: clamp(40px, calc(50vh - 210px), 280px);
  transition: padding-top .55s cubic-bezier(.4,0,.2,1);
}
body.has-results .page-wrap { padding-top: 32px; }

/* ── Brand ── */
.brand {
  text-align: center; margin-bottom: 28px;
  overflow: hidden; max-height: 120px; opacity: 1;
  transition: max-height .45s cubic-bezier(.4,0,.2,1), opacity .3s ease, margin-bottom .45s ease;
}
body.has-results .brand { max-height: 0; opacity: 0; margin-bottom: 0; }

.brand-logo { font-size: 32px; font-weight: 800; color: #111; letter-spacing: -1px; line-height: 1; margin-bottom: 8px; }
.brand-logo span { color: #6366f1; }
.brand-tagline { font-size: 15px; color: #6b7280; }

/* ── Search bar ── */
.search-wrapper { position: relative; display: flex; align-items: center; }

.search-input {
  width: 100%; height: 56px; padding: 0 56px 0 20px;
  border: 2px solid #e5e7eb; border-radius: 14px;
  font-size: 15px; color: #111; outline: none;
  transition: border-color .15s, box-shadow .15s; background: #fff;
}
.search-input::placeholder { color: #9ca3af; }
.search-input:focus { border-color: #6366f1; box-shadow: 0 0 0 4px rgba(99,102,241,.08); }
.search-input:disabled { background: #f9fafb; color: #6b7280; }

.btn-search {
  position: absolute; right: 10px;
  width: 36px; height: 36px;
  background: #6366f1; border: none; border-radius: 10px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: #fff; transition: background .15s, transform .1s;
}
.btn-search:hover { background: #4f46e5; }
.btn-search:active { transform: scale(.95); }
.btn-search:disabled { background: #a5b4fc; cursor: not-allowed; }

.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.4); border-top-color: #fff;
  border-radius: 50%; animation: spin .7s linear infinite; display: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Hint ── */
.hint {
  font-size: 13px; color: #9ca3af; margin-top: 10px;
  min-height: 18px; text-align: center; transition: color .2s;
}
.hint.loading { color: #6366f1; }
.hint.error   { color: #ef4444; }

/* ── Domain suggestion ── */
.domain-suggestion {
  display: none; text-align: center; font-size: 13px; color: #6b7280;
  margin-top: 6px; animation: fadeIn .25s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.domain-suggestion a {
  color: #6366f1; font-weight: 600; cursor: pointer; text-decoration: none;
}
.domain-suggestion a:hover { text-decoration: underline; }

/* ── Autocomplete ── */
.autocomplete {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: #fff; border: 2px solid #e5e7eb; border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,.08); overflow: hidden; z-index: 100; display: none;
}
.autocomplete.visible { display: block; }
.ac-item { display: flex; align-items: center; gap: 10px; padding: 10px 16px; cursor: pointer; transition: background .1s; }
.ac-item:hover, .ac-item.focused { background: #f5f5ff; }
.ac-favicon { width: 20px; height: 20px; border-radius: 4px; flex-shrink: 0; object-fit: contain; }
.ac-domain { flex: 1; font-size: 14px; color: #111; font-weight: 500; }

/* ── Bento grid ── */
.bento-wrap {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 14px;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity .4s ease .1s, transform .4s ease .1s;
}
body.has-results .bento-wrap {
  opacity: 1; transform: translateY(0); pointer-events: all;
}

.bento-card {
  background: #fff; border: 1.5px solid #e5e7eb; border-radius: 18px;
  padding: 24px; min-height: 160px; display: flex; flex-direction: column;
}
/* Tech card full width below the two top cards */
.bento-wrap .bento-card:nth-child(3) { grid-column: 1 / -1; min-height: auto; }

/* Tech card fade states */
#techBentoCard.tech-hiding { animation: techFadeOut .5s ease forwards; }
#techBentoCard.tech-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
#techBentoCard.tech-fadein { animation: techFadeIn .5s ease forwards; }
@keyframes techFadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}
@keyframes techFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Skeleton shimmer ── */
@keyframes shimmer {
  0%   { background-position: 200% center; }
  100% { background-position: -200% center; }
}
.skel-block {
  background: linear-gradient(90deg, #f3f4f6 0%, #e8e9eb 40%, #f3f4f6 80%);
  background-size: 200% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
  border-radius: 6px; flex-shrink: 0;
}
.bento-skeleton { display: flex; flex-direction: column; gap: 10px; flex: 1; }

/* ── Visits card content ── */
.visits-content { display: none; flex-direction: column; flex: 1; }

.result-domain {
  font-size: 13px; color: #9ca3af; font-weight: 500;
  display: flex; align-items: center; gap: 7px; margin-bottom: 12px;
}
.result-favicon { width: 16px; height: 16px; border-radius: 3px; flex-shrink: 0; }
.domain-ext-link {
  display: inline-flex; align-items: center; color: #d1d5db;
  transition: color .15s; flex-shrink: 0; margin-left: 2px;
}
.domain-ext-link:hover { color: #6366f1; }
.domain-edit-btn {
  display: inline-flex; align-items: center; color: #d1d5db;
  background: none; border: none; cursor: pointer; padding: 0; margin-left: 6px;
  transition: color .15s; flex-shrink: 0;
}
.domain-edit-btn:hover { color: #6366f1; }
.affiliate-edit-wrap {
  display: flex; align-items: center; gap: 6px; width: 100%; margin-top: 2px;
}
.affiliate-input {
  flex: 1; height: 30px; padding: 0 10px; font-size: 12px;
  border: 1.5px solid #6366f1; border-radius: 8px; outline: none; color: #111;
  min-width: 0;
}
.affiliate-save {
  height: 30px; padding: 0 10px; background: #6366f1; color: #fff;
  border: none; border-radius: 8px; font-size: 12px; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: background .15s;
}
.affiliate-save:hover { background: #4f46e5; }
.affiliate-cancel {
  height: 30px; padding: 0 8px; background: none; color: #9ca3af;
  border: 1.5px solid #e5e7eb; border-radius: 8px; font-size: 12px;
  cursor: pointer; transition: color .15s; white-space: nowrap;
}
.affiliate-cancel:hover { color: #ef4444; border-color: #ef4444; }

.visits-lt { font-size: 0.65em; font-weight: 800; vertical-align: 0.12em; }

.result-visits {
  font-size: 52px; font-weight: 800; color: #111;
  letter-spacing: -2px; line-height: 1; transition: color .3s;
}
.result-visits.updating { color: #6366f1; }
.result-visits-exact { font-size: 13px; color: #9ca3af; margin-top: 8px; font-variant-numeric: tabular-nums; display: none; }
.result-label { font-size: 13px; color: #6b7280; margin-top: 10px; }

/* ── Tech card content ── */
.tech-content { display: none; flex-direction: column; flex: 1; gap: 12px; }
.tech-header { display: flex; align-items: center; justify-content: space-between; }
.tech-count { font-size: 12px; color: #9ca3af; font-weight: 500; }
.tech-primary-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; background: #eff0ff; border-radius: 6px;
  font-size: 12px; font-weight: 600; color: #6366f1;
}
.tech-groups { display: flex; flex-wrap: wrap; gap: 18px; }
.tech-group { display: flex; flex-direction: column; gap: 5px; }
.tech-group-label { font-size: 10px; color: #9ca3af; text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.tech-group-items { display: flex; flex-wrap: wrap; gap: 5px; }
.tech-tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px; background: #f3f4f6; border-radius: 6px;
  font-size: 12px; font-weight: 500; color: #374151;
  text-decoration: none; transition: background .15s;
}
a.tech-tag:hover { background: #e8e9ff; color: #4f46e5; }
.tech-tag img { width: 14px; height: 14px; object-fit: contain; flex-shrink: 0; }
.tech-version { color: #9ca3af; font-weight: 400; font-size: 11px; }
.tech-signals { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 10px; border-top: 1px solid #f3f4f6; }
.tech-signal { font-size: 11px; padding: 3px 9px; border-radius: 5px; font-weight: 500; background: #f0fdf4; color: #16a34a; }
.tech-security { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid #f3f4f6; }
.tech-sec-grade { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 5px; }
.tech-sec-label { font-size: 12px; color: #6b7280; }
.tech-sec-tls { font-size: 12px; color: #9ca3af; margin-left: auto; }
.tech-empty { font-size: 13px; color: #9ca3af; }
.tech-tag-edit {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; margin-left: 2px; color: #d1d5db;
  background: none; border: none; cursor: pointer; padding: 0; flex-shrink: 0;
  transition: color .15s;
}
.tech-tag-edit:hover { color: #6366f1; }
.tech-affiliate-editor {
  display: flex; align-items: center; gap: 4px; margin-top: 4px;
  padding: 4px 8px; background: #eff0ff; border-radius: 8px;
  font-size: 11px;
}
.tech-affiliate-input {
  flex: 1; height: 24px; padding: 0 6px; font-size: 11px; min-width: 160px;
  border: 1.5px solid #6366f1; border-radius: 5px; outline: none; color: #111;
}
.tech-affiliate-save {
  height: 24px; padding: 0 8px; background: #6366f1; color: #fff;
  border: none; border-radius: 5px; font-size: 11px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
}
.tech-affiliate-cancel {
  height: 24px; padding: 0 6px; background: none; color: #9ca3af;
  border: 1.5px solid #e5e7eb; border-radius: 5px; font-size: 11px; cursor: pointer;
}

/* ── WHOIS card content ── */
.whois-content { display: none; flex-direction: column; flex: 1; }

.whois-title {
  font-size: 11px; font-weight: 600; color: #9ca3af;
  text-transform: uppercase; letter-spacing: .6px; margin-bottom: 14px;
}
.whois-row { display: flex; flex-direction: column; margin-bottom: 12px; }
.whois-row:last-child { margin-bottom: 0; }
.whois-row span { font-size: 11px; color: #9ca3af; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 2px; }
.whois-row strong { font-size: 13px; color: #111; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Auth Modal ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.4);
  display: flex; align-items: center; justify-content: center;
  z-index: 500; padding: 24px;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.modal-overlay.visible { opacity: 1; pointer-events: all; }
.modal {
  background: #fff; border-radius: 20px; padding: 36px 32px 32px;
  width: 100%; max-width: 400px; position: relative;
  transform: translateY(16px); transition: transform .22s;
}
.modal-overlay.visible .modal { transform: translateY(0); }
.modal-close {
  position: absolute; top: 14px; right: 14px; width: 28px; height: 28px;
  border: none; background: #f3f4f6; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: #6b7280; transition: background .15s;
}
.modal-close:hover { background: #e5e7eb; color: #111; }
.modal-title { font-size: 22px; font-weight: 700; color: #111; margin-bottom: 4px; }
.modal-subtitle { font-size: 14px; color: #6b7280; margin-bottom: 24px; }
.btn-google {
  width: 100%; height: 44px; display: flex; align-items: center; justify-content: center; gap: 10px;
  border: 1.5px solid #e5e7eb; border-radius: 10px;
  background: #fff; font-size: 14px; font-weight: 500; color: #374151;
  cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s; margin-bottom: 16px;
}
.btn-google:hover { background: #f9fafb; border-color: #d1d5db; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.modal-divider { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.modal-divider::before, .modal-divider::after { content: ''; flex: 1; height: 1px; background: #e5e7eb; }
.modal-divider span { font-size: 12px; color: #9ca3af; }
.modal-input {
  width: 100%; height: 44px; padding: 0 14px;
  border: 1.5px solid #e5e7eb; border-radius: 10px;
  font-size: 14px; color: #111; outline: none; margin-bottom: 10px;
  transition: border-color .15s, box-shadow .15s; background: #fff;
}
.modal-input:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.08); }
.modal-input::placeholder { color: #9ca3af; }
.modal-error { font-size: 13px; color: #ef4444; min-height: 18px; margin-bottom: 8px; text-align: center; }
.modal-error.success { color: #10b981; }
.btn-submit {
  width: 100%; height: 44px; background: #6366f1; border: none; border-radius: 10px;
  font-size: 14px; font-weight: 600; color: #fff;
  cursor: pointer; margin-bottom: 16px; transition: background .15s;
}
.btn-submit:hover { background: #4f46e5; }
.btn-submit:disabled { background: #a5b4fc; cursor: not-allowed; }
.modal-footer { text-align: center; font-size: 13px; color: #6b7280; }
.modal-footer a { color: #6366f1; font-weight: 500; cursor: pointer; text-decoration: none; }
.modal-footer a:hover { text-decoration: underline; }

/* ── Responsive ── */
@media (max-width: 580px) {
  .bento-wrap { grid-template-columns: 1fr; }
  .bento-wrap .bento-card:nth-child(3) { grid-column: span 1; }
  .result-visits { font-size: 44px; }
  .header-inner { padding: 0 16px; }
  .header-nav { gap: 6px; }
  .btn-ghost, .btn-primary { height: 32px; padding: 0 10px; font-size: 13px; }
}

@media (max-width: 430px) {
  #btnLogin { display: none; }
  .fav-text { display: none; }
  .header-fav-link { padding: 0 6px; }
  .user-name { max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: middle; }
}


/* ── Animated placeholder ── */
.anim-ph {
  position: absolute; left: 22px; top: 50%; transform: translateY(-50%);
  font-size: 15px; color: #9ca3af; pointer-events: none; user-select: none;
  white-space: nowrap; height: 1.3em; transition: opacity .15s;
}
.anim-ph.ph-hide { opacity: 0; }
.anim-ph span { position: absolute; left: 0; top: 0; display: block; }
.anim-ph span.ph-out { animation: phOut .3s ease forwards; }
.anim-ph span.ph-in  { animation: phIn  .3s ease forwards; }
@keyframes phOut { to   { opacity: 0; transform: translateY(-7px); } }
@keyframes phIn  { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }

/* ── Dark mode toggle button ── */
.btn-theme-toggle {
  width: 32px; height: 32px; border-radius: 7px; border: 1.5px solid #e5e7eb;
  background: #fff; color: #6b7280; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .15s, color .15s, background .15s; flex-shrink: 0;
}
.btn-theme-toggle:hover { border-color: #6366f1; color: #6366f1; }
.btn-theme-toggle .icon-moon { display: block; }
.btn-theme-toggle .icon-sun  { display: none; }

/* ── Dark mode ── */
[data-theme="dark"] {
  color-scheme: dark;
}
[data-theme="dark"] body {
  background: #0f0f0f;
}
[data-theme="dark"] .header {
  background: rgba(15,15,15,0.92);
  border-bottom-color: #222;
}
[data-theme="dark"] .header-logo { color: #f3f4f6; }
[data-theme="dark"] .header-fav-link { color: #9ca3af; }
[data-theme="dark"] .header-fav-link:hover { color: #818cf8; background: #1e1b4b; }
[data-theme="dark"] .btn-theme-toggle {
  background: #1a1a1a; border-color: #2a2a2a; color: #9ca3af;
}
[data-theme="dark"] .btn-theme-toggle:hover { border-color: #6366f1; color: #818cf8; }
[data-theme="dark"] .btn-theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .btn-theme-toggle .icon-sun  { display: block; }

[data-theme="dark"] .btn-ghost {
  background: #1a1a1a; border-color: #2a2a2a; color: #d1d5db;
}
[data-theme="dark"] .btn-ghost:hover { border-color: #6366f1; color: #818cf8; }
[data-theme="dark"] .user-btn { color: #d1d5db; }
[data-theme="dark"] .user-btn:hover { background: #1e1e1e; }
[data-theme="dark"] .user-dropdown {
  background: #1a1a1a; border-color: #2a2a2a;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
[data-theme="dark"] .dropdown-item { color: #d1d5db; }
[data-theme="dark"] .dropdown-item:hover { background: #222; }
[data-theme="dark"] .dropdown-item.danger:hover { background: #2a1215; }
[data-theme="dark"] .dropdown-divider { background: #222; }

[data-theme="dark"] .brand-logo { color: #f3f4f6; }
[data-theme="dark"] .brand-tagline { color: #6b7280; }

[data-theme="dark"] .search-input {
  background: #1a1a1a; border-color: #2a2a2a; color: #f3f4f6;
}
[data-theme="dark"] .search-input::placeholder { color: #4b5563; }
[data-theme="dark"] .anim-ph { color: #4b5563; }
[data-theme="dark"] .search-input:focus { border-color: #6366f1; box-shadow: 0 0 0 4px rgba(99,102,241,.12); }
[data-theme="dark"] .search-input:disabled { background: #111; color: #4b5563; }

[data-theme="dark"] .autocomplete {
  background: #1a1a1a; border-color: #2a2a2a;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
[data-theme="dark"] .ac-item:hover,
[data-theme="dark"] .ac-item.focused { background: #1e1b4b; }
[data-theme="dark"] .ac-domain { color: #f3f4f6; }

[data-theme="dark"] .bento-card {
  background: #1a1a1a; border-color: #2a2a2a;
}
[data-theme="dark"] .skel-block {
  background: linear-gradient(90deg, #262626 0%, #333 40%, #262626 80%);
  background-size: 200% 100%;
}

[data-theme="dark"] .result-domain { color: #6b7280; }
[data-theme="dark"] .domain-ext-link { color: #4b5563; }
[data-theme="dark"] .domain-ext-link:hover { color: #818cf8; }
[data-theme="dark"] .domain-edit-btn { color: #4b5563; }
[data-theme="dark"] .domain-edit-btn:hover { color: #818cf8; }
[data-theme="dark"] .result-visits { color: #f3f4f6; }
[data-theme="dark"] .result-visits-exact { color: #6b7280; }
[data-theme="dark"] .result-label { color: #6b7280; }

[data-theme="dark"] .affiliate-input { color: #f3f4f6; background: #1a1a1a; }
[data-theme="dark"] .affiliate-cancel { color: #6b7280; border-color: #2a2a2a; }

[data-theme="dark"] .tech-count { color: #6b7280; }
[data-theme="dark"] .tech-primary-badge { background: #1e1b4b; color: #818cf8; }
[data-theme="dark"] .tech-group-label { color: #6b7280; }
[data-theme="dark"] .tech-tag { background: #262626; color: #d1d5db; }
[data-theme="dark"] a.tech-tag:hover { background: #2d2848; color: #818cf8; }
[data-theme="dark"] .tech-version { color: #6b7280; }
[data-theme="dark"] .tech-signals { border-top-color: #222; }
[data-theme="dark"] .tech-signal { background: #052e16; color: #4ade80; }
[data-theme="dark"] .tech-security { border-top-color: #222; }
[data-theme="dark"] .tech-sec-label { color: #6b7280; }
[data-theme="dark"] .tech-sec-tls { color: #4b5563; }
[data-theme="dark"] .tech-empty { color: #4b5563; }
[data-theme="dark"] .tech-tag-edit { color: #4b5563; }
[data-theme="dark"] .tech-tag-edit:hover { color: #818cf8; }
[data-theme="dark"] .tech-affiliate-editor { background: #1e1b4b; }
[data-theme="dark"] .tech-affiliate-input { color: #f3f4f6; background: #0f0f2e; }
[data-theme="dark"] .tech-affiliate-cancel { border-color: #2a2a2a; color: #6b7280; }

[data-theme="dark"] .whois-title { color: #6b7280; }
[data-theme="dark"] .whois-row span { color: #6b7280; }
[data-theme="dark"] .whois-row strong { color: #f3f4f6; }

[data-theme="dark"] .hint { color: #4b5563; }
[data-theme="dark"] .hint.loading { color: #818cf8; }
[data-theme="dark"] .hint.error   { color: #f87171; }
[data-theme="dark"] .domain-suggestion { color: #6b7280; }
[data-theme="dark"] .domain-suggestion a { color: #818cf8; }

[data-theme="dark"] .modal {
  background: #1a1a1a;
}
[data-theme="dark"] .modal-close { background: #262626; color: #9ca3af; }
[data-theme="dark"] .modal-close:hover { background: #2a2a2a; color: #f3f4f6; }
[data-theme="dark"] .modal-title { color: #f3f4f6; }
[data-theme="dark"] .modal-subtitle { color: #6b7280; }
[data-theme="dark"] .btn-google {
  background: #1a1a1a; border-color: #2a2a2a; color: #d1d5db;
}
[data-theme="dark"] .btn-google:hover { background: #222; border-color: #3a3a3a; }
[data-theme="dark"] .modal-divider::before,
[data-theme="dark"] .modal-divider::after { background: #2a2a2a; }
[data-theme="dark"] .modal-divider span { color: #4b5563; }
[data-theme="dark"] .modal-input {
  background: #111; border-color: #2a2a2a; color: #f3f4f6;
}
[data-theme="dark"] .modal-input::placeholder { color: #4b5563; }
[data-theme="dark"] .modal-input:focus { border-color: #6366f1; }
[data-theme="dark"] .modal-footer { color: #6b7280; }
[data-theme="dark"] .modal-footer a { color: #818cf8; }
[data-theme="dark"] .modal-error.success { color: #4ade80; }

/* ── Download report button ── */
.report-dl-wrap { max-width: 700px; margin: 4px auto 0; padding: 0 20px; text-align: right; display: none; }
body.has-results .report-dl-wrap { display: block; }
.btn-dl-report { background: none; border: none; font-family: inherit; font-size: 12px; color: #9ca3af; cursor: pointer; padding: 0; }
.btn-dl-report:hover { color: #374151; }
.btn-dl-report:disabled { opacity: 0.5; cursor: default; }
[data-theme="dark"] .btn-dl-report { color: #4b5563; }
[data-theme="dark"] .btn-dl-report:hover { color: #9ca3af; }

/* ── Theme transition (only active during the switch) ── */
.theme-transitioning *, .theme-transitioning *::before, .theme-transitioning *::after {
  transition: background-color .28s ease, border-color .28s ease, color .22s ease !important;
}
