:root {
  --white: #ffffff;
  --surface: #fcfbf8;
  --surface-2: #f5f2ec;
  --border: #e7e2da;
  --border-strong: #d7d0c6;
  --text-1: #1d1914;
  --text-2: #57534e;
  --text-3: #8d877f;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #eff6ff;
  --accent-border: #bfdbfe;
  --success: #15803d;
  --success-soft: #f0fdf4;
  --success-border: #bbf7d0;
  --warning: #c2410c;
  --warning-soft: #fff7ed;
  --warning-border: #fed7aa;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.06);
  --shadow-md: 0 6px 24px rgba(17, 24, 39, 0.08);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "DM Sans", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-1);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
}

img {
  max-width: 100%;
  height: auto;
}

.wp-block {
  max-width: 100% !important;
}

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -200px;
  z-index: 1000;
  background: var(--accent);
  color: var(--white);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 220;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  height: 68px;
  padding: 0 var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.site-logo {
  text-decoration: none;
  font-family: "Instrument Serif", serif;
  color: var(--text-1);
  font-size: 24px;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.site-logo span {
  color: var(--accent);
}

.nav-search-wrap {
  position: relative;
  flex: 1;
  max-width: 460px;
}

.nav-search-wrap input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text-1);
  padding: 10px 12px 10px 34px;
  font: inherit;
  font-size: 14px;
}

.nav-search-wrap input:focus,
.hero-search-box input:focus,
.sticky-search-wrap input:focus,
.submit-tool-page input:focus,
.submit-tool-page textarea:focus,
.submit-tool-page select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.nav-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.nav-link {
  text-decoration: none;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  padding: 7px 12px;
}

.nav-link:hover {
  color: var(--text-1);
  background: var(--surface-2);
}

.nav-cta {
  border: 0;
  background: var(--accent);
  color: var(--white);
  border-radius: var(--radius-md);
  padding: 9px 16px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.nav-cta:hover {
  background: var(--accent-hover);
}

.mobile-menu-toggle,
.mobile-menu {
  display: none;
}

.hero {
  border-bottom: 1px solid var(--border);
  background: var(--white);
  padding: 68px var(--space-6) 56px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 14px;
  margin-bottom: var(--space-5);
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.hero h1 {
  margin: 0 0 var(--space-4);
  font-family: "Instrument Serif", serif;
  font-size: clamp(34px, 4.8vw, 56px);
  line-height: 1.08;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.hero h1 em {
  color: var(--accent);
}

.hero-sub {
  max-width: 600px;
  margin: 0 auto var(--space-8);
  color: var(--text-2);
  font-size: 17px;
}

.hero-search-wrap {
  max-width: 620px;
  margin: 0 auto var(--space-8);
}

.hero-search-box {
  display: flex;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.hero-search-box input {
  flex: 1;
  border: 0;
  font: inherit;
  font-size: 15px;
  padding: 14px 16px;
}

.hero-search-btn {
  border: 0;
  background: var(--accent);
  color: var(--white);
  font: inherit;
  font-weight: 600;
  padding: 14px 22px;
  cursor: pointer;
}

.hero-search-btn:hover {
  background: var(--accent-hover);
}

.hero-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-6);
}

.hero-stat strong {
  display: block;
  font-family: "Instrument Serif", serif;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero-stat span {
  color: var(--text-3);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.hero-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
}

.quiz-section {
  max-width: 1280px;
  margin: 20px auto 0;
  padding: 0 var(--space-6);
}

.quiz-banner {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--white);
  color: inherit;
  padding: var(--space-5) var(--space-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  text-align: left;
}

.quiz-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.quiz-emoji {
  font-size: 24px;
}

.quiz-text h3 {
  margin: 0 0 2px;
  font-size: 16px;
  line-height: 1.3;
}

.quiz-text p {
  margin: 0;
  color: var(--text-2);
  font-size: 14px;
}

.quiz-cta {
  display: inline-flex;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: var(--white);
  font: inherit;
  font-weight: 600;
  padding: 10px 18px;
}

.filter-bar {
  position: sticky;
  top: 68px;
  z-index: 180;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
  padding: 10px 0;
}

.filter-bar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.sticky-search-wrap {
  flex: 1;
  min-width: 180px;
  max-width: 280px;
}

.sticky-search-wrap input {
  width: 100%;
  font: inherit;
  font-size: 14px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.filter-label {
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 11px;
  font-weight: 700;
}

.ftag {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  background: var(--white);
  color: var(--text-2);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.ftag:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.ftag.active {
  color: var(--white);
  border-color: var(--accent);
  background: var(--accent);
}

.filter-sep {
  width: 1px;
  height: 18px;
  background: var(--border);
  margin: 0 4px;
}

.page-body {
  max-width: 1280px;
  margin: 0 auto;
  padding: 26px var(--space-6) 56px;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: var(--space-6);
}

.sidebar {
  position: sticky;
  top: 132px;
  height: fit-content;
}

.sidebar-section {
  margin-bottom: 20px;
}

.sidebar-title {
  color: var(--text-3);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  padding: 0 8px;
}

.sidebar-item {
  width: 100%;
  border: 0;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  border-radius: var(--radius-md);
  background: transparent;
  padding: 8px 10px;
  cursor: pointer;
}

.sidebar-item:hover {
  color: var(--text-1);
  background: var(--surface-2);
}

.sidebar-item.active {
  color: var(--accent);
  border: 1px solid var(--accent-border);
  background: var(--accent-soft);
}

.sidebar-count {
  font-size: 11px;
  color: var(--text-3);
  background: var(--surface-2);
  border-radius: 999px;
  padding: 2px 8px;
}

.sidebar-item.active .sidebar-count {
  color: var(--accent);
  background: var(--accent-border);
}

.sidebar-empty {
  margin: 0;
  padding: 8px 10px;
  color: var(--text-3);
  font-size: 13px;
  line-height: 1.45;
}

.submit-banner {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  text-align: center;
  background: var(--white);
}

.submit-banner p {
  margin: 0 0 var(--space-2);
  color: var(--text-2);
  font-size: 13px;
}

.submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 1px solid var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
}

.tools-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4);
  gap: var(--space-3);
}

.tools-count,
.compare-hint {
  color: var(--text-3);
  font-size: 13px;
}

.compare-controls {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.compare-btn {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  background: var(--white);
  color: var(--text-2);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.compare-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.compare-btn.ready {
  color: var(--white);
  border-color: var(--accent);
  background: var(--accent);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: var(--space-4);
}

.tool-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--white);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  cursor: pointer;
  min-height: 244px;
}

.tool-card:hover {
  border-color: var(--accent-border);
  box-shadow: var(--shadow-md);
}

.tool-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  background: #fdfefe;
}

.card-select {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: transparent;
}

.tool-card.selected .card-select {
  color: var(--white);
  border-color: var(--accent);
  background: var(--accent);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  background: var(--surface-2);
  overflow: hidden;
}

.card-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.price-pill {
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 999px;
  padding: 3px 8px;
}

.pill-free {
  color: var(--success);
  border: 1px solid var(--success-border);
  background: var(--success-soft);
}

.pill-freemium {
  color: var(--accent);
  border: 1px solid var(--accent-border);
  background: var(--accent-soft);
}

.pill-paid {
  color: var(--warning);
  border: 1px solid var(--warning-border);
  background: var(--warning-soft);
}

.card-name {
  font-size: 16px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card-desc {
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.55;
  flex: 1;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card-meta {
  color: var(--text-3);
  font-size: 12px;
  line-height: 1.3;
  margin-top: -2px;
}

.card-tag {
  font-size: 11px;
  color: var(--text-2);
  background: var(--surface-2);
  border-radius: 999px;
  padding: 3px 8px;
}

.card-footer {
  border-top: 1px solid var(--border);
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-rating {
  color: #b45309;
  font-size: 13px;
  font-weight: 600;
}

.card-visit {
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.compare-panel {
  display: none;
  margin-top: var(--space-6);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-md);
  padding: var(--space-6);
}

.compare-panel.show {
  display: block;
}

.compare-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-5);
}

.compare-panel-header h3 {
  margin: 0;
  font-family: "Instrument Serif", serif;
  font-size: 24px;
  font-weight: 400;
}

.close-compare {
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  background: var(--surface);
  cursor: pointer;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.compare-table th,
.compare-table td {
  border: 1px solid var(--border);
  padding: 11px 12px;
}

.compare-table th {
  background: var(--surface-2);
}

.compare-table th:first-child,
.compare-table td:first-child {
  text-align: left;
  width: 130px;
}

.compare-table td:first-child {
  color: var(--text-3);
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.win-cell {
  color: var(--success);
  font-weight: 700;
}

.compare-actions {
  display: flex;
  gap: 10px;
  margin-top: var(--space-4);
}

.visit-btn {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--accent);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 10px;
  cursor: pointer;
}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.show {
  display: flex;
}

.quiz-modal {
  width: min(500px, 100%);
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 30px;
  box-shadow: 0 22px 40px rgba(0, 0, 0, 0.16);
}

.quiz-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quiz-modal-title {
  font-family: "Instrument Serif", serif;
  font-size: 24px;
}

.quiz-close {
  border: 1px solid var(--border);
  background: var(--surface);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
}

.quiz-step-label {
  margin: 4px 0 20px;
  color: var(--text-3);
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.quiz-q {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 16px;
}

.quiz-options {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

.quiz-opt {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  text-align: left;
  font: inherit;
  font-size: 13px;
  line-height: 1.45;
  padding: 12px;
  cursor: pointer;
}

.quiz-opt:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.quiz-result {
  display: none;
  text-align: center;
  padding-top: 10px;
}

.quiz-result.show {
  display: block;
}

.result-icon {
  font-size: 44px;
  margin-bottom: 12px;
}

.result-title {
  font-family: "Instrument Serif", serif;
  font-size: 26px;
  margin-bottom: 8px;
}

.result-desc {
  color: var(--text-2);
  margin-bottom: 20px;
}

.result-btn {
  border: 0;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: var(--white);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 20px;
  cursor: pointer;
}

.quiz-restart-btn {
  margin-top: 10px;
  border: 0;
  background: none;
  color: var(--text-3);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-3);
  padding: 60px 16px;
}

.empty-state .e-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.site-footer {
  margin-top: 16px;
  border-top: 1px solid var(--border);
  background: var(--white);
  padding: 24px var(--space-6);
}

.site-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  gap: var(--space-6);
  justify-content: space-between;
  align-items: center;
}

.footer-logo {
  margin: 0;
  font-family: "Instrument Serif", serif;
  font-size: 24px;
}

.footer-tagline {
  margin: 2px 0 0;
  color: var(--text-3);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.footer-links a {
  text-decoration: none;
  color: var(--text-2);
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-meta {
  max-width: 1280px;
  margin: 16px auto 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  color: var(--text-3);
  font-size: 13px;
}

.submit-tool-page {
  max-width: 820px;
  margin: 0 auto;
  padding: 72px 20px;
}

.submit-tool-intro {
  margin-bottom: 20px;
}

.submit-tool-page h1 {
  margin: 0 0 10px;
  font-family: "Instrument Serif", serif;
  font-size: clamp(36px, 6vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.submit-tool-page p {
  color: var(--text-2);
  font-size: 16px;
  margin: 0;
}

.submit-tool-page .wpforms-container {
  width: 100%;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 30px;
}

.submit-tool-page .wpforms-field {
  margin-bottom: 24px !important;
}

.submit-tool-page .wpforms-field-label {
  color: var(--text-1) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  margin-bottom: 9px !important;
}

.submit-tool-page .wpforms-field input,
.submit-tool-page .wpforms-field textarea,
.submit-tool-page .wpforms-field select {
  width: 100% !important;
  max-width: 100% !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: 12px !important;
  padding: 12px 14px !important;
  background: var(--white) !important;
  font: inherit !important;
  font-size: 15px !important;
}

.submit-tool-page .wpforms-field textarea {
  min-height: 140px !important;
}

.submit-tool-page button[type="submit"] {
  border: 0 !important;
  border-radius: 12px !important;
  background: var(--accent) !important;
  color: var(--white) !important;
  width: 100%;
  padding: 14px 22px !important;
  font: inherit;
  font-size: 15px !important;
  font-weight: 700 !important;
  cursor: pointer;
}

.submit-tool-page button[type="submit"]:hover {
  background: var(--accent-hover) !important;
}

.submit-tool-page .wpforms-confirmation-container-full {
  border-radius: 16px !important;
  border: 1px solid var(--success-border) !important;
  background: var(--success-soft) !important;
  color: var(--success) !important;
  font-size: 15px !important;
  line-height: 1.7 !important;
  padding: 20px !important;
}

.simple-home {
  max-width: 800px;
  margin: 70px auto;
  text-align: center;
  padding: 0 20px;
}

.simple-home h1 {
  margin: 0 0 12px;
  font-family: "Instrument Serif", serif;
  font-size: clamp(34px, 6vw, 48px);
  line-height: 1.1;
}

.simple-home p {
  margin: 0 0 24px;
  color: var(--text-2);
}

.simple-home-cta {
  display: inline-block;
  text-decoration: none;
  color: var(--white);
  background: var(--accent);
  border-radius: 10px;
  padding: 12px 22px;
  font-weight: 600;
}

@media (max-width: 960px) {
  .nav-inner {
    padding: 0 var(--space-4);
    gap: var(--space-3);
  }

  .filter-bar-inner,
  .page-body,
  .quiz-section,
  .site-footer {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }

  .page-body {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .sidebar {
    position: static;
    display: grid;
    gap: 10px;
  }

  .sidebar-section {
    margin: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 12px;
    background: var(--white);
  }

  .sidebar-item {
    width: auto;
    display: inline-flex;
    margin: 4px 4px 0 0;
  }
}

@media (max-width: 768px) {
  body {
    font-size: 14px;
  }

  .site-nav {
    position: sticky;
  }

  .nav-inner {
    height: auto;
    padding: 10px var(--space-3);
    flex-wrap: wrap;
  }

  .site-logo {
    font-size: 20px;
  }

  .mobile-menu-toggle {
    display: block;
    border: 0;
    background: transparent;
    font-size: 24px;
    line-height: 1;
    margin-left: auto;
    cursor: pointer;
  }

  .nav-search-wrap {
    order: 3;
    max-width: none;
    width: 100%;
  }

  .nav-links {
    display: none;
  }

  .mobile-menu {
    width: 100%;
    border-top: 1px solid var(--border);
    background: var(--white);
    padding: 8px var(--space-3) 12px;
  }

  .mobile-menu.show {
    display: flex;
    flex-direction: column;
  }

  .mobile-menu a {
    text-decoration: none;
    color: var(--text-1);
    font-weight: 500;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
  }

  .mobile-menu a:last-child {
    border-bottom: 0;
  }

  .hero {
    padding: 44px var(--space-4) 38px;
  }

  .hero-sub {
    font-size: 15px;
    margin-bottom: var(--space-6);
  }

  .hero-search-box {
    flex-direction: column;
  }

  .hero-search-btn {
    width: 100%;
  }

  .hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .hero-divider {
    display: none;
  }

  .quiz-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-4);
  }

  .quiz-cta {
    width: 100%;
  }

  .filter-bar {
    top: 124px;
    padding: 9px 0;
  }

  .sticky-search-wrap {
    order: -1;
    max-width: none;
    width: 100%;
  }

  .filter-sep {
    display: none;
  }

  .tools-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .compare-controls {
    width: 100%;
    justify-content: space-between;
  }

  .tools-grid {
    grid-template-columns: 1fr;
  }

  .compare-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .compare-actions {
    flex-direction: column;
  }

  .quiz-modal {
    padding: 22px;
  }

  .quiz-options {
    grid-template-columns: 1fr;
  }

  .site-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .submit-tool-page {
    padding: 46px 16px;
  }

  .submit-tool-page .wpforms-container {
    border-radius: 18px;
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* =========================================
   GLOBAL HEADER / NAVIGATION COMPONENT
   Reusable across all templates.
========================================= */
.aip-header {
  position: sticky;
  top: 0;
  z-index: var(--ds-z-sticky);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
  transition: background var(--ds-transition-base), box-shadow var(--ds-transition-base),
    border-color var(--ds-transition-base);
}

.aip-header.is-scrolled {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--ds-shadow-sm);
}

body.admin-bar .aip-header {
  top: 32px;
}

@media (max-width: 782px) {
  body.admin-bar .aip-header {
    top: 46px;
  }
}

.aip-header-inner {
  min-height: 76px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--ds-space-6);
}

.aip-header-left,
.aip-header-center,
.aip-header-right {
  display: flex;
  align-items: center;
}

.aip-header-center {
  justify-content: center;
}

.aip-header-right {
  justify-content: flex-end;
  gap: var(--ds-space-2);
}

.aip-site-logo {
  text-decoration: none;
  font-family: var(--ds-font-display);
  font-size: clamp(var(--ds-font-size-xl), 1.6vw, var(--ds-font-size-2xl));
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ds-color-text);
}

.aip-site-logo span {
  color: var(--ds-color-primary);
}

.aip-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: var(--ds-space-1);
}

.aip-nav-link {
  text-decoration: none;
  color: var(--ds-color-text-muted);
  border-radius: var(--ds-radius-sm);
  padding: 0.5rem 0.75rem;
  font-size: var(--ds-font-size-sm);
  font-weight: 600;
  transition: color var(--ds-transition-base), background var(--ds-transition-base);
}

.aip-nav-link:hover {
  color: var(--ds-color-text);
  background: rgba(226, 232, 240, 0.4);
}

.aip-nav-link:focus-visible {
  outline: 2px solid var(--ds-color-primary);
  outline-offset: 2px;
}

.aip-nav-link.is-active,
.aip-nav-link[aria-current="page"] {
  color: var(--ds-color-primary);
  background: var(--accent-soft);
}

.aip-search-trigger {
  min-width: 280px;
  justify-content: flex-start;
  border-radius: var(--ds-radius-pill);
  color: var(--ds-color-text-muted);
}

.aip-search-trigger-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.aip-header-cta {
  white-space: nowrap;
}

.aip-mobile-toggle {
  display: none;
}

/* Mobile menu shell */
.aip-mobile-menu[aria-hidden="true"] {
  display: none;
}

.aip-mobile-menu[aria-hidden="false"] {
  display: block;
}

.aip-mobile-overlay {
  position: fixed;
  inset: 0;
  z-index: calc(var(--ds-z-overlay) - 1);
  background: rgba(15, 23, 42, 0.5);
  opacity: 0;
  transition: opacity var(--ds-transition-base);
}

.aip-mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(88vw, 360px);
  z-index: var(--ds-z-overlay);
  background: var(--ds-color-surface);
  border-left: 1px solid var(--ds-color-border);
  box-shadow: var(--ds-shadow-lg);
  transform: translateX(100%);
  transition: transform var(--ds-transition-slow);
  display: flex;
  flex-direction: column;
}

[data-theme="dark"] .aip-header {
  background: rgba(15, 23, 42, 0.82);
  border-bottom-color: rgba(51, 65, 85, 0.65);
}

[data-theme="dark"] .aip-header.is-scrolled {
  background: rgba(15, 23, 42, 0.9);
}

.aip-mobile-menu[aria-hidden="false"] .aip-mobile-overlay {
  opacity: 1;
}

.aip-mobile-menu[aria-hidden="false"] .aip-mobile-drawer {
  transform: translateX(0);
}

.aip-mobile-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--ds-space-4);
  border-bottom: 1px solid var(--ds-color-border);
}

.aip-mobile-drawer-body {
  padding: var(--ds-space-4);
  display: grid;
  gap: var(--ds-space-6);
}

.aip-mobile-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--ds-space-2);
}

