/* Tool pages (/tools and /tools/<slug>, generated by scripts/tool_pages.py). They reuse the homepage's
   sections, compare slider, code card and FAQ from home.css; this file adds the page-specific parts. */

/* ------------------------------------------------------------------ hero */
.tool-hero {
  padding-block: calc(var(--header-h) + clamp(28px, 4vw, 56px)) clamp(48px, 6vw, 80px);
  text-align: center;
}
.tool-hero__inner {
  display: grid;
  justify-items: center;
  max-width: 60rem;
}
.crumbs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  row-gap: 0.25rem;
  margin-bottom: 1.5rem;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.crumbs a {
  margin-block: -10px;
  padding-block: 10px;
  color: var(--muted);
  white-space: nowrap;
}
.crumbs a:hover {
  color: var(--fg);
}
.tool-hero__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 1rem;
  border-radius: 16px;
  background: var(--fg);
  color: var(--bg);
  box-shadow: 0 14px 30px -16px rgba(24, 24, 26, 0.6);
}
.tool-hero__icon .tool-icon {
  width: 28px;
  height: 28px;
}
.tool-hero .eyebrow {
  margin: 0;
}
.tool-hero h1 {
  margin: 0.6rem 0 1rem;
  font-family: var(--display);
  font-size: clamp(2.1rem, 1.5rem + 3vw, 4rem);
  font-weight: 500;
  letter-spacing: -0.042em;
  line-height: 1.02;
  text-wrap: balance;
}
.tool-hero__line {
  display: block;
}
/* Hyphenated words in headlines and the "billed by the second" tail stay on one line. */
.nowrap {
  white-space: nowrap;
}
.tool-hero__cta {
  display: grid;
  justify-items: center;
  gap: 0.8rem;
  margin-top: 1.75rem;
}
.tool-hero__price {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
}
.tool-hero__price strong {
  color: var(--fg);
  font-weight: 600;
}
.tool-hero--index {
  padding-bottom: clamp(24px, 3vw, 40px);
}
.tool-hero--index + .toolkit {
  padding-top: clamp(24px, 3vw, 40px);
}

/* ------------------------------------------------------------------ the result */
.tool-visual {
  max-width: 64rem;
  margin: clamp(2.25rem, 5vw, 3.5rem) auto 0;
}
.tool-visual > .compare,
.tool-visual__img,
.reframe-pair,
.wave-compare {
  border-radius: 16px;
  box-shadow:
    0 2px 4px rgba(24, 24, 26, 0.04),
    0 36px 72px -36px rgba(24, 24, 26, 0.45);
}
.tool-visual__img {
  width: 100%;
  height: auto;
}
.tool-visual figcaption {
  margin-top: 0.85rem;
  color: var(--faint);
  font-size: 13px;
  text-wrap: balance;
}
.reframe-pair {
  display: grid;
  grid-template-columns: minmax(0, 16fr) auto minmax(0, 5.05fr);
  gap: clamp(10px, 2vw, 24px);
  align-items: center;
  padding: clamp(12px, 2vw, 24px);
  background: var(--night);
}
.reframe-pair img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}
.reframe-arrow {
  color: var(--night-muted);
  font-size: 1.5rem;
}
.wave-compare {
  display: grid;
  gap: 1.25rem;
  padding: clamp(1.25rem, 3vw, 2.25rem);
  background:
    radial-gradient(110% 90% at 50% 120%, rgba(224, 138, 98, 0.18), transparent 60%), var(--night);
  color: var(--night-fg);
  text-align: left;
}
.wave-row {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
}
.wave-row svg {
  width: 100%;
  height: clamp(56px, 8vw, 96px);
}
.wave-row .wave-noisy {
  opacity: 1;
}
.wave-label {
  display: grid;
  font-weight: 500;
}
.wave-label em {
  color: var(--night-muted);
  font-family: var(--mono);
  font-size: 11.5px;
  font-style: normal;
}

