/* Tool detail page */

html {
  scroll-behavior: smooth;
  scroll-padding-top: 48px;
}

section[id] {
  scroll-margin-top: 48px;
}

/* Tool detail page */

body {
  line-height: 1.7;
  letter-spacing: .005em;
}

/* Hero
   Supports both the newer <section class="tool-hero"> structure
   and the older <div class="container hero"> structure. */
.tool-hero,
body.tool-page .hero,
.hero {
  padding: 64px 0 58px;
}

.tool-hero h1,
body.tool-page .hero h1,
.hero h1 {
  max-width: 880px;
  font-size: clamp(38px, 5vw, 62px);
  letter-spacing: -.035em;
}

.tool-hero .lead,
body.tool-page .hero .lead,
.hero .lead {
  max-width: 790px;
  margin: 0 0 28px;
}

/* Main layout */

.layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  padding-top: 8px;
  padding-bottom: 72px;
}

.toc {
  position: sticky;
  top: calc(var(--header-height) + 28px);
  background: rgba(255, 255, 255, .82);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.toc-title {
  font-weight: 800;
  margin-bottom: 10px;
}

.toc a {
  display: block;
  color: var(--muted);
  font-size: 14px;
  padding: 7px 0;
}

.toc a:hover {
  color: var(--text);
}

/* Content */

.card {
  padding: 26px;
  margin-bottom: 20px;
}

h2 {
  font-size: clamp(24px, 2.5vw, 32px);
  line-height: 1.25;
  letter-spacing: -.018em;
}

h3 {
  margin: 48px 0 8px;
  font-size: 20px;
  line-height: 1.3;
}

p {
  margin: 0 0 12px;
}

ul,
ol {
  margin: 12px 0 0;
  padding-left: 22px;
}

.notice {
  background: linear-gradient(180deg, var(--accent-soft), #fff);
  border: 1px solid rgba(53, 83, 79, .18);
  border-radius: 18px;
  padding: 18px;
  margin-top: 16px;
  color: var(--muted);
}

.warning {
  background: #fffaf4;
  border: 1px solid #f1dfc7;
  border-radius: 18px;
  padding: 16px;
  margin-top: 16px;
  color: #73532a;
}

.quote {
  background: #121417;
  color: #fff;
  border-radius: 24px;
  padding: 26px;
  margin-top: 18px;
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.35;
}

.grid-2 {
  gap: 14px;
  margin-top: 18px;
}

.mini {
  background: var(--accent-soft);
  border: 1px solid rgba(53, 83, 79, .16);
  border-radius: 16px;
  padding: 16px;
  color: var(--muted);
}

.mini strong {
  display: block;
  color: var(--text);
  margin-bottom: 4px;
}

.source-link {
  color: var(--text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.source-link:hover {
  color: var(--accent-strong);
}

/* Flow */

.flow {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
}

.flow li {
  counter-increment: step;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  color: var(--muted);
  margin: 14px 0;
  line-height: 1.7;
}

.flow li::before {
  content: counter(step);
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--accent-strong);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  line-height: 1;
  transform: translateY(.1em);
}

/* Screenshots */

.shot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.shot-card {
  margin: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.shot-card figcaption {
  order: -1;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.shot-card figcaption strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
}

.shot-card figcaption span {
  display: block;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.shot-card img {
  display: block;
  width: 100%;
  height: auto;
  background: #f8f8f8;
}

.shot-card.phone img {
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: top center;
}

.shot-card.wide {
  grid-column: span 2;
}

.shot-card.wide img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
}

.shot-card.natural img {
  height: auto;
}

/* FAQ */

details {
  border-top: 1px solid var(--line);
  padding: 16px 0;
}

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

summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--text);
}

details p {
  margin-top: 10px;
}

/* Tablet / small desktop */

@media (max-width: 920px) {
  :root {
    --site-padding: 40px;
  }

  .tool-hero,
  body.tool-page .hero,
  .hero {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .tool-hero h1,
  body.tool-page .hero h1,
  .hero h1 {
    max-width: 100%;
    font-size: clamp(40px, 8vw, 50px);
    letter-spacing: -.03em;
  }

  .tool-hero .lead,
  body.tool-page .hero .lead,
  .hero .lead {
    max-width: 100%;
  }

  .layout {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 0;
    padding-bottom: 56px;
  }

  .toc {
    display: none;
  }

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

  .shot-card.wide {
    grid-column: span 1;
  }

  .shot-card.wide img,
  .shot-card.phone img {
    aspect-ratio: auto;
    height: auto;
    object-fit: contain;
  }
}

/* Mobile */

@media (max-width: 600px) {
  :root {
    --site-padding: 24px;
  }

  .tool-hero,
  body.tool-page .hero,
  .hero {
    padding-top: 42px;
    padding-bottom: 42px;
  }

  .tool-hero h1,
  body.tool-page .hero h1,
  .hero h1 {
    font-size: 39px;
    line-height: 1.12;
    letter-spacing: -.03em;
  }

  .card {
    padding: 22px;
    border-radius: 20px;
  }

  .cta {
    gap: 10px;
  }
}

/* Small mobile */

@media (max-width: 430px) {
  :root {
    --site-padding: 22px;
  }

  .tool-hero h1,
  body.tool-page .hero h1,
  .hero h1 {
    font-size: 37px;
  }

  .card {
    padding: 20px;
  }
}

.shot-card,
.shot-card.phone,
.shot-card.wide,
.shot-card.natural {
  grid-column: auto !important;
}

.shot-card img,
.shot-card.phone img,
.shot-card.wide img,
.shot-card.natural img {
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  object-fit: initial !important;
}