/* ToolLions v13.21 spacing system */
:root {
  --topbar: 72px;
  --page-x: clamp(16px, 2vw, 28px);
  --page-y: clamp(22px, 2.6vw, 34px);
  --section-gap: clamp(26px, 3.2vw, 42px);
  --panel-pad: clamp(16px, 2vw, 24px);
  --card-gap: 16px;
  --field-h: 52px;
  --radius: 18px;
}

body {
  line-height: 1.5;
}

.topbar {
  height: var(--topbar);
}

.sidebar {
  top: var(--topbar);
}

.main {
  padding-top: var(--topbar);
}

.content {
  width: min(1240px, 100%);
  padding: var(--page-y) var(--page-x) 100px;
}

.breadcrumb {
  margin: 0;
  min-height: 34px;
  align-items: center;
}

.archive-hero,
.seo-landing-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 14px;
  padding: clamp(26px, 3.5vw, 42px);
  margin: 0 0 var(--section-gap);
  border-radius: 20px;
}

.archive-hero .breadcrumb,
.archive-hero .eyebrow {
  flex: 0 0 auto;
  margin-bottom: 10px;
}

.archive-hero h1,
.seo-landing-hero h1 {
  flex: 0 0 100%;
  margin: 8px 0 0;
  max-width: 980px;
  font-size: clamp(34px, 4.4vw, 58px);
  line-height: 1.08;
  letter-spacing: 0;
  text-wrap: balance;
}

.compact-hero h1 {
  font-size: clamp(32px, 3.8vw, 50px);
}

.archive-hero p,
.seo-landing-hero p {
  flex: 0 0 100%;
  margin: 0;
  max-width: 760px;
  font-size: clamp(16px, 1.35vw, 19px);
  line-height: 1.6;
  color: #c7d1e5;
  text-wrap: pretty;
}

.hero {
  min-height: auto;
  padding: clamp(30px, 4vw, 52px) 0 clamp(28px, 3vw, 40px);
  gap: clamp(20px, 2.6vw, 32px);
}

.hero h1 {
  margin: 16px 0 12px;
  max-width: 820px;
  font-size: clamp(40px, 5vw, 66px);
  line-height: 1.08;
  letter-spacing: 0;
  text-wrap: balance;
}

.hero p {
  max-width: 720px;
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.62;
}

.section-head {
  margin: var(--section-gap) 0 16px;
  align-items: center;
  gap: 12px;
}

.section-head h2 {
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.14;
  letter-spacing: 0;
  text-wrap: balance;
}

.section-head p {
  max-width: 720px;
  margin: 0;
  line-height: 1.55;
}

.compare-picker {
  flex: 0 0 100%;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
  gap: 14px;
  align-items: end;
  margin-top: 18px;
  padding: 18px;
  border-radius: 18px;
}

.compare-picker > div {
  min-width: 0;
}

.compare-picker label {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: .08em;
}

.compare-picker select {
  height: var(--field-h);
  border-radius: 14px;
  padding: 0 42px 0 16px;
  font-size: 16px;
  line-height: 1.2;
}

.compare-picker small {
  display: block;
  margin-top: 8px;
  min-height: 18px;
  font-size: 12px;
  line-height: 1.4;
}

.compare-picker button {
  height: var(--field-h);
  min-width: 180px;
  border-radius: 14px;
  padding: 0 22px;
  white-space: nowrap;
}

.comparison-grid,
.tools-grid,
.feature-grid,
.reviews-grid,
.blog-grid,
.category-grid-full,
.methodology-grid {
  gap: var(--card-gap);
}

.comparison-card,
.tool-card,
.feature-card,
.review-card,
.blog-card,
.alt-hub-card,
.alt-result-card,
.category-pill,
.category-card,
.decision-card,
.pricing-plan-card,
.procon-box,
.faq-box,
.method-card {
  border-radius: 16px;
}

.comparison-card {
  padding: 18px;
  min-height: 150px;
  align-content: start;
}

.comparison-card strong {
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.22;
  text-wrap: balance;
}

.comparison-card small {
  line-height: 1.45;
}

.search-wrap {
  height: 60px;
  max-width: 760px;
  padding: 7px;
}

.search-wrap input {
  font-size: 16px;
  font-weight: 680;
}

.search-wrap button {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
}

.filters-bar {
  top: var(--topbar);
  margin: -4px 0 18px;
  padding: 8px 0 12px;
  gap: 8px;
}

.filter-chip,
.popular-searches a,
.tool-meta span {
  white-space: nowrap;
}

.tool-card-body {
  padding: 14px;
}

.tool-head {
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: start;
  gap: 11px;
}

.tool-logo {
  width: 42px;
  height: 42px;
}