.aip-mobile-nav-list .aip-nav-link {
  display: block;
  padding: 0.75rem 0.875rem;
  border: 1px solid transparent;
}

.aip-mobile-nav-list .aip-nav-link:hover {
  border-color: var(--ds-color-border);
}

.aip-mobile-actions {
  display: grid;
  gap: var(--ds-space-3);
}

.aip-mobile-actions .btn {
  width: 100%;
  justify-content: center;
}

body.is-nav-open {
  overflow: hidden;
}

/* Tablet + desktop refinements */
@media (max-width: 1199px) {
  .aip-search-trigger {
    min-width: 220px;
  }
}

@media (max-width: 1023px) {
  .aip-header-inner {
    min-height: 70px;
    grid-template-columns: auto 1fr auto;
    gap: var(--ds-space-3);
  }

  .aip-header-center,
  .aip-header-right {
    display: none;
  }

  .aip-mobile-toggle {
    display: inline-flex;
    justify-self: end;
  }
}

@media (max-width: 767px) {
  .aip-header-inner {
    min-height: 64px;
  }

  .aip-mobile-drawer {
    width: min(90vw, 340px);
  }
}

@media (min-width: 1600px) {
  .aip-header-inner {
    max-width: var(--ds-container-2xl);
  }
}

/* =========================================
   PREMIUM HOMEPAGE HERO
   UI foundation only, no search behavior.
========================================= */
.hero-premium {
  position: relative;
  overflow: clip;
  padding-top: var(--ds-space-10);
  padding-bottom: var(--ds-space-6);
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.65) 0%, rgba(248, 250, 252, 1) 64%);
  border-bottom: 1px solid var(--ds-color-border);
}

