:root {
  --v2-ink: #30262d;
  --v2-ink-deep: #231a20;
  --v2-muted: #6f6468;
  --v2-paper: #fffdf9;
  --v2-cream: #f7f1e9;
  --v2-coral: #e65d60;
  --v2-coral-dark: #c94750;
  --v2-coral-soft: #d98f8e;
  --v2-rose: #ecd8d2;
  --v2-line: #e1d7cf;
  --v2-line-soft: #eee6df;
  --v2-white: #ffffff;
  --v2-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --v2-sans: "Source Sans 3", "Segoe UI", Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body.ai-tools-v2 {
  min-width: 320px;
  margin: 0;
  background: var(--v2-paper);
  color: var(--v2-ink);
  font-family: var(--v2-sans);
  font-size: 17px;
  line-height: 1.65;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.ai-tools-v2 ::selection {
  color: var(--v2-ink-deep);
  background: rgba(230, 93, 96, 0.22);
}

.ai-tools-v2 em,
.ai-tools-v2 i {
  font-family: inherit;
  font-style: italic;
}

.ai-tools-v2 img {
  max-width: 100%;
  height: auto;
}

.ai-tools-v2 a:focus-visible {
  outline: 3px solid rgba(230, 93, 96, 0.34);
  outline-offset: 4px;
  border-radius: 2px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 9px 14px;
  color: var(--v2-white) !important;
  background: var(--v2-ink-deep);
  border-radius: 3px;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* Centered primary navigation */

.site-header {
  position: relative;
  z-index: 20;
  background: rgba(255, 253, 249, 0.98);
  border-top: 4px solid var(--v2-coral);
  border-bottom: 1px solid var(--v2-line);
}

.header-inner {
  display: flex;
  justify-content: center;
  width: min(100% - 40px, 1160px);
  min-height: 78px;
  margin: 0 auto;
}

#nav-wrap {
  display: flex;
  align-items: center;
}

#nav-wrap ul,
#nav-wrap li {
  margin: 0;
  padding: 0;
}

ul#nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 74px;
  list-style: none;
}

ul#nav li {
  list-style: none;
}

ul#nav li a,
ul#nav li a:visited {
  display: block;
  position: relative;
  padding: 10px 12px;
  color: var(--v2-ink);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.075em;
  line-height: 1.2;
  text-decoration: none;
  text-transform: uppercase;
}

ul#nav li a::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 3px;
  left: 12px;
  height: 2px;
  background: var(--v2-coral);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 160ms ease;
}

ul#nav li a:hover,
ul#nav li a:focus-visible,
ul#nav li a[aria-current="page"] {
  color: var(--v2-coral-dark);
}

ul#nav li a:hover::after,
ul#nav li a[aria-current="page"]::after {
  transform: scaleX(1);
}

/* Masthead */

.tools-masthead {
  color: var(--v2-white);
  background: var(--v2-ink-deep);
}

.tools-masthead-inner {
  width: min(100% - 80px, 1120px);
  margin: 0 auto;
  padding: 72px 0 58px;
}

.page-kicker {
  margin: 0 0 17px;
  color: var(--v2-coral);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1.35;
  text-transform: uppercase;
}

.masthead-copy h1 {
  margin: 0;
  color: var(--v2-white);
  font-family: var(--v2-serif);
  font-size: clamp(68px, 8vw, 104px);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.88;
}

/* Vertical tool collection */

.content-outer {
  background: var(--v2-paper);
}

#page-content {
  width: min(100% - 80px, 1120px);
  margin: 0 auto;
  padding: 42px 0 108px;
}

.ai-tools-page {
  width: 100%;
}

.tool-entry {
  margin: 0;
  border-bottom: 1px solid var(--v2-line-soft);
}

.tool-entry:last-child {
  border-bottom: 0;
}

.tool-card,
.tool-card:visited {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "image title"
    "image copy";
  column-gap: 52px;
  row-gap: 14px;
  margin: 0 -22px;
  padding: 45px 22px 50px;
  color: var(--v2-ink);
  border-radius: 3px;
  text-decoration: none;
  transition: background-color 180ms ease, transform 180ms ease;
}

.tool-card:hover,
.tool-card:focus-visible {
  color: var(--v2-ink);
  background: rgba(247, 241, 233, 0.66);
  transform: translateY(-1px);
}

