/* Used by: global safe-area and shared navbar offset calculations */
:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --navbar-height: 69px;
  --header-offset: calc(var(--navbar-height, 69px) + var(--safe-top));
}

@media (min-width: 1024px) {
  :root {
    --navbar-height: 73px;
  }
}

/* Used by: page root and global layout overflow handling */
html {
  overflow-x: hidden;
}

/* Used by: page root and global layout overflow handling */
body {
  overflow-x: hidden;
  padding-bottom: var(--safe-bottom);
}

/* Used by: shared header and footer brand lockups */
.site-brand {
  max-width: min(58vw, 18rem);
}

/* Used by: shared header and footer logo mark */
.site-brand-logo {
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  border-radius: 999px;
  object-fit: cover;
}

/* Used by: original compact footer logo on phone and tablet layouts */
.site-brand-logo-footer {
  width: 2.75rem;
  height: 2.75rem;
}

@media (min-width: 1024px) {
  .site-brand {
    max-width: none;
  }

  .site-brand-logo {
    width: 2.5rem;
    height: 2.5rem;
  }
}

/* Used by: all Material Symbols icons across navbar, sidebar, cards, and footer */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Used by: homepage recent tools horizontal scroll area */
.custom-scrollbar::-webkit-scrollbar {
  height: 10px;
}

/* Used by: homepage recent tools horizontal scroll area */
.custom-scrollbar::-webkit-scrollbar-track {
  background: #ececec;
  border-radius: 999px;
}

/* Used by: homepage recent tools horizontal scroll area */
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #000000;
  border-radius: 999px;
}

/* Used by: shared large-type footer */
.site-footer-large {
  position: relative;
  width: 100%;
  margin-top: auto;
  overflow: hidden;
  border-top: 1px solid #e5e7eb;
  background: #d9d9d9;
  padding: clamp(7rem, 12vw, 11rem) clamp(0.75rem, 3vw, 2rem) clamp(0.75rem, 3vw, 2rem);
}

.footer-plate-overlay,
.footer-plate-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.footer-plate-overlay {
  background: rgba(255, 255, 255, 0.68);
}

.footer-large-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 92rem);
  margin: 0 auto;
}

.footer-legacy-shell {
  display: none;
}

.footer-large-panel {
  background: transparent;
  padding: clamp(2rem, 5vw, 4.75rem) clamp(1.25rem, 5vw, 5rem) clamp(1.5rem, 3vw, 2.5rem);
}

.footer-large-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 4.5rem);
}

.footer-large-heading {
  margin: 0 0 1.35rem;
  color: #000;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer-large-copy {
  max-width: 20rem;
  margin: 0;
  color: #525252;
  font-size: 0.9rem;
  line-height: 1.65;
}

