:root {
  --tools-container: 1180px;
  --tools-surface: rgba(15, 23, 42, 0.76);
  --tools-surface-strong: rgba(15, 23, 42, 0.92);
  --tools-surface-soft: rgba(15, 23, 42, 0.58);
  --tools-border: rgba(148, 163, 184, 0.18);
  --tools-border-strong: rgba(56, 189, 248, 0.32);
  --tools-shadow: 0 24px 60px rgba(2, 6, 23, 0.32);
  --tools-shadow-soft: 0 18px 36px rgba(2, 6, 23, 0.22);
  --tools-text: var(--text-strong, #f8fafc);
  --tools-muted: var(--text-muted, #cbd5e1);
  --tools-soft: var(--text-soft, #94a3b8);
  --tools-accent: #38bdf8;
  --tools-accent-strong: #14b8a6;
  --tools-accent-soft: rgba(56, 189, 248, 0.16);
}

body.tools-page {
  color: var(--tools-muted);
  background:
    radial-gradient(circle at top right, rgba(20, 184, 166, 0.14), transparent 28%),
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 26%),
    linear-gradient(180deg, #020617 0%, #08111f 44%, #020617 100%);
}

.tools-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.tools-shell main {
  flex: 1;
}

.tools-shell > .site-legal {
  margin-top: 80px;
}

.tools-container {
  width: min(var(--tools-container), calc(100% - 40px));
  margin: 0 auto;
}

.tools-hero {
  padding: 64px 0 36px;
}

.tools-hero-simple {
  padding: 76px 0 20px;
}

.tools-hero-simple-copy {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.tools-hero-simple-copy h1 {
  margin: 0;
  color: var(--tools-text);
  font-size: clamp(2.8rem, 5.2vw, 4.4rem);
  line-height: 0.98;
}

.tools-hero-simple-copy .tools-summary {
  margin: 18px auto 0;
  max-width: 56ch;
}

.tools-archive-simple {
  padding-top: 8px;
}

.tools-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 24px;
  align-items: stretch;
}

.tools-kicker,
.tools-section-kicker,
.tools-panel-label,
.tool-outline-label {
  margin: 0 0 12px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tools-accent);
}

.tools-hero-copy,
.tools-hero-rail,
.tool-card,
.tool-summary-card,
.tools-empty-state,
.tool-faq-card {
  border: 1px solid var(--tools-border);
  background: var(--tools-surface);
  box-shadow: var(--tools-shadow);
  backdrop-filter: blur(18px);
}

.tools-hero-copy,
.tools-hero-rail,
.tool-card,
.tools-empty-state {
  border-radius: 28px;
}

.tools-hero-copy {
  padding: 36px;
}

.tools-hero-copy h1,
.tools-section-heading h2,
.tool-header-copy h1,
.tool-faq-card h3,
.tool-summary-card h3,
.tools-highlight-card h2 {
  margin: 0;
  color: var(--tools-text);
}

.tools-hero-copy h1 {
  font-size: clamp(2.4rem, 4vw, 4.4rem);
  line-height: 0.96;
  max-width: 12ch;
}

.tools-summary,
.tools-section-summary,
.tools-empty-state p,
.tools-highlight-card p,
.tool-summary-card p,
.tool-deck,
.tool-prose,
.tool-faq-card p {
  color: var(--tools-muted);
}

.tools-summary {
  margin: 18px 0 0;
  max-width: 62ch;
  font-size: 1.03rem;
  line-height: 1.75;
}

.tools-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 26px;
}

.tools-stat {
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid var(--tools-border);
  background: rgba(8, 15, 30, 0.56);
}

.tools-stat strong {
  display: block;
  color: var(--tools-text);
  font-size: 1.25rem;
}

.tools-stat span {
  display: block;
  margin-top: 6px;
  color: var(--tools-soft);
}

.tools-hero-rail {
  padding: 28px;
}

.tools-highlight-list {
  display: grid;
  gap: 14px;
}

.tools-highlight-card {
  padding: 20px;
  border-radius: 20px;
  border: 1px solid var(--tools-border);
  background: rgba(8, 15, 30, 0.6);
}

.tools-highlight-card h2 {
  font-size: 1.05rem;
}

.tools-highlight-card p {
  margin: 10px 0 0;
  line-height: 1.65;
}

.tools-archive-section,
.tool-faq-section,
.tool-related-section {
  padding-top: 22px;
}

.tools-section-heading {
  margin-bottom: 22px;
}

.tools-section-summary {
  margin: 12px 0 0;
  max-width: 62ch;
  line-height: 1.7;
}

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

.tool-summary-card {
  border-radius: 24px;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.tool-summary-card-featured {
  background:
    linear-gradient(180deg, rgba(56, 189, 248, 0.09), transparent 42%),
    var(--tools-surface);
}

.tool-summary-card:hover,
.tool-summary-card:focus-within {
  transform: translateY(-3px);
  border-color: var(--tools-border-strong);
  box-shadow: 0 30px 70px rgba(2, 6, 23, 0.36);
}

.tool-summary-link {
  display: block;
  height: 100%;
  padding: 24px;
  color: inherit;
  text-decoration: none;
}

.tool-summary-meta,
.tool-eyebrow,
.tool-facts dt,
.tool-section-count,
.tool-outline-link,
.tool-card-tags span,
.tool-tag-strip span {
  color: var(--tools-soft);
}

.tool-summary-meta,
.tool-eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 14px;
  font-size: 0.88rem;
}

.tool-summary-card h3 {
  font-size: 1.25rem;
  line-height: 1.2;
}

.tool-summary-card p:last-child {
  margin: 12px 0 0;
  line-height: 1.68;
}

.tool-card-tags,
.tool-tag-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tool-card-tags {
  margin-top: 16px;
}

.tool-card-tags span,
.tool-tag-strip span {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--tools-border);
  background: rgba(8, 15, 30, 0.56);
}