.tool-card h2 {
  grid-area: title;
  position: relative;
  align-self: start;
  margin: 12px 0 0;
  padding-left: 23px;
  color: var(--v2-ink-deep);
  font-family: var(--v2-serif);
  font-size: clamp(31px, 3.35vw, 39px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.08;
  transition: color 160ms ease;
}

.tool-card h2::before {
  content: "";
  position: absolute;
  top: -5px;
  bottom: -5px;
  left: 0;
  width: 3px;
  background: var(--v2-coral-soft);
}

.tool-card:hover h2,
.tool-card:focus-visible h2 {
  color: var(--v2-coral-dark);
}

.tool-image {
  grid-area: image;
  align-self: start;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--v2-cream);
  border: 1px solid var(--v2-line);
  border-radius: 2px;
  box-shadow: 0 8px 24px rgba(47, 36, 48, 0.075);
}

.tool-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 260ms ease;
}

.tool-card:hover .tool-image img,
.tool-card:focus-visible .tool-image img {
  transform: scale(1.012);
}

.tool-copy {
  grid-area: copy;
  display: flex;
  align-self: stretch;
  flex-direction: column;
  max-width: 700px;
  padding: 0 8px 20px 0;
}

.tool-copy p {
  margin: 30px 0 0;
  color: var(--v2-muted);
  font-size: 23px;
  line-height: 1.55;
}

.tool-link {
  display: inline-block;
  align-self: flex-end;
  margin-top: auto;
  color: var(--v2-coral-dark);
  border-bottom: 1px solid rgba(201, 71, 80, 0.38);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  text-transform: lowercase;
  transition: border-color 160ms ease, color 160ms ease;
}

.tool-card:hover .tool-link,
.tool-card:focus-visible .tool-link {
  color: #a8323e;
  border-color: currentColor;
}

@media only screen and (max-width: 900px) {
  .tools-masthead-inner,
  #page-content {
    width: min(100% - 60px, 760px);
  }

  .tool-card,
  .tool-card:visited {
    grid-template-columns: 220px minmax(0, 1fr);
    grid-template-rows: auto auto;
    grid-template-areas:
      "title title"
      "image copy";
    column-gap: 34px;
    row-gap: 25px;
  }

  .tool-card h2 {
    margin-top: 0;
    padding-left: 20px;
    font-size: clamp(31px, 4.7vw, 39px);
  }

  .tool-copy {
    display: block;
    align-self: start;
    max-width: 610px;
    padding: 2px 0 0;
  }

  .tool-copy p {
    margin: 0;
    font-size: 16px;
  }

  .tool-link {
    align-self: flex-start;
    margin-top: 25px;
    font-size: 14px;
  }
}

@media only screen and (max-width: 720px) {
  .header-inner {
    width: calc(100% - 20px);
    min-height: 69px;
  }

  ul#nav {
    gap: 0;
    min-height: 65px;
  }

  ul#nav li a,
  ul#nav li a:visited {
    padding: 10px 8px;
    font-size: 12.5px;
    letter-spacing: 0.045em;
  }

  ul#nav li a::after {
    right: 8px;
    left: 8px;
  }

  .tools-masthead-inner {
    width: min(100% - 48px, 600px);
    padding: 57px 0 48px;
  }

  .masthead-copy h1 {
    font-size: clamp(60px, 18vw, 82px);
  }

  #page-content {
    width: min(100% - 48px, 600px);
    padding: 26px 0 84px;
  }

  .tool-card,
  .tool-card:visited {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    grid-template-areas:
      "title"
      "image"
      "copy";
    row-gap: 22px;
    margin: 0 -14px;
    padding: 40px 14px 43px;
  }

  .tool-card h2 {
    font-size: 31px;
  }

  .tool-image {
    justify-self: center;
    width: 100%;
  }

  .tool-copy {
    max-width: 560px;
    padding-top: 0;
  }

  .tool-copy p {
    font-size: 16px;
  }

  .tool-link {
    margin-top: 21px;
  }
}

@media only screen and (max-width: 460px) {
  .header-inner {
    width: calc(100% - 12px);
  }

  ul#nav li a,
  ul#nav li a:visited {
    padding-right: 5px;
    padding-left: 5px;
    font-size: 11.5px;
    letter-spacing: 0.015em;
  }

  ul#nav li a::after {
    right: 5px;
    left: 5px;
  }

  .tools-masthead-inner,
  #page-content {
    width: calc(100% - 36px);
  }

  .masthead-copy h1 {
    font-size: clamp(56px, 18vw, 72px);
  }

  .tool-card h2 {
    padding-left: 18px;
    font-size: 28px;
  }

  .tool-copy p {
    font-size: 15.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
