/* ═══════════════════════════════════════════════════════════════════════
   Marketing page styling for the free tools.

   Everything is scoped under .pb-page so a WordPress theme cannot leak
   into it and it cannot leak back out. Loaded once from /tools/page.css
   and shared by every tool page, so restyling all of them is this file.

   Matches the campaign builder: Inter, indigo #4C3FE1, soft shadows,
   generous whitespace. Somebody who uses a tool here and then signs up
   should not feel like they changed websites.
   ═══════════════════════════════════════════════════════════════════════ */

/* Inter, from our origin rather than Google's. These pages are where an
   anonymous EU visitor arrives before any consent banner exists, and an
   @import from fonts.googleapis.com would hand Google their IP address at
   that moment. One variable file covers every weight below, including the
   550 and 650 that a static family would have to fake.

   The family is named "Inter" rather than "Inter Variable" as it is in the
   app, so that the embedded widgets, which declare font-family:Inter and
   know nothing about this file, pick it up without changes.

   Paths are relative to this stylesheet, so they resolve against
   app.plainbuy.io/tools/ no matter which domain the page is on. The
   server sends Access-Control-Allow-Origin for them; without that header
   the browser fetches the font and then throws it away. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("./fonts/inter-latin-v1.woff2") format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,
    U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("./fonts/inter-latin-ext-v1.woff2") format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,
    U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,
    U+2113,U+2C60-2C7F,U+A720-A7FF;
}

.pb-page {
  --pb-ink: #17171a;
  --pb-mut: #6b6b76;
  --pb-soft: #8a8a94;
  --pb-line: #e6e6ec;
  --pb-brand: #4C3FE1;
  --pb-tint: #f4f3ff;
  --pb-bg: #fafafc;

  box-sizing: border-box;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px 72px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--pb-ink);
  -webkit-font-smoothing: antialiased;
}
.pb-page *, .pb-page *::before, .pb-page *::after { box-sizing: inherit; }

/* ── type ─────────────────────────────────────────────────────────── */
.pb-page h1 {
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 650;
  letter-spacing: -.028em;
  line-height: 1.1;
  margin: 56px 0 14px;
}
.pb-page h2 {
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -.016em;
  margin: 52px 0 14px;
}
.pb-page h3 {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -.01em;
  margin: 28px 0 8px;
}
.pb-page p { margin: 0 0 16px; }
.pb-page .pb-lede {
  font-size: 19px;
  line-height: 1.55;
  color: var(--pb-mut);
  margin-bottom: 36px;
  max-width: 620px;
}
.pb-page strong { font-weight: 650; }
.pb-page a { color: var(--pb-brand); text-decoration: none; font-weight: 550; }
.pb-page a:hover { text-decoration: underline; }
.pb-page code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .89em;
  background: #f1f1f5;
  padding: 2px 6px;
  border-radius: 5px;
}
.pb-page hr { border: 0; border-top: 1px solid var(--pb-line); margin: 48px 0 24px; }
/* em is ordinary emphasis in a sentence and has to look like it. This
   rule used to grey it out and shrink it, because it was written for the
   small print under the rule at the end of a page -- which made the one
   emphasised word in a paragraph render as a caption. The footnote is
   styled by where it sits instead. */
.pb-page em { font-style: italic; }
.pb-page hr + p { color: var(--pb-soft); font-size: 14px; }
.pb-page hr + p em { font-style: normal; }

/* ── lists ────────────────────────────────────────────────────────── */
.pb-page ul, .pb-page ol { margin: 0 0 16px; padding-left: 22px; }
.pb-page li { margin-bottom: 9px; }
.pb-page li::marker { color: var(--pb-soft); }

/* ── the tool itself, given room to breathe ───────────────────────── */
.pb-tool {
  background: #fff;
  border: 1px solid var(--pb-line);
  border-radius: 18px;
  padding: 30px;
  margin: 0 0 44px;
  box-shadow: 0 1px 2px rgba(16,16,32,.04), 0 16px 40px -18px rgba(16,16,32,.14);
}