.tools-empty-state {
  padding: 28px;
}

.tools-empty-state h3 {
  margin: 0;
  color: var(--tools-text);
}

.tools-empty-state p {
  margin: 12px 0 0;
  line-height: 1.7;
}

.tool-detail-main {
  padding-top: 32px;
  padding-bottom: 88px;
}

.tool-breadcrumbs {
  max-width: 980px;
  margin: 0 auto 28px;
}

.tool-breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tool-breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--tools-soft);
  font-size: 0.92rem;
}

.tool-breadcrumbs li + li::before {
  content: "›";
  color: rgba(148, 163, 184, 0.52);
}

.tool-breadcrumbs a {
  color: inherit;
  text-decoration: none;
}

.tool-breadcrumbs a:hover,
.tool-breadcrumbs a:focus-visible {
  color: var(--tools-text);
}

.tool-hero {
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
}

.tool-hero h1 {
  margin: 0;
  color: var(--tools-text);
  font-size: clamp(3rem, 6vw, 5rem);
  line-height: 0.94;
  letter-spacing: -0.04em;
}

.tool-deck {
  margin: 18px auto 0;
  max-width: 860px;
  color: var(--tools-muted);
  font-size: clamp(1.05rem, 1.9vw, 1.3rem);
  line-height: 1.7;
}

.tool-hero-media {
  max-width: 980px;
  margin: 36px auto 0;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--tools-border);
  background: rgba(8, 15, 30, 0.58);
  box-shadow: var(--tools-shadow-soft);
}

.tool-hero-media img {
  display: block;
  width: 100%;
  height: auto;
}

.tool-live-region {
  max-width: 980px;
  margin: 42px auto 0;
}

.tool-support-section {
  padding-top: 76px;
}

.tool-support-section .tools-section-heading {
  max-width: 760px;
  margin: 0 auto 24px;
  text-align: center;
}

.tool-related-section .tools-section-heading {
  max-width: 100%;
}