/* ------------------------------------------------------------------ steps, settings, uses */
.tool-columns {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(24px, 5vw, 72px);
}
.tool-columns .section-note {
  margin-top: 16px;
}
.settings-list {
  display: grid;
  margin: 0;
  border-top: 1px solid var(--line);
}
.settings-list div {
  display: grid;
  grid-template-columns: minmax(8rem, 0.4fr) 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.settings-list dt {
  font-weight: 500;
}
.settings-list dd {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}
/* Use cases: one photo per case (assets/cases), then the workflows the tool is a step of. */
.use-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2.4vw, 1.5rem);
  margin: var(--heading-gap) 0 0;
  padding: 0;
  list-style: none;
}
.use-card img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 14px;
  background: var(--tint);
}
.use-card h3 {
  margin: 1rem 0 0.35rem;
  font-family: var(--display);
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: -0.015em;
}
.use-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}
.workflows {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}
.workflows__title {
  margin: 0 0 0.9rem;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.workflow-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.workflow-item {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: center;
  gap: 1.1rem;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.workflow-item img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
}
.workflow-item__body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}
.workflow-item__case {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
  margin-bottom: 0.3rem !important;
}
.workflow-item__case a {
  color: var(--fg);
  font-weight: 500;
}
.workflow-item__case span {
  color: var(--faint);
  font-size: 13px;
}
.workflow-item__price {
  margin-top: 0.4rem !important;
  font-size: 14px;
}
.workflow-item__price strong {
  color: var(--fg);
  font-weight: 500;
}
.workflow-item__price a {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 0.2em;
  white-space: nowrap;
}
.workflow-item a:hover {
  color: var(--accent-ink);
}
.toolkit-grid--related {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 760px) {
  .use-grid {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 2.25rem;
  }
  .toolkit-grid--related {
    grid-template-columns: minmax(0, 1fr);
  }
  .workflow-item {
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: start;
  }
}

/* ------------------------------------------------------------------ price */
.tool-columns--price {
  align-items: center;
}
.price-mini {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.price-mini th,
.price-mini td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.price-mini tr:last-child th,
.price-mini tr:last-child td {
  border-bottom: 0;
}
.price-mini th {
  font-weight: 500;
}
.price-mini td {
  text-align: right;
  font-family: var(--display);
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.price-mini td span:not([data-price]) {
  color: var(--faint);
  font-family: var(--font);
  font-size: 13px;
}
.api-copy code {
  padding: 0.1em 0.35em;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  font-family: var(--mono);
  font-size: 0.9em;
}

@media (max-width: 960px) {
  .tool-columns {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 560px) {
  .settings-list div,
  .wave-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.35rem;
  }
  .reframe-pair {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
  }
  .reframe-pair .reframe-pair__out {
    width: 48%;
  }
  .reframe-arrow {
    display: none;
  }
}

/* ------------------------------------------------------------------ section heads */
/* "All tools →" beside a section heading on a light band (the homepage's dark-band link is not in a .section-head). */
.section-head > .families-link {
  color: var(--fg);
  border-bottom-color: var(--line-strong);
}
.section-head > .families-link:hover {
  border-bottom-color: var(--fg);
}
@media (min-width: 961px) {
  .section-head:has(> .families-link) {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .section-head > .families-link {
    justify-self: end;
  }
}

/* ------------------------------------------------------------------ use-case pages */
.tool-hero__link {
  margin-block: -10px;
  padding-block: 10px;
  color: var(--muted);
  font-size: 15px;
}
.tool-hero__link:hover {
  color: var(--fg);
}
.case-visual {
  max-width: 64rem;
  margin: clamp(2.25rem, 5vw, 3.5rem) auto 0;
}
.case-visual img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 20px;
  box-shadow:
    0 2px 4px rgba(24, 24, 26, 0.04),
    0 36px 72px -36px rgba(24, 24, 26, 0.45);
}
.flow {
  display: grid;
  gap: 12px;
  max-width: 60rem;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}
.flow-step {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto auto;
  gap: 18px;
  align-items: center;
  padding: 1.1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.flow-n {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 13px;
}
.flow-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--fg);
  color: var(--bg);
}
.flow-body h3 {
  margin: 0 0 0.25rem;
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: -0.015em;
}
.flow-body h3 a {
  padding-block: 8px;
}
.flow-body h3 a:hover {
  color: var(--accent-ink);
}
.flow-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}
.flow-price {
  display: grid;
  justify-items: end;
  margin: 0;
  white-space: nowrap;
}
.flow-price strong {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.flow-price > span {
  color: var(--faint);
  font-size: 12.5px;
}
.flow-go {
  min-height: 40px;
}
.flow-note {
  max-width: 60rem;
  margin: 1.25rem auto 0;
  color: var(--muted);
  text-align: center;
}
.flow-note a {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 0.2em;
}
.use-case-page .case-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 925px) {
  .use-case-page .case-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .flow-step {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px 14px;
  }
  .flow-n {
    display: none;
  }
  .flow-price {
    grid-column: 2;
    justify-items: start;
  }
  .flow-go {
    grid-column: 2;
    justify-self: start;
  }
}