.tool-head h3 {
  font-size: 17px;
  line-height: 1.2;
  letter-spacing: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tool-head p {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.tool-head .rating {
  grid-column: 1 / -1;
  justify-self: start;
  margin-top: 2px;
}

.tool-desc {
  min-height: 0;
  margin: 12px 0;
  font-size: 13.5px;
  line-height: 1.48;
  -webkit-line-clamp: 3;
}

.mini-feature-list {
  gap: 7px;
  margin-bottom: 13px;
}

.mini-feature-list li {
  line-height: 1.38;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tool-meta {
  gap: 6px;
}

.tool-meta span {
  max-width: 100%;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.single-layout {
  gap: 22px;
}

.tool-detail-content {
  padding: var(--panel-pad);
}

.detail-title {
  gap: 14px;
  margin-bottom: 16px;
}

.detail-title h1 {
  font-size: clamp(34px, 3.5vw, 48px);
  line-height: 1.1;
  letter-spacing: 0;
}

.value-section {
  margin-top: 24px;
}

.side-panel {
  top: calc(var(--topbar) + 18px);
  padding: 18px;
}

.feature-card,
.decision-card,
.pricing-plan-card,
.procon-box,
.faq-box,
.review-card {
  padding: var(--panel-pad);
}

.feature-card {
  min-height: 0;
}

.feature-card h3,
.decision-card h2 {
  line-height: 1.2;
  letter-spacing: 0;
}

.feature-card p,
.decision-card p,
.detail-copy,
.review-card p,
.blog-card p,
.alt-hub-card span {
  line-height: 1.56;
  text-wrap: pretty;
  overflow-wrap: break-word;
}

.feature-check-grid,
.spec-grid,
.metric-grid {
  gap: 10px;
}

.feature-check-grid span {
  padding: 10px 11px;
  line-height: 1.35;
}

.finder-form {
  flex: 0 0 100%;
  max-width: 1040px;
  gap: 14px;
}

.finder-form fieldset {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
  padding: 15px;
  border-radius: 16px;
}

.finder-form label {
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.finder-form label span {
  width: 100%;
  min-height: 40px;
  justify-content: center;
  border-radius: 12px;
  padding: 9px 11px;
  line-height: 1.25;
  text-align: center;
}

.finder-form input:checked + span {
  border-color: rgba(32, 215, 255, .42);
  background: rgba(32, 215, 255, .11);
}

.finder-hero {
  align-items: flex-start;
}

.finder-hero .finder-form {
  width: 100%;
  max-width: none;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.finder-hero .finder-form fieldset {
  min-width: 0;
  align-content: start;
  margin: 0;
}

.finder-hero .finder-form fieldset:nth-of-type(1) {
  grid-column: span 12;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.finder-hero .finder-form fieldset:nth-of-type(2),
.finder-hero .finder-form fieldset:nth-of-type(3),
.finder-hero .finder-form fieldset:nth-of-type(4) {
  grid-column: span 4;
}

.finder-hero .finder-form fieldset:nth-of-type(5),
.finder-hero .finder-form fieldset:nth-of-type(6) {
  grid-column: span 6;
}

.finder-hero .finder-form .primary-btn {
  grid-column: 1 / -1;
  justify-self: start;
  min-width: 230px;
}

.best-hero {
  display: block;
  padding: clamp(24px, 3vw, 34px);
}

.best-hero > .breadcrumb {
  display: inline-flex;
  margin-bottom: 16px;
}

.best-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: clamp(18px, 2.3vw, 28px);
  align-items: start;
}

.best-hero-grid .eyebrow {
  margin-bottom: 12px;
}

.best-hero-grid h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 4.3vw, 58px);
  line-height: 1.08;
  letter-spacing: 0;
}

.best-hero-grid p {
  margin: 0;
  max-width: 760px;
  line-height: 1.6;
}

.best-hero-grid .archive-search {
  margin-top: 20px;
}

.ranking-widget {
  padding: 18px;
  border-radius: 16px;
}

.ranking-widget strong {
  margin-bottom: 10px;
  line-height: 1.25;
}

.ranking-widget ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  line-height: 1.5;
}

.seo-filter-row {
  margin-top: 0;
}

.ranking-list {
  display: grid;
  gap: 12px;
}

.ranked-row {
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  position: relative;
}

.rank-number {
  align-self: start;
  min-height: 48px;
}

.ranked-row .tool-card {
  display: grid !important;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr) !important;
  min-height: 220px;
  overflow: hidden;
}

.ranked-row .tool-shot {
  width: 100%;
  height: 100% !important;
  min-height: 220px;
  aspect-ratio: auto;
  border-radius: 0;
}

.ranked-row .tool-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.ranked-row .tool-card-body {
  min-width: 0;
  padding: clamp(18px, 2vw, 24px);
  justify-content: center;
}

.ranked-row .tool-head {
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
}

.ranked-row .tool-head .rating {
  grid-column: auto;
  justify-self: end;
  margin-top: 0;
}

.ranked-row .tool-desc {
  max-width: 68ch;
  font-size: 15px;
  line-height: 1.55;
  -webkit-line-clamp: 3;
}

.ranked-row .mini-feature-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 12px;
}

.ranked-row .mini-feature-list li {
  -webkit-line-clamp: 1;
}

.ranked-row .tool-meta {
  margin-top: 16px;
}

.seo-hub-grid {
  gap: 14px;
}

.seo-hub-card {
  min-height: 150px;
  padding: 18px;
}

.faq-grid {
  gap: 14px;
}

.faq-grid article {
  padding: 18px;
  border-radius: 16px;
}

@media (min-width: 1560px) {
  .content {
    width: min(1360px, 100%);
  }

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

@media (max-width: 1180px) {
  :root {
    --topbar: 68px;
  }

  .content {
    padding: 24px 18px 96px;
  }

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

  .compare-picker {
    grid-template-columns: 1fr 1fr;
  }

  .finder-hero .finder-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finder-hero .finder-form fieldset,
  .finder-hero .finder-form fieldset:nth-of-type(1),
  .finder-hero .finder-form fieldset:nth-of-type(2),
  .finder-hero .finder-form fieldset:nth-of-type(3),
  .finder-hero .finder-form fieldset:nth-of-type(4),
  .finder-hero .finder-form fieldset:nth-of-type(5),
  .finder-hero .finder-form fieldset:nth-of-type(6) {
    grid-column: auto;
  }

  .best-hero-grid {
    grid-template-columns: 1fr;
  }

  .ranking-widget {
    max-width: 760px;
  }

  .compare-picker button {
    grid-column: 1 / -1;
    width: 100%;
  }

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

  .single-layout {
    grid-template-columns: 1fr;
  }

  .side-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .content {
    padding: 20px 15px 92px;
  }

  .archive-hero,
  .seo-landing-hero {
    gap: 12px;
    padding: 22px 16px;
    margin-bottom: 28px;
    border-radius: 18px;
  }

  .archive-hero h1,
  .compact-hero h1,
  .detail-title h1 {
    font-size: clamp(28px, 8vw, 36px);
  }

  .archive-hero p,
  .hero p {
    font-size: 15.5px;
    line-height: 1.6;
  }

  .compare-picker {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px;
  }

  .finder-hero .finder-form {
    grid-template-columns: 1fr;
  }

  .finder-hero .finder-form .primary-btn {
    width: 100%;
    min-width: 0;
  }

  .best-hero {
    padding: 22px 16px;
  }

  .ranking-list {
    gap: 10px;
  }

  .ranked-row {
    display: block;
    grid-template-columns: 1fr;
    gap: 0;
  }

  .rank-number {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    min-height: 0;
    width: max-content;
    padding: 7px 11px;
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .28);
  }

  .ranked-row .tool-card {
    display: flex !important;
    grid-template-columns: none !important;
    flex-direction: column !important;
    min-height: 0;
  }

  .ranked-row .tool-shot {
    height: auto !important;
    min-height: 180px;
    aspect-ratio: 16 / 10;
  }

  .ranked-row .tool-card-body {
    padding: 18px;
  }

  .ranked-row .tool-head {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .ranked-row .tool-head .rating {
    grid-column: 1 / -1;
    justify-self: start;
    margin-top: 4px;
  }

  .ranked-row .mini-feature-list {
    grid-template-columns: 1fr;
  }

  .mobile-bottom-nav {
    left: 8px;
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    max-width: calc(100vw - 16px);
  }

  .content {
    padding-bottom: 150px;
  }

  .compare-picker button {
    grid-column: auto;
  }

  .category-strip,
  .tools-grid,
  .comparison-grid,
  .category-grid-full,
  .feature-grid,
  .reviews-grid,
  .blog-grid,
  .methodology-grid,
  .compare-link-grid {
    grid-template-columns: 1fr;
  }

  .filters-bar {
    margin-inline: -15px;
    padding-inline: 15px;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .finder-form fieldset {
    grid-template-columns: 1fr;
    padding: 13px;
  }
}

@media (max-width: 460px) {
  .mini-stats {
    grid-template-columns: 1fr;
  }

  .hero-actions .primary-btn,
  .hero-actions .ghost-btn,
  .visit-btn,
  .big-link {
    width: 100%;
  }
}