/* ── tables ───────────────────────────────────────────────────────── */
.pb-page table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 20px;
  font-size: 15px;
}
.pb-page th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--pb-soft);
  padding: 0 14px 10px 0;
  border-bottom: 1px solid var(--pb-line);
}
.pb-page td {
  padding: 13px 14px 13px 0;
  border-bottom: 1px solid var(--pb-line);
  vertical-align: top;
  color: var(--pb-mut);
}
.pb-page td:first-child { color: var(--pb-ink); font-weight: 550; white-space: nowrap; }
.pb-page tr:last-child td { border-bottom: 0; }

/* ── callout, for the one thing per page worth stopping at ────────── */
.pb-note {
  background: var(--pb-tint);
  border-radius: 13px;
  padding: 18px 20px;
  margin: 0 0 20px;
  font-size: 15.5px;
}
.pb-note p:last-child { margin-bottom: 0; }

/* ── home page ────────────────────────────────────────────────────────
   Only used by the front page, but it lives here so there is one
   stylesheet for the whole marketing site and the home page cannot
   drift away from the tool pages the way the app once drifted away
   from the builder. */
.pb-hero { padding: 64px 0 8px; }
.pb-hero h1 { margin-top: 0; max-width: 16ch; }
.pb-hero .pb-lede { font-size: 20px; max-width: 48ch; }
.pb-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 28px 0 0; }
.pb-btn.ghost {
  background: #fff;
  color: var(--pb-ink) !important;
  border: 1px solid var(--pb-line);
}
.pb-btn.ghost:hover { background: var(--pb-bg); border-color: #d6d6de; }
/* Scoped under .pb-page on purpose. A bare .pb-micro is (0,1,0) and
   loses to `.pb-page p` at (0,1,1), so the margin silently did nothing
   and this sat flush against the buttons above it. Any class meant for
   a <p> in here has to be scoped the same way, which is why .pb-lede is
   too. test/css.test.mjs checks the rest. */
.pb-page .pb-micro { font-size: 13.5px; color: var(--pb-soft); margin: 20px 0 0; }

.pb-grid { display: grid; gap: 14px; margin: 0 0 20px; }
@media (min-width: 620px) { .pb-grid.two { grid-template-columns: 1fr 1fr; } }
.pb-card {
  background: #fff;
  border: 1px solid var(--pb-line);
  border-radius: 14px;
  padding: 20px 22px;
}
.pb-card h3 { margin: 0 0 6px; }
.pb-card p { margin: 0; font-size: 15px; color: var(--pb-mut); }
.pb-card .pb-tag {
  display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--pb-brand); margin-bottom: 9px;
}

/* numbered steps, counter-driven so the markup stays a plain list */
.pb-steps { counter-reset: pb-step; list-style: none; padding: 0; margin: 0 0 20px; }
.pb-steps li {
  counter-increment: pb-step;
  position: relative;
  padding: 0 0 0 46px;
  margin-bottom: 22px;
}
.pb-steps li::before {
  content: counter(pb-step);
  position: absolute; left: 0; top: -2px;
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--pb-tint); color: var(--pb-brand);
  font-size: 14px; font-weight: 700;
}
.pb-steps strong { display: block; margin-bottom: 3px; }
.pb-steps span { color: var(--pb-mut); font-size: 15.5px; }

/* ── closing call to action ───────────────────────────────────────── */
.pb-cta {
  background: var(--pb-bg);
  border: 1px solid var(--pb-line);
  border-radius: 16px;
  padding: 28px 30px;
  margin-top: 52px;
  text-align: center;
}
.pb-cta h2 { margin: 0 0 8px; font-size: 20px; }
.pb-cta p { color: var(--pb-mut); font-size: 15.5px; margin-bottom: 20px; }
.pb-btn {
  display: inline-block;
  background: var(--pb-brand);
  color: #fff !important;
  font-size: 15.5px;
  font-weight: 600;
  padding: 13px 26px;
  border-radius: 11px;
  text-decoration: none !important;
}
.pb-btn:hover { background: #4034c4; }

@media (max-width: 600px) {
  .pb-page { font-size: 16px; padding-bottom: 56px; }
  .pb-page h1 { margin-top: 36px; }
  .pb-page h2 { margin-top: 40px; }
  .pb-tool { padding: 20px 16px; border-radius: 14px; }
  .pb-page th, .pb-page td { padding-right: 8px; }
}