.hero-premium-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  width: min(44vw, 460px);
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(58px);
  opacity: 0.38;
  animation: heroGlowPulse 8s ease-in-out infinite;
}

.hero-glow-a {
  top: -12%;
  left: -7%;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.32), rgba(14, 165, 233, 0));
}

.hero-glow-b {
  right: -10%;
  bottom: -20%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.28), rgba(37, 99, 235, 0));
  animation-delay: 1.8s;
}

.hero-grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.15) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at 52% 28%, black 34%, transparent 82%);
}

.hero-premium-inner {
  position: relative;
  max-width: 960px;
}

.hero-premium-content {
  position: relative;
  z-index: 2;
}

.hero-premium-badge {
  margin-bottom: var(--ds-space-4);
}

.hero-premium-title {
  margin: 0 0 var(--ds-space-3);
  font-family: var(--ds-font-display);
  font-size: clamp(1.75rem, 3.7vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--ds-color-text);
  max-width: 18ch;
}

.hero-premium-subtitle {
  margin: 0 0 var(--ds-space-2);
  max-width: 62ch;
}

.hero-premium-search-wrap {
  margin-top: var(--ds-space-4);
  margin-bottom: var(--ds-space-4);
}

.hero-premium-search {
  padding: var(--ds-space-2);
  border-radius: var(--ds-radius-xl);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--ds-space-2);
}