.footer-large-links {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-large-links a,
.footer-large-links button {
  display: inline-flex;
  min-height: 1.5rem;
  align-items: center;
  border: 0;
  background: transparent;
  padding: 0;
  color: #525252;
  font-family: "Inter", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
  transition: color 150ms ease, transform 150ms ease;
}

.footer-large-links a:hover,
.footer-large-links button:hover {
  color: #000;
  transform: translateX(0.2rem);
}

.footer-large-links a:focus-visible,
.footer-large-links button:focus-visible,
.footer-large-wordmark:focus-visible {
  border-radius: 0.2rem;
  outline: 3px solid #ffd700;
  outline-offset: 4px;
}

.footer-large-wordmark {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: clamp(0.75rem, 2vw, 1.75rem);
  margin-top: clamp(3.5rem, 8vw, 8rem);
  color: #000;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.4rem, 8.6vw, 8.5rem);
  font-weight: 900;
  letter-spacing: -0.075em;
  line-height: 0.82;
  white-space: nowrap;
}

.footer-large-wordmark img {
  width: clamp(4rem, 10vw, 9rem);
  height: clamp(4rem, 10vw, 9rem);
  flex: 0 0 auto;
  border-radius: 999px;
  object-fit: cover;
}

.footer-large-copyright {
  margin: clamp(2.5rem, 5vw, 4.5rem) 0 0;
  color: #737373;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

@media (max-width: 1023px) {
  .site-footer-large {
    padding: 2rem clamp(1rem, 3vw, 1.5rem);
  }

  .footer-large-shell {
    display: none;
  }

  .footer-legacy-shell {
    position: relative;
    z-index: 1;
    display: grid;
    width: min(100%, 80rem);
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin: 0 auto;
  }

  .footer-legacy-shell a,
  .footer-legacy-shell button {
    color: #525252;
  }

  .footer-legacy-shell a:hover,
  .footer-legacy-shell button:hover {
    color: #000;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .footer-legacy-shell {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Used by: shared sticky/fixed top navigation */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  overflow: visible !important;
  will-change: transform;
}

/* Used by: global page content offset below fixed navbar with device safe area */
#main-content {
  padding-top: var(--header-offset, calc(var(--navbar-height, 69px) + var(--safe-top)));
}

/* Used by: desktop primary navbar links (Tools, Pricing, API, Docs) */
.top-nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 2px;
  color: #6b7280;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* Used by: desktop primary navbar links hover (bold text) */
.top-nav-link:hover {
  font-weight: 800;
  color: #000000;
}

/* Used by: desktop primary navbar links yellow active underline */
.top-nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 7px;
  height: 2px;
  background: #ffd700;
  opacity: 0;
}

/* Used by: active desktop primary navbar link */
.top-nav-link.is-active {
  color: #000000;
  font-weight: 800;
}

/* Used by: active desktop primary navbar link underline */
.top-nav-link.is-active::after {
  opacity: 1;
}

/* Used by: shared footer background image performance optimization */
.footer-plate-image {
  will-change: transform;
  contain: strict;
  object-fit: cover;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* Used by: global tool error/limit toast notifications */
.global-toast-region {
  position: fixed;
  right: max(1rem, var(--safe-right));
  top: calc(var(--header-offset, var(--navbar-height, 69px)) + max(1rem, var(--safe-top)));
  z-index: 90;
  display: flex;
  width: min(34rem, calc(100vw - 2rem));
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.global-toast {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.875rem;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.875rem;
  background: #242424;
  color: #f3f4f6;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.32);
  padding: 1.125rem 1rem;
  pointer-events: auto;
  animation: global-toast-enter 180ms ease-out;
}

.global-toast--warning {
  background: #242424;
}

.global-toast--success {
  background: #242424;
}

.global-toast.is-leaving {
  opacity: 0;
  transform: translateY(0.5rem);
  transition: opacity 160ms ease, transform 160ms ease;
}

.global-toast__icon {
  color: #ff5f57;
  font-size: 1.45rem;
  line-height: 1.15;
  margin-top: 0.05rem;
}

.global-toast--warning .global-toast__icon {
  color: #f59e0b;
}

.global-toast--success .global-toast__icon {
  color: #4ade80;
}

.global-toast__body {
  min-width: 0;
}

.global-toast__title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.global-toast__accent {
  color: #a3a3a3;
  font-size: 1.2rem;
  line-height: 1;
}

.global-toast__title {
  margin: 0;
  color: #f5f5f5;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
}

.global-toast__message {
  margin: 0.5rem 0 0;
  color: #b8b8b8;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.global-toast__close {
  min-width: 2.25rem;
  min-height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0.375rem;
  background: transparent;
  color: #8d8d8d;
  cursor: pointer;
}

.global-toast__close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f5f5f5;
}

@keyframes global-toast-enter {
  from {
    opacity: 0;
    transform: translateY(0.75rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .global-toast-region {
    left: max(0.75rem, var(--safe-left));
    right: max(0.75rem, var(--safe-right));
    top: calc(var(--header-offset, var(--navbar-height, 69px)) + 0.75rem);
    width: auto;
  }

  .global-toast {
    border-radius: 0.75rem;
    padding: 1rem 0.875rem;
  }

  .global-toast__title {
    font-size: 0.96rem;
  }

  .global-toast__message {
    font-size: 0.86rem;
  }
}
.cookie-preferences-banner {
  position: fixed;
  z-index: 70;
  right: 1rem;
  bottom: calc(1rem + env(safe-area-inset-bottom));
  left: 1rem;
  display: flex;
  max-width: 56rem;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.75rem;
  background: #fff;
  padding: 1rem;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
}

.cookie-preferences-banner[hidden] {
  display: none;
}

.cookie-preferences-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem;
}

.cookie-preferences-button {
  min-height: 2.75rem;
  border: 1px solid #374151;
  border-radius: 0.5rem;
  padding: 0.65rem 1rem;
  background: #fff;
  color: #111827;
  font-weight: 700;
}

.cookie-preferences-button--accept {
  background: #111827;
  color: #fff;
}

.cookie-preferences-button--save {
  background: #e5e7eb;
}

.cookie-preferences-button:hover,
.cookie-preferences-button:focus-visible {
  text-decoration: underline;
}

.cookie-preferences-button:focus-visible,
.cookie-preferences-close:focus-visible,
.cookie-preferences-option input:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 3px;
}

.cookie-preferences-primary,
.cookie-preferences-secondary,
.cookie-preferences-close {
  min-height: 2.75rem;
  border-radius: 0.5rem;
  padding: 0.65rem 1rem;
  font-weight: 700;
}

.cookie-preferences-primary {
  border: 1px solid #d1b800;
  background: #ffd700;
  color: #000;
}

.cookie-preferences-secondary,
.cookie-preferences-close {
  border: 1px solid #d1d5db;
  background: #fff;
  color: #111827;
}

.cookie-preferences-dialog {
  width: min(calc(100% - 2rem), 38rem);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  border: 0;
  border-radius: 0.75rem;
  padding: 0;
  box-shadow: 0 24px 65px rgba(0, 0, 0, 0.28);
}

.cookie-preferences-dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.cookie-preferences-dialog form {
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
}

.cookie-preferences-dialog__header,
.cookie-preferences-option {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.cookie-preferences-close {
  min-width: 2.75rem;
  padding: 0.35rem;
  font-size: 1.5rem;
  line-height: 1;
}

.cookie-preferences-option {
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 0.875rem;
}

.cookie-preferences-option p {
  margin-top: 0.25rem;
  color: #4b5563;
  font-size: 0.875rem;
}

.cookie-preferences-option input {
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
}

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

.seo-related-tools {
  width: min(100% - 2rem, 72rem);
  margin: 2rem auto;
  padding: 1.25rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  background: #fff;
}

.seo-related-tools h2 {
  margin: 0 0 0.85rem;
  font: 700 1.15rem/1.25 "Space Grotesk", system-ui, sans-serif;
}

.seo-related-tools ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.seo-related-tools a {
  display: grid;
  gap: 0.2rem;
  height: 100%;
  padding: 0.75rem;
  border: 1px solid #f0f1f3;
  border-radius: 0.55rem;
  color: #111827;
  text-decoration: none;
}

.seo-related-tools a:hover,
.seo-related-tools a:focus-visible {
  border-color: #d4a900;
  background: #fffbea;
}

.seo-related-tools span {
  color: #6b7280;
  font-size: 0.82rem;
  line-height: 1.35;
}

@media (max-width: 40rem) {
  .cookie-preferences-banner {
    align-items: stretch;
    flex-direction: column;
  }

  .cookie-preferences-actions,
  .cookie-preferences-actions > button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
