/* =====================================================================
   PinBoostr — the research tools on the forest look: Keyword Tool,
   Trend Finder and What to Pin This Week (page-keyword-tool.php,
   page-trend-finder.php, page-trending-topics-this-week.php).
   Tokens, masthead, sections, FAQ and CTA come from forest.css; .fr- is
   only what these tool UIs and their content sections add. Loaded from
   inc/free-tools.php on those three pages only.
   ===================================================================== */

.fr .fo-tool { scroll-margin-top: 24px; }
.fr button { font-family: var(--font); }

/* ── Tool head + search ─────────────────────────────────────────────── */

.fr-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 20px; }
.fr-head h2 { font-size: 19px; font-weight: 750; letter-spacing: -.02em; }
.fr-head p { margin-top: 4px; font-size: 14.5px; line-height: 1.6; color: var(--mut); }

.fr-form { display: grid; gap: 9px; }
.fr-form > label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.fr-search { display: grid; gap: 10px; }
@media (min-width: 640px) { .fr-search { grid-template-columns: minmax(0, 1fr) auto; } }
.fr-field { position: relative; }
.fr-field i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-size: 17px; color: var(--rose); pointer-events: none; }
.fr-field .fo-input { height: 54px; padding-left: 44px; font-size: 16.5px; -webkit-appearance: none; appearance: none; }
.fr-search .fo-btn { min-height: 54px; padding: 0 26px; }

