:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172033;
  background: #f6f8fb;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f6f8fb 46%, #edf7f5 100%);
}

a { color: inherit; }

.tool-top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px max(18px, calc((100vw - 1120px) / 2));
  border-bottom: 1px solid rgba(17, 24, 39, 0.1);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
}

.brand {
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

nav a,
.related a {
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 8px;
  padding: 8px 10px;
  background: #ffffff;
  color: #344054;
  font-size: 0.88rem;
  font-weight: 750;
  text-decoration: none;
}

main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  display: grid;
  max-width: 860px;
  gap: 18px;
  padding: clamp(56px, 8vw, 104px) 0 42px;
}

.kicker {
  margin: 0;
  color: #0f766e;
  font-size: 0.8rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 5.3rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero p,
.panel p,
.panel li,
.faq p,
footer p {
  color: #475467;
  font-size: 1rem;
  line-height: 1.68;
}

.hero > p:not(.kicker) {
  max-width: 720px;
  font-size: 1.15rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 6px;
}

.primary,
.secondary {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 850;
  text-decoration: none;
}

.primary {
  background: #172033;
  color: #ffffff;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.16);
}

.secondary {
  border: 1px solid rgba(17, 24, 39, 0.14);
  background: #ffffff;
  color: #172033;
}

.panel-grid,
.directory-summary,
.split {
  display: grid;
  gap: 14px;
}

.panel-grid,
.directory-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 14px;
}

.directory-compare {
  display: grid;
  gap: 18px;
  margin-bottom: 14px;
  padding: 24px;
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

.directory-compare header {
  display: grid;
  gap: 12px;
  max-width: 820px;
}

.compare-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.compare-card-grid article {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 8px;
  background: #f8fafc;
}

.compare-card-grid h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
}

.compare-card-grid strong {
  color: #172033;
}

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

.panel-grid article,
.directory-summary article,
.panel,
.faq,
.related,
.category-panel,
.compare-editor-card {
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

.panel-grid article,
.directory-summary article,
.panel,
.faq,
.related,
.category-panel {
  padding: 24px;
}

.panel-grid h2,
.directory-summary h2,
.directory-compare h2,
.panel h2,
.faq h2,
.related h2,
.category-panel h2 {
  margin-bottom: 14px;
  font-size: clamp(1.25rem, 2vw, 1.8rem);
  line-height: 1.16;
  letter-spacing: 0;
}

.directory-hero {
  max-width: 940px;
}

.category-directory {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.category-panel header {
  max-width: 760px;
  margin-bottom: 18px;
}

.category-panel header p,
.directory-summary p,
.directory-compare p,
.compare-card-grid p,
.compare-editor-card span,
.compare-editor-card em,
.tool-card span {
  color: #475467;
  font-size: 0.96rem;
  line-height: 1.6;
}

.editor-compare-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.compare-editor-card {
  display: grid;
  gap: 9px;
  min-height: 246px;
  align-content: start;
  padding: 16px;
  text-decoration: none;
}

.compare-editor-card strong {
  color: #172033;
  font-size: 1.05rem;
  line-height: 1.25;
}

.compare-editor-card b {
  color: #172033;
}

.compare-editor-card em {
  font-style: normal;
  font-weight: 800;
}

.tool-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.tool-card {
  display: grid;
  gap: 8px;
  min-height: 126px;
  align-content: start;
  padding: 14px;
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 8px;
  background: #f8fafc;
  text-decoration: none;
}

.tool-card:hover,
.tool-card:focus-visible,
.compare-editor-card:hover,
.compare-editor-card:focus-visible,
nav a:hover,
nav a:focus-visible,
.related a:hover,
.related a:focus-visible {
  border-color: rgba(15, 118, 110, 0.35);
  background: #ecfdf8;
  outline: 0;
}

.tool-card strong {
  color: #172033;
  font-size: 1rem;
  line-height: 1.25;
}

.comparison-list {
  display: grid;
  gap: 14px;
  margin: 16px 0 0;
  padding: 0;
}

.comparison-list div {
  display: grid;
  gap: 7px;
  border-top: 1px solid rgba(17, 24, 39, 0.1);
  padding-top: 14px;
}

.comparison-list div:first-child {
  border-top: 0;
  padding-top: 0;
}

.comparison-list dt {
  color: #172033;
  font-weight: 850;
}

.comparison-list dd {
  margin: 0;
  color: #475467;
  font-size: 0.96rem;
  line-height: 1.58;
}

.comparison-list strong {
  color: #172033;
}

ol {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 1.25rem;
}

.faq,
.related {
  margin-top: 14px;
}

details {
  border-top: 1px solid rgba(17, 24, 39, 0.1);
  padding: 14px 0 0;
}

details:first-of-type {
  border-top: 0;
  padding-top: 0;
}

summary {
  cursor: pointer;
  font-weight: 850;
}

details p {
  padding-top: 8px;
}

.related div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

footer {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0 60px;
}

footer a {
  font-weight: 850;
  text-decoration: none;
}

@media (max-width: 780px) {
  .tool-top {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    justify-content: flex-start;
  }

  main,
  footer {
    width: min(100% - 24px, 640px);
  }

  .panel-grid,
  .directory-summary,
  .compare-card-grid,
  .editor-compare-grid,
  .tool-card-grid,
  .split {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: clamp(2.25rem, 13vw, 4rem);
  }

  .primary,
  .secondary {
    width: 100%;
  }
}
