/* FlyForms — the home page's template cards (tplhome.py).
   Frameless (see the block at the end): a rounded grey picture box with the form as a floating card;
   below it, on the page, the template's icon and name and its description.
   The sheet is sized from the thumbnail's width (cqw), so it shrinks as one piece on small screens. */
.tpx .tpx-grid {
  margin-top: 40px; list-style: none; padding: 0;
  display: grid; gap: 24px; grid-template-columns: 1fr;
}
@media (min-width: 640px) { .tpx .tpx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .tpx .tpx-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tpx .tpx-item[hidden] { display: none; }

.tpx .tpx-card {
  display: flex; flex-direction: column; width: 100%; height: 100%;
  text-align: start; color: #111114; cursor: pointer;
  background: #fff; border: 1px solid #e2e2e5; border-radius: 8px; overflow: hidden;
  box-shadow: 0 1px 3px rgb(0 0 0 / .05);
  transition: border-color .3s ease;
}
.tpx .tpx-card:hover { border-color: #cbcbd0; }
.tpx .tpx-card:focus-visible { outline: 2px solid var(--wh-accent, #7147eb); outline-offset: 3px; }

/* Thumbnail and the form sheet */
.tpx .tpx-thumb {
  display: block; position: relative; aspect-ratio: 470 / 258;
  background: #f3f3f4; overflow: hidden; container-type: inline-size;
}
.tpx .tpx-paper {
  position: absolute; left: 21%; right: 21%; top: 12%; bottom: 0;
  display: block; background: #fff; color: #111114;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-size: 2.2cqw; line-height: 1.2;
  padding: 2.6em 2.8em 0; overflow: hidden;
  transition: transform .45s cubic-bezier(.2, .7, .2, 1);
}
.tpx .tpx-card:hover .tpx-paper { transform: translateY(-3%); }

.tpx-paper > span { display: block; }
.tpx .pf-title { font-weight: 700; font-size: 1.2em; letter-spacing: -.01em; margin-bottom: 1.2em; }
.tpx .pf-text { font-size: .58em; line-height: 1.6; color: #3b3b40; margin: -.9em 0 1.6em; max-width: 34em; }
.tpx .pf-hl { background: #ddd3ff; color: inherit; padding: 0 .15em; }
.tpx .pf-label { font-weight: 700; font-size: .6em; margin: 1.5em 0 .8em; }
.tpx .pf-mini { font-size: .42em; text-transform: uppercase; letter-spacing: .04em; color: #9d9da3; margin: .9em 0 .5em; }
.tpx .pf-in {
  position: relative; height: 3.3em; line-height: 3.2em; margin-bottom: 1em; padding: 0 1em;
  font-size: .52em; color: #b4b4ba; white-space: nowrap; overflow: visible;
  border: 1px solid #d5d5da; border-radius: .5em;
}
.tpx .pf-in::after {   /* the small "required" mark */
  content: ""; position: absolute; right: -.45em; top: -.45em;
  width: .45em; height: .45em; border-radius: 50%; background: #2b2b30;
}
.tpx .pf-area { height: 6.2em; line-height: 2.6em; }
.tpx .pf-area::after { display: none; }
.tpx .pf-row { display: grid; grid-template-columns: 1fr 1fr; column-gap: .55em; }
.tpx .pf-drop {
  font-size: .52em; height: 4em; line-height: 3.8em; text-align: center; color: #9d9da3;
  border: 1px dashed #c9c9cf; border-radius: .5em; margin-bottom: .4em;
}
.tpx .pf-btn {
  display: inline-block; margin-top: 1em;
  font-size: .52em; font-weight: 700; color: #fff; background: #111114;
  padding: .6em 1em; border-radius: .45em;
}
.tpx .pf-stars { display: flex; gap: .25em; color: #a3a3a9; }
.tpx .pf-stars svg { width: 1.15em; height: 1.15em; }
.tpx .pf-chips { display: flex; flex-wrap: wrap; gap: .4em; }
.tpx .pf-chip {
  font-size: .52em; padding: .5em 1.1em; border-radius: 999px;
  border: 1px solid #d5d5da; color: #55555b;
}
.tpx .pf-chip:first-child { background: #111114; border-color: #111114; color: #fff; }
.tpx .pf-radios { display: grid; gap: .45em; }
.tpx .pf-radio { font-size: .52em; color: #55555b; display: flex; align-items: center; gap: .7em; }
.tpx .pf-radio::before {
  content: ""; width: 1.1em; height: 1.1em; border-radius: 50%; border: 1px solid #c3c3c9; flex: none;
}
.tpx .pf-radio:nth-child(2)::before { border: .35em solid #111114; }

/* Icon and name, then the description */
.tpx .tpx-body { display: block; padding: 22px 24px 24px; border-top: 1px solid #ececef; }
.tpx .tpx-head { display: flex; align-items: center; gap: 12px; }
.tpx .tpx-ico {
  display: grid; place-items: center; flex: none;
  width: 36px; height: 36px; border-radius: 10px;
  background: #f1eefe; color: var(--wh-accent, #7147eb);
}
.tpx .tpx-ico .tpx-icon { width: 19px; height: 19px; }
.tpx .tpx-name {
  display: block; min-width: 0; font-family: var(--wh-display); font-size: 19px; font-weight: 600;
  letter-spacing: -.01em; line-height: 1.3; color: #111114;
}
.tpx .tpx-note {
  display: block; margin-top: 12px; font-size: 16px; line-height: 1.55; color: #6b6b72; text-wrap: balance;
}

/* "Browse all templates" */
.tpx .tpx-more { display: flex; justify-content: center; margin-top: 48px; }
.tpx .tpx-all {
  display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 28px;
  border-radius: 999px; border: 1px solid #d5d5da; background: #fff; color: #111114;
  font-size: 16px; font-weight: 500; cursor: pointer;
  transition: border-color .3s ease, background-color .3s ease;
}
.tpx .tpx-all:hover { border-color: #111114; }
.tpx .tpx-all:focus-visible { outline: 2px solid var(--wh-accent, #7147eb); outline-offset: 3px; }
.tpx .tpx-all svg { width: 18px; height: 18px; transition: transform .3s ease; }
.tpx .tpx-all:hover svg { transform: translateX(3px); }

@media (max-width: 640px) {
  .tpx .tpx-grid { gap: 16px; }
  .tpx .tpx-body { padding: 18px 20px 20px; }
  .tpx .tpx-name { font-size: 18px; }
  .tpx .tpx-note { font-size: 15px; }
  .tpx .tpx-more { margin-top: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .tpx .tpx-paper { transition: none; }
  .tpx .tpx-card:hover .tpx-paper { transform: none; }
  .tpx .tpx-all, .tpx .tpx-all svg { transition: none; }
  .tpx .tpx-all:hover svg { transform: none; }
}

/* Frameless cards: a rounded grey picture box with the form floating in it as a white card,
   and the name and description below it on the page itself (no card border or fill). */
.tpx .tpx-grid { gap: 48px 28px; }
.tpx .tpx-card { background: none; border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
.tpx .tpx-thumb { aspect-ratio: 5 / 4; border-radius: 20px; background: #f3f3f4; }
.tpx .tpx-paper {
  left: 17%; right: 17%; top: 50%; bottom: auto; translate: 0 -50%;
  padding: 2.6em 2.8em 2.6em; border-radius: 12px;
  box-shadow: 0 1px 2px rgb(0 0 0 / .04), 0 14px 36px rgb(0 0 0 / .08);
}
.tpx .tpx-card:hover .tpx-paper { transform: translateY(-3%); }
.tpx .tpx-body { padding: 24px 2px 0; border-top: 0; }
.tpx .tpx-name { font-size: 22px; }
.tpx .tpx-note { margin-top: 14px; font-size: 17px; line-height: 1.6; }
@media (max-width: 640px) {
  .tpx .tpx-grid { gap: 36px; }
  .tpx .tpx-body { padding-top: 18px; }
  .tpx .tpx-name { font-size: 20px; }
  .tpx .tpx-note { font-size: 16px; }
}

/* Template icons: no tile, just a slightly larger neutral icon beside the name. */
.tpx .tpx-ico { width: auto; height: auto; background: none; border-radius: 0; color: #3f3f46; }
.tpx .tpx-ico .tpx-icon { width: 24px; height: 24px; }
.tpx .tpx-head { gap: 10px; }