.fr-seeds { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px !important; font-size: 13.5px; color: var(--mut); }
.fr-seeds > span { margin-right: 2px; }
.fr-seed { padding: 6px 12px; border: 1px solid var(--line); border-radius: 99px; background: #fff; color: var(--ink-2); font-size: 13px; font-weight: 500; cursor: pointer; transition: border-color .15s ease, color .15s ease; }
.fr-seed:hover { border-color: var(--green-2); color: var(--green); }
.fr-fine { margin-top: 14px !important; font-size: 13px; line-height: 1.6; color: var(--mut); }

/* Niche chips: wrap on wide screens, one swipeable row on phones. */
.fr-niches { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
@media (max-width: 639px) {
  .fr-niches { flex-wrap: nowrap; overflow-x: auto; margin: 22px -24px 0; padding: 0 24px 6px; scrollbar-width: none; }
  .fr-niches::-webkit-scrollbar { display: none; }
}
.fr-niche { display: inline-flex; flex: none; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink-2); font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: border-color .15s ease, background-color .15s ease, color .15s ease; }
.fr-niche i { font-size: 12px; color: var(--mut-2); }
.fr-niche:hover { border-color: #d0d0d8; color: var(--ink); }
.fr-niche[aria-pressed="true"] { border-color: #bfe3cb; background: var(--mint); color: var(--green); }
.fr-niche[aria-pressed="true"] i { color: var(--green); }

/* ── Results area ───────────────────────────────────────────────────── */

.fr-out { margin-top: 28px; padding-top: 26px; border-top: 1px solid var(--line-2); }
.fr-out-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 16px; }
.fr-out-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; min-width: 0; }
.fr-out-head h2 { font-size: 17px; font-weight: 700; letter-spacing: -.015em; overflow-wrap: anywhere; }
.fr-meta { font-size: 13px; color: var(--mut); }
.fr-pill { display: inline-flex; padding: 2px 9px; border-radius: 7px; background: var(--mint); color: var(--green); font-size: 12px; font-weight: 650; white-space: nowrap; }
.fr-pill.is-plain { background: var(--line-2); color: var(--mut); }
.fr-sub { margin-bottom: 12px !important; font-size: 13px; font-weight: 650; color: var(--green); }

.fr-state { display: grid; justify-items: center; gap: 6px; padding: 40px 16px 28px; text-align: center; }
.fr-state strong { font-size: 17px; font-weight: 700; letter-spacing: -.015em; }
.fr-state p { max-width: 28rem; font-size: 14.5px; line-height: 1.65; color: var(--mut); }
.fr-state-ico { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 8px; border-radius: 12px; background: var(--mint); color: var(--green); font-size: 17px; }
.fr-state-ico.is-error { background: var(--tint); color: var(--rose-dk); }
.fr-spin { width: 30px; height: 30px; margin-bottom: 8px; border: 3px solid var(--line); border-top-color: var(--green-2); border-radius: 50%; animation: fr-spin .8s linear infinite; }
@keyframes fr-spin { to { transform: rotate(360deg); } }

/* A calm row of numbers: hairline dividers, no boxes inside boxes. */
.fr-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--line-2); overflow: hidden; }
.fr-stats.is-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 22px; }
@media (min-width: 640px) { .fr-stats.is-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.fr-stats > div { padding: 14px 18px; background: #fff; }
.fr-stats dt { font-size: 13px; font-weight: 500; color: var(--mut); }
.fr-stats dd { margin: 2px 0 0; font-size: 24px; font-weight: 750; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
@media (max-width: 639px) {
  .fr-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fr-stats:not(.is-4) > div:last-child { grid-column: 1 / -1; }
  .fr-stats > div { padding: 12px 14px; }
  .fr-stats dt { font-size: 12.5px; }
  .fr-stats dd { font-size: 19px; }
}

/* Tags: one quiet style, a coloured dot says which kind. */
.fr-tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink-2); font-size: 12.5px; font-weight: 600; line-height: 1.4; white-space: nowrap; }
.fr-tag::before, .fr-dot { content: ""; display: inline-block; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--dot, var(--mut-2)); }
.fr-tag.is-niche { background: var(--soft); border-color: var(--line-2); color: var(--mut); }
.fr-tag.is-niche::before { display: none; }
.fr-tag.is-niche i { font-size: 11px; color: var(--mut-2); }
[data-k="Inspiration"] { --dot: #f43f5e; }
[data-k="Planning"] { --dot: #6366f1; }
[data-k="How-to"] { --dot: #0ea5e9; }
[data-k="Shopping"] { --dot: var(--green-2); }
[data-k="Comparison"] { --dot: #f59e0b; }
[data-k="Pin now"] { --dot: var(--rose); }
[data-k="Plan ahead"] { --dot: #f59e0b; }
[data-k="Evergreen"] { --dot: var(--green-2); }

/* ── Keyword table ──────────────────────────────────────────────────── */

.fr-sheet { margin-top: 16px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.fr-sheet .fr-out-head { margin: 0; padding: 14px 16px 14px 18px; border-bottom: 1px solid var(--line-2); }
.fr-scroll { overflow-x: auto; }
.fr-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.fr-table th { padding: 11px 16px; background: var(--soft); text-align: left; font-size: 13px; font-weight: 600; color: var(--mut); white-space: nowrap; }
.fr-table td { padding: 14px 16px; border-top: 1px solid var(--line-2); vertical-align: middle; }
.fr-table th:first-child, .fr-table td:first-child { padding-left: 18px; }
.fr-table tbody tr { transition: background-color .15s ease; }
.fr-table tbody tr:hover { background: #fcfcfd; }
.fr-table .fr-r { text-align: right; }
.fr-kw { font-weight: 650; color: var(--ink); overflow-wrap: anywhere; }
.fr-angle { color: var(--mut); line-height: 1.55; }
.fr-kw + .fr-angle { margin-top: 3px; font-size: 13px; }
.fr-lg { display: none; }
@media (min-width: 1024px) { .fr-lg { display: table-cell; } .fr-sm { display: none; } }
.fr-copy { gap: 6px; white-space: nowrap; }
/* Phones: each keyword becomes a stacked row (keyword, angle, intent) with the copy button beside it. */
@media (max-width: 639px) {
  .fr-copy-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .fr-copy { width: 36px; padding: 0; }
  .fr-table thead { display: none; }
  .fr-table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; padding: 14px 16px; }
  .fr-table tbody tr + tr { border-top: 1px solid var(--line-2); }
  .fr-table td { display: block; padding: 0 !important; border: 0; }
  .fr-table td.fr-lg { display: none; }
  .fr-table .fr-int { grid-column: 1; margin-top: 8px; }
  .fr-table td.fr-r { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
}
.fr-note { padding: 12px 18px; border-top: 1px solid var(--line-2); background: var(--soft); font-size: 13px; line-height: 1.6; color: var(--mut); }

/* ── Topic ideas ────────────────────────────────────────────────────── */

.fr-ideas { display: grid; gap: 12px; }
@media (min-width: 760px) { .fr-ideas { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fr-idea { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: #fff; transition: border-color .15s ease, box-shadow .2s ease; animation: fr-in .4s ease backwards; }
.fr-idea:hover { border-color: #d9d9e1; box-shadow: 0 12px 26px -18px rgba(16, 16, 28, .25); }
@keyframes fr-in { from { opacity: 0; transform: translateY(6px); } }
.fr-rank { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--soft); color: var(--mut); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fr-idea-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-height: 30px; }
.fr-topic { margin-right: 2px !important; font-size: 15.5px; font-weight: 700; line-height: 1.4; letter-spacing: -.01em; color: var(--ink); }
.fr-why { margin-top: 5px !important; font-size: 14px; line-height: 1.6; color: var(--mut); }
.fr-hint { margin-top: 7px !important; font-size: 13px; line-height: 1.55; color: var(--ink-2); }
.fr-hint i, .fr-peak i { margin-right: 4px; font-size: 11.5px; color: var(--green); }
.fr-peak { margin-top: 8px !important; font-size: 13px; color: var(--mut); }
.fr-peak strong { font-weight: 650; color: var(--ink); }

/* Top picks: three soft cards above the full list. */
.fr-picks { display: grid; gap: 12px; margin-bottom: 30px; }
@media (min-width: 760px) { .fr-picks { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.fr-pick { position: relative; display: grid; gap: 10px; align-content: start; padding: 18px; border: 1px solid #f1e6d6; border-radius: 16px; background: var(--cream); animation: fr-in .4s ease backwards; }
.fr-pick-n { position: absolute; top: 16px; right: 18px; font-size: 13px; font-weight: 700; color: var(--rose); font-variant-numeric: tabular-nums; }
.fr-pick .fr-tag.is-niche { justify-self: start; background: #fff; }
.fr-pick .fr-topic { padding-right: 28px; font-size: 16px; }
.fr-pick-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.fr-pick-foot strong { font-size: 13.5px; font-weight: 650; color: var(--ink-2); }

/* A quiet next step under the results. */
.fr-nudge { display: grid; gap: 14px; margin-top: 22px; padding: 18px 20px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--soft); }
@media (min-width: 760px) { .fr-nudge { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; } }
.fr-nudge strong { display: block; font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.fr-nudge p { margin-top: 3px !important; font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.fr-nudge .fo-btn { justify-self: start; }

/* ── Content sections ───────────────────────────────────────────────── */

.fr-lede { max-width: 40rem; margin-top: 14px !important; font-size: 16.5px; line-height: 1.7; color: var(--mut); }
.fr-split-side .fr-lede { font-size: 16px; }
.fr-split-side .fo-btn { margin-top: 26px; }

.fr-feats { display: grid; gap: 30px 32px; margin-top: 40px !important; padding: 0; list-style: none; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.fr-feats li { padding-top: 20px; border-top: 1px solid var(--line); }
.fr-feats i { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--mint); color: var(--green); font-size: 15px; }
.fr-feats h3 { margin-top: 14px; font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; }
.fr-feats p { margin-top: 6px; font-size: 14.5px; line-height: 1.65; color: var(--mut); }

.fr-steps-after { margin-top: 26px; }
.fr-steps-after i, .fr-split-side .fo-btn i { font-size: 12px; }

.fr-prose h3 { margin-top: 12px; font-size: 17.5px; font-weight: 700; letter-spacing: -.015em; color: var(--ink); }
.fr-prose strong { font-weight: 650; color: var(--ink); }

.fo-rows .fr-dot { margin-top: 8px; }
.fr-vs strong { min-width: 0; }
.fr-vs b { font-weight: 600; color: var(--ink-2); }

.fr-sec-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; }
.fr-link { font-size: 14.5px; font-weight: 600; color: var(--green); text-decoration: none; white-space: nowrap; }
.fr-link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .fr-idea, .fr-pick { animation: none; }
  .fr-spin { animation-duration: 2s; }
}
