/* Tool page and builder page layouts. Mobile first, sidebar from 900px up. */

.fo-tool__layout,
.fo-builder__layout {
  padding-top: 20px;
  padding-bottom: 48px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.fo-tool__main,
.fo-builder__main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.fo-tool__head,
.fo-builder__head { display: flex; flex-direction: column; gap: 10px; }

/* Form card */
.fo-tool__form { padding: 20px 16px; }

/* Actions under the result */
.fo-tool__actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fo-tool__actions .fo-btn { padding-left: 8px; padding-right: 8px; font-size: 14px; }

.fo-tool__how { margin-top: 8px; }
.fo-tool__faq { display: flex; flex-direction: column; gap: 8px; }

/* Sidebar: hidden on phones, where its contents are printed in the main column instead */
.fo-tool__side,
.fo-builder__side { display: none; }

/* Builder offers */
.fo-offers { display: grid; grid-template-columns: 1fr; gap: 12px; }
.fo-offer { display: flex; flex-direction: column; gap: 12px; padding: 22px 20px; position: relative; }
.fo-offer--featured { border: 1.5px solid var(--teal); }
.fo-offer__badge { position: absolute; top: -11px; left: 20px; padding: 3px 9px; border-radius: 6px; background: var(--teal); color: var(--white); font-size: 12px; font-weight: 700; }
.fo-offer__name { font-weight: 700; font-size: 15px; color: var(--muted); }
.fo-offer__price { font-family: var(--font-mono); font-weight: 600; font-size: 36px; letter-spacing: -0.02em; line-height: 1; }

.fo-requires { display: flex; flex-direction: column; gap: 12px; }
.fo-requires__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.fo-requires__item { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-height: 48px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 15px; font-weight: 600; }
.fo-requires__item:last-child { border-bottom: 0; }
.fo-requires__flag { padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; }
.fo-requires__flag--required { background: var(--clay-bg); color: var(--clay-fg); }
.fo-requires__flag--optional { background: var(--field); color: var(--muted); }
.fo-requires__note { flex-basis: 100%; font-size: 13px; font-weight: 500; color: var(--muted); }
.fo-video { aspect-ratio: 16 / 9; border-radius: var(--radius-card); overflow: hidden; background: var(--ink); }
.fo-video iframe { width: 100%; height: 100%; }

@media (min-width: 900px) {
  .fo-tool__layout,
  .fo-builder__layout {
    flex-direction: row;
    align-items: flex-start;
    gap: 32px;
    padding-top: 32px;
  }
  .fo-tool__main,
  .fo-builder__main { flex: 1 1 0; gap: 24px; }
  .fo-tool__form { padding: 24px; }
  .fo-tool__actions { display: flex; }
  .fo-tool__actions .fo-btn { padding-left: 18px; padding-right: 18px; }

  .fo-tool__side,
  .fo-builder__side {
    display: flex;
    flex: 0 0 var(--side);
    width: var(--side);
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 24px;
  }
  .fo-tool__panel-mobile,
  .fo-tool__sponsored-mobile,
  .fo-tool__related-mobile { display: none; }

  /* Leaderboard below the result on desktop */
  .fo-ad--tool_below_result { align-items: center; }
  .fo-ad--tool_below_result.fo-ad--dual .fo-ad__box { width: 728px; height: 90px; }

  .fo-offers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fo-prose { font-size: 16px; }
}