.hero-premium-input-shell {
  display: flex;
  align-items: center;
  gap: var(--ds-space-2);
  min-width: 0;
  border-radius: var(--ds-radius-lg);
  padding: 0 var(--ds-space-2);
}

.hero-premium-search-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  color: var(--ds-color-text-muted);
  flex-shrink: 0;
}

.hero-premium-search-input.search-input {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0.875rem 0;
  min-height: 50px;
  width: 100%;
}

.hero-premium-search-input.search-input:focus-visible {
  box-shadow: none;
}

.hero-premium-search:focus-within {
  border-color: var(--ds-color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.22), var(--ds-shadow-md);
}

.hero-premium-search-btn {
  border-radius: var(--ds-radius-lg);
  min-height: 52px;
  min-width: 132px;
  border: 0;
  box-shadow: none;
}

.hero-premium-actions {
  display: flex;
  gap: var(--ds-space-2);
  flex-wrap: wrap;
  margin-bottom: 0;
}

.hero-popular-label {
  display: inline-block;
  margin-bottom: var(--ds-space-3);
  font-size: var(--ds-font-size-sm);
  font-weight: 600;
}

.hero-popular-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ds-space-2);
}

.hero-popular-list .tag {
  cursor: pointer;
  background: rgba(255, 255, 255, 0.75);
}

.hero-trust-grid {
  gap: var(--ds-space-3);
}

.hero-trust-card {
  padding: var(--ds-space-4);
  border-radius: var(--ds-radius-md);
}

.hero-trust-value {
  font-family: var(--ds-font-display);
  font-size: clamp(1.1rem, 2.1vw, 1.45rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ds-color-text);
  margin-bottom: 0.25rem;
}

.hero-trust-label {
  margin: 0;
  color: var(--ds-color-text-muted);
  font-size: var(--ds-font-size-sm);
}

.hero-premium-visual-wrap {
  position: relative;
  z-index: 1;
}

.hero-visual {
  position: relative;
  min-height: 520px;
  border-radius: var(--ds-radius-xl);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.7));
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--ds-shadow-lg);
  overflow: hidden;
}

.hero-visual-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(37, 99, 235, 0.25);
  animation: heroSpin 20s linear infinite;
}

.hero-visual-ring-a {
  width: 340px;
  height: 340px;
  top: 14%;
  left: 14%;
}

.hero-visual-ring-b {
  width: 210px;
  height: 210px;
  bottom: 9%;
  right: 12%;
  animation-direction: reverse;
  animation-duration: 14s;
}

.hero-visual-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(0.5px);
}

.hero-visual-orb-a {
  width: 130px;
  height: 130px;
  top: 12%;
  right: 15%;
  background: radial-gradient(circle at 30% 30%, rgba(14, 165, 233, 0.7), rgba(14, 165, 233, 0.1));
  animation: heroFloat 7s ease-in-out infinite;
}