.tool-related-heading {
  margin-bottom: 18px;
}

.tool-related-arrow {
  border-radius: 18px;
  border: 1px solid var(--tools-border);
  background: rgba(8, 15, 30, 0.56);
  color: var(--tools-text);
  font-size: 1.85rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, opacity 180ms ease, background-color 180ms ease;
}

.tool-related-arrow:hover,
.tool-related-arrow:focus-visible {
  transform: translateY(-2px);
  border-color: var(--tools-border-strong);
  background: rgba(8, 15, 30, 0.72);
}

.tool-related-arrow:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.tool-carousel-shell {
  position: relative;
}

.tool-carousel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, calc((100% - 36px) / 3));
  gap: 18px;
  overflow-x: auto;
  padding: 0 66px 8px;
  scrollbar-width: thin;
  scroll-snap-type: x mandatory;
}

.tool-carousel-card {
  scroll-snap-align: start;
}

.tool-related-arrow-side {
  position: absolute;
  top: 0;
  bottom: 8px;
  width: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.tool-related-arrow-left {
  left: 0;
}

.tool-related-arrow-right {
  right: 0;
}

.tool-prose {
  font-size: 1.03rem;
  line-height: 1.82;
}

.tool-prose > *:first-child {
  margin-top: 0;
}

.tool-prose h2,
.tool-prose h3 {
  color: var(--tools-text);
  line-height: 1.14;
}

.tool-prose h2 {
  margin-top: 2.4em;
  margin-bottom: 0.7em;
  font-size: clamp(1.6rem, 2.6vw, 2.25rem);
}

.tool-prose h3 {
  margin-top: 1.7em;
  margin-bottom: 0.55em;
  font-size: 1.22rem;
}

.tool-prose p,
.tool-prose ul,
.tool-prose ol,
.tool-prose blockquote {
  margin: 0 0 1.1em;
}

.tool-prose a {
  color: var(--tools-accent);
}

.tool-prose ul,
.tool-prose ol {
  padding-left: 1.3em;
}

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

.tool-prose blockquote {
  padding: 18px 20px;
  border-left: 3px solid var(--tools-accent);
  background: rgba(8, 15, 30, 0.56);
  border-radius: 0 18px 18px 0;
}

.tool-prose code {
  padding: 0.15em 0.4em;
  border-radius: 0.45em;
  background: rgba(8, 15, 30, 0.7);
}

.tool-faq-card {
  padding: 24px;
  border-radius: 22px;
}

.tool-faq-card p {
  margin: 12px 0 0;
  line-height: 1.72;
}

.embed-card {
  margin: 1.5em 0;
}

.embed-shell {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--tools-border);
  box-shadow: var(--tools-shadow-soft);
}

.embed-shell iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 1024px) {
  .tools-hero-grid,
  .tool-grid,
  .tool-faq-list {
    grid-template-columns: 1fr;
  }

  .tool-carousel {
    grid-auto-columns: minmax(280px, calc((100% - 18px) / 2));
    padding-inline: 58px;
  }
}

@media (max-width: 720px) {
  .tools-container {
    width: min(var(--tools-container), calc(100% - 28px));
  }

  .tools-hero,
  .tool-detail-main {
    padding-top: 24px;
  }

  .tools-hero-simple {
    padding-top: 40px;
    padding-bottom: 12px;
  }

  .tools-hero-copy,
  .tools-hero-rail,
  .tools-empty-state {
    padding: 22px;
    border-radius: 22px;
  }

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

  .tool-breadcrumbs {
    margin-bottom: 22px;
  }

  .tool-live-region {
    margin-top: 28px;
  }

  .tool-support-section {
    padding-top: 56px;
  }

  .tool-carousel {
    grid-auto-columns: minmax(260px, 88%);
    padding-inline: 48px;
  }

  .tool-related-arrow-side {
    width: 38px;
    font-size: 1.45rem;
    border-radius: 14px;
  }
}