.hero-visual-orb-b {
  width: 100px;
  height: 100px;
  left: 10%;
  bottom: 14%;
  background: radial-gradient(circle at 35% 35%, rgba(59, 130, 246, 0.55), rgba(59, 130, 246, 0.08));
  animation: heroFloat 8s ease-in-out infinite reverse;
}

.hero-visual-card {
  position: absolute;
  backdrop-filter: blur(8px);
}

.hero-visual-card-main {
  top: 18%;
  left: 16%;
  width: min(72%, 320px);
  animation: heroFloat 6s ease-in-out infinite;
}

.hero-visual-card-main h3,
.hero-visual-card-side h4 {
  margin: 0 0 0.5rem;
  font-size: var(--ds-font-size-xl);
}

.hero-visual-card-main ul {
  margin: 0;
  padding-left: 1rem;
  color: var(--ds-color-text-muted);
}

.hero-visual-card-side {
  right: 12%;
  bottom: 18%;
  width: 220px;
  animation: heroFloat 6.5s ease-in-out infinite;
  animation-delay: 0.8s;
}

.hero-visual-kicker {
  margin: 0 0 0.3rem;
  color: var(--ds-color-text-muted);
  font-size: var(--ds-font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.hero-visual-dots {
  position: absolute;
  right: 10%;
  top: 20%;
  display: grid;
  grid-template-columns: repeat(2, 9px);
  gap: 10px;
}

.hero-visual-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.35);
  animation: heroFloat 5s ease-in-out infinite;
}

.hero-visual-dots span:nth-child(2) {
  animation-delay: 0.8s;
}

.hero-visual-dots span:nth-child(3) {
  animation-delay: 1.2s;
}

.hero-visual-dots span:nth-child(4) {
  animation-delay: 1.8s;
}

[data-theme="dark"] .hero-premium {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96) 0%, rgba(11, 18, 32, 1) 64%);
  border-bottom-color: rgba(51, 65, 85, 0.8);
}

[data-theme="dark"] .hero-grid-overlay {
  background-image:
    linear-gradient(rgba(100, 116, 139, 0.2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100, 116, 139, 0.2) 1px, transparent 1px);
}

[data-theme="dark"] .hero-visual {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.78));
  border-color: rgba(51, 65, 85, 0.85);
}

@keyframes heroFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes heroSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes heroGlowPulse {
  0%, 100% {
    opacity: 0.34;
  }
  50% {
    opacity: 0.48;
  }
}

@media (max-width: 1200px) {
  .hero-premium-title {
    max-width: 20ch;
  }
}

@media (max-width: 1023px) {
  .hero-premium {
    padding-top: var(--ds-space-8);
    padding-bottom: var(--ds-space-5);
  }
}

@media (max-width: 767px) {
  .hero-premium {
    padding-top: var(--ds-space-6);
    padding-bottom: var(--ds-space-4);
  }

  .hero-premium-title {
    font-size: clamp(1.5rem, 7.2vw, 2rem);
  }

  .hero-premium-search {
    padding: var(--ds-space-2);
    grid-template-columns: 1fr;
  }

  .hero-premium-input-shell {
    width: 100%;
    padding-inline: var(--ds-space-2);
  }

  .hero-premium-search-icon {
    width: 1.25rem;
    height: 1.25rem;
  }

  .hero-premium-search-btn {
    width: 100%;
    min-height: 46px;
  }

  .hero-premium-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-premium-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-premium-actions {
    margin-bottom: 0;
  }
}

@media (min-width: 1600px) {
  .hero-premium-title {
    font-size: 3.6rem;
  }
}
