/* ==========================================================================
   FREE TOOL PAGES (2026) — tools/<slug>/ pages on bs5/new-home-2026
   First page on it: tools/barcode-generator/ (design: "Tool page · variant B ·
   Studio"). One stylesheet for every tool page that migrates; a tool that
   needs something of its own gets a small file beside this one.

   Everything is prefixed tp- so it cannot meet base.css, Bootstrap or the
   legacy assets/css/tools.css, which the 26 tools still on the legacy layout
   load. When the last tool has migrated, tools.css and
   _includes/bs5/tools/styles.html are deleted and this file stays.

   Reused, not redefined: .js-section / .js-container__content (layout),
   .js-section__title (h1, h2), .js-cards__title (sub-headings), .js-tag
   (badges), .button (actions), the FAQ include (bs5/home-2026/faq.html, with
   stacked=true) and the toast / clipboard helper (assets/js/tools/feedback.js).

   Page aliases (CLAUDE.md design rule 10): the category tile keeps the colour
   of its category whatever the section theme. .tp-tone--* are the same
   surfaces as .tools-tone--* in tools-index.css (not on master yet): when
   both are, move them to base.css (rule 2). Only the tones a page needs are
   defined; add the rest when a tool of that category migrates.
   ========================================================================== */

.tp-tone--green,
.tp-tone--blue {
  --tp-glow: radial-gradient(circle at 88% 12%, rgba(var(--js-color-white-rgb), .22), rgba(var(--js-color-white-rgb), 0) 55%);
}

.tp-tone--green {
  background-color: var(--js-color-yellow-green);
  color: var(--js-color-onyx);
}

.tp-tone--blue {
  background-image: var(--tp-glow), var(--js-gradient-blue);
  color: var(--js-color-bright-snow);
}

/* Visually hidden, still focusable (the real checkbox behind a custom box) */
.tp-vh {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

/* ==========================================================================
   TOAST — from assets/js/tools/feedback.js (twToast). The element is created
   on <body> when the page has none, so these rules are not scoped.
   ========================================================================== */

.tw-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: min(440px, calc(100vw - 48px));
  padding: 20px 26px;
  border-radius: var(--js-radius-lg);
  background: var(--js-color-yellow-green);
  color: var(--js-color-onyx);
  font-family: var(--font-main);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  box-shadow: 0 0 0 1px rgba(var(--js-color-onyx-rgb), .1), 0 18px 44px rgba(var(--js-color-onyx-rgb), .3);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
}

.tw-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* The icon is drawn with a mask, so it takes the text colour and needs no
   icon font or change to assets/js/tools/feedback.js (shared with the legacy
   pages, which keep their own toast). Success: a check in a circle */
.tw-toast::before {
  content: "";
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M8 12.5l2.7 2.7L16.5 9.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M8 12.5l2.7 2.7L16.5 9.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* twToast(message, 'error'): white on the danger ink stays above 7:1; the
   icon becomes an exclamation in a circle */
.tw-toast--error {
  background: var(--js-tag-danger-ink);
  color: var(--js-color-white);
}

.tw-toast--error::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 7v6M12 16.5h.01'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 7v6M12 16.5h.01'/%3E%3C/svg%3E") center / contain no-repeat;
}

@media (max-width: 575px) {
  .tw-toast {
    right: 16px;
    left: 16px;
    bottom: 16px;
    max-width: none;
    padding: 18px 20px;
  }
}

/* ==========================================================================
   HERO — breadcrumbs, category tile, title, badges (onyx)
   ========================================================================== */

.tools-page .tp-hero.js-section {
  position: relative;
  /* clips the glow of the illustration */
  overflow: hidden;
  padding-top: 28px;
  padding-bottom: 40px;
}

.tp-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-main-op7);
}

.tp-crumbs a {
  color: inherit;
  text-decoration: none;
}

.tp-crumbs a:hover {
  color: var(--color-main);
  text-decoration: underline;
}

.tp-crumbs a:focus-visible {
  outline: 3px solid var(--js-color-yellow-green);
  outline-offset: 3px;
  border-radius: 4px;
}

.tp-crumbs [aria-current] {
  color: var(--color-main);
}

.tp-hero__row {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 3fr);
  gap: 48px;
  align-items: center;
  margin-top: 24px;
}

/* Illustration, right of the title (design: Barcode header art D). It is
   decorative and drawn on a dark header, so its surfaces are fixed: the white
   cards, the onyx bars and the green scan corners must not follow the section
   theme (rule 10 page aliases; the SVG reads the brand primitives directly).
   Text uses Albert Sans: the design's mono font is not in tokens.css. */
.tp-art {
  position: relative;
  justify-self: end;
  width: 100%;
  max-width: 360px;
}

.tp-art::before {
  content: "";
  position: absolute;
  inset: -8% -12%;
  background: radial-gradient(closest-side, var(--js-color-green-glow), transparent);
  pointer-events: none;
}

.tp-art svg {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.tp-art__sh {
  filter: drop-shadow(0 16px 22px rgba(var(--js-color-onyx-rgb), .5));
}

.tp-art text {
  font-family: var(--font-main);
}

.tp-art .tp-art__mono {
  font-variant-numeric: tabular-nums;
}

.tp-tile {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
}

/* Size, weight and face come from js-section__title (base.css) */
.tp-title {
  margin: 0;
  text-wrap: balance;
}

.tp-sub {
  max-width: 64ch;
  margin: 12px 0 0;
  font-size: 18px;
  line-height: 1.55;
  color: var(--color-main-op8);
}

.tp-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

/* ==========================================================================
   SECTION MENU — sticky under the header, links to the page sections
   (assets/js/tools/page-nav.js marks the one on screen)
   ========================================================================== */

.tp-tabs {
  position: sticky;
  top: var(--header-height-desktop);
  z-index: 20;
  background: var(--color-background);
  border-bottom: 1px solid var(--color-border);
}

.tp-tabs nav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tp-tabs nav::-webkit-scrollbar {
  display: none;
}

.tp-tabs a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  height: 52px;
  margin-bottom: -1px;
  padding: 0 16px;
  border-bottom: 3px solid transparent;
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 600;
  color: var(--color-secondary-op7);
  text-decoration: none;
  transition: var(--js-transition);
}

.tp-tabs a:hover {
  color: var(--color-main);
}

.tp-tabs a.is-active {
  color: var(--color-main);
  border-bottom-color: var(--color-accent);
}

.tp-tabs a:focus-visible {
  outline: 3px solid var(--js-color-onyx);
  outline-offset: -3px;
  border-radius: 8px;
}

/* ==========================================================================
   PAGE BODY — tool card + aside
   ========================================================================== */

.tools-page .tp-main.js-section {
  padding-top: 32px;
  padding-bottom: 8px;
}

.tp-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  align-items: start;
}

.tp-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.tp-body > section {
  /* Header (80px) + section menu (52px) + air */
  scroll-margin-top: 144px;
}

/* FAQ inside the main column (shared include, stacked=true): the include still
   renders its page-section wrapper (.js-container .js-section), so the wrapper
   is flattened to the width of the column. Layout only: the icon, type and
   colours stay those of the include. The !important ones answer base.css:
   .js-container__content sets max-width with it, and the other three are the
   page-wide values (100vw, section padding, gutters) that would overflow the
   column if base.css changed. Same promotion rule as the stacked variant: if
   a page that is not a tool needs this, it moves to base.css. */
.tools-page .tp-body > .js-faq-split--stacked {
  width: 100% !important;
  margin-top: 40px;
  padding: 0 !important;
  background: transparent;
}

.tools-page .tp-body > .js-faq-split--stacked .js-container__content {
  max-width: none !important;
  padding: 0 !important;
}

.tools-page .tp-body .js-faq-split--stacked .js-faq-split__grid {
  max-width: none;
  margin-inline: 0;
  gap: 20px;
}

/* A step of the base.css scale (the one it uses at 575px): the 56px title of
   a full-width FAQ is too heavy next to a 320px aside */
.tools-page .tp-body .js-faq-split--stacked .js-faq-split__title {
  margin-bottom: 8px;
  font-size: calc(var(--font-base-size) * 2.25);
}

.tp-card {
  background: var(--js-color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--js-radius-xl);
  box-shadow: 0 1px 2px rgba(var(--js-color-onyx-rgb), .04), 0 16px 40px rgba(var(--js-color-onyx-rgb), .06);
}

.tp-studio {
  overflow: hidden;
}

.tp-split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
}

.tp-pane {
  min-width: 0;
  padding: 28px;
}

.tp-pane + .tp-pane {
  border-left: 1px solid var(--color-border);
}

.tp-sticky {
  position: sticky;
  align-self: start;
}

/* --- Form -------------------------------------------------------------- */

.tp-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tp-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.tp-lblrow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.tp-label {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 700;
  color: var(--js-color-onyx);
}

.tp-val {
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-secondary-op7);
}

.tp-input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--color-main-op3);
  border-radius: var(--js-radius-lg);
  background: var(--js-color-white);
  color: var(--js-color-onyx);
  font-family: var(--font-secondary);
  font-size: 16px;
  font-weight: 500;
  transition: var(--js-transition);
}

.tp-input:hover {
  border-color: var(--color-main-op5);
}

.tp-input:focus-visible {
  outline: 3px solid var(--js-color-onyx);
  outline-offset: 2px;
  border-color: var(--js-color-onyx);
}

.tp-input[aria-invalid="true"] {
  border-color: var(--js-tag-danger-ink);
  background: var(--js-tag-danger-bg);
}

.tp-select {
  appearance: none;
  padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--js-color-onyx) 50%), linear-gradient(135deg, var(--js-color-onyx) 50%, transparent 50%);
  background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.tp-hint {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-secondary-op7);
}

.tp-error {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--js-tag-danger-ink);
}

.tp-error[hidden] {
  display: none;
}

.tp-error i {
  flex: 0 0 auto;
  margin-top: 2px;
}

.tp-range {
  width: 100%;
  height: 28px;
  accent-color: var(--js-color-onyx);
}

.tp-range:focus-visible {
  outline: 3px solid var(--js-color-onyx);
  outline-offset: 2px;
  border-radius: 4px;
}

.tp-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.tp-check {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  cursor: pointer;
  font-size: 15px;
  color: var(--js-color-onyx);
}

.tp-box {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--color-main-op5);
  border-radius: 6px;
  background: var(--js-color-white);
  color: transparent;
  transition: var(--js-transition);
}

.tp-vh:checked + .tp-box {
  border-color: var(--js-color-onyx);
  background: var(--js-color-onyx);
  color: var(--js-color-yellow-green);
}

.tp-vh:focus-visible + .tp-box {
  outline: 3px solid var(--js-color-onyx);
  outline-offset: 2px;
}

/* --- Preview and actions ----------------------------------------------- */

.tp-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  padding: 24px;
  border: 1px solid var(--color-border);
  border-radius: var(--js-radius-lg);
  background: var(--js-color-white);
}

.tp-preview svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Invalid value: the old code is removed, never left on screen to export */
.tp-preview.is-empty svg {
  display: none;
}

.tp-empty {
  max-width: 32ch;
  margin: 0;
  text-align: center;
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-secondary-op7);
}

.tp-empty[hidden] {
  display: none;
}

.tp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

/* button--small, but never under 44px to touch. The buttons share the row:
   all three side by side when the pane is wide enough, and two plus one full
   width (no ragged hole on the right) when it is not */
.tp-actions .button {
  flex: 1 1 auto;
  gap: 8px;
  min-height: 44px;
}

.tp-actions .button:disabled {
  opacity: .45;
  cursor: not-allowed !important;
}

.tp-actions .button:focus-visible {
  outline: 3px solid var(--js-color-onyx);
  outline-offset: 2px;
}

/* Loading: the icon turns into a spinner while the file is made (aria-busy
   is set by the page script; the button stays focusable) */
.tp-actions .button.is-loading {
  cursor: progress !important;
  opacity: .8;
}

.tp-actions .button.is-loading i {
  animation: tp-spin .8s linear infinite;
}

@keyframes tp-spin {
  to { transform: rotate(360deg); }
}

/* Done: the action worked (the toast says what happened) */
.tp-actions .button.is-done {
  border-color: var(--js-color-green-dark);
  background: var(--js-color-green-tint);
  color: var(--js-color-onyx);
}

.tp-priv {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--js-tag-success-ink);
}

.tp-priv i {
  flex: 0 0 auto;
  font-size: 18px;
  color: var(--js-tag-success-dot);
}

/* ==========================================================================
   ASIDE — about the tool + store CTA
   ========================================================================== */

/* The aside is as tall as the whole main column (tool, privacy line and FAQ),
   so the store card inside it can stick while that column scrolls and leave
   when the FAQ ends. The "About this tool" card above it scrolls normally. */
.tp-aside {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-self: stretch;
}

.tp-acard {
  padding: 20px 22px;
  border: 1px solid var(--color-border);
  border-radius: var(--js-radius-xl);
  background: var(--js-color-white);
}

/* The aside is 320px wide: the sub-heading steps down from js-cards__title */
.tp-acard__title {
  margin: 0 0 12px;
  font-size: calc(var(--font-base-size) * 1.25);
  line-height: 1.25;
}

.tp-facts {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.tp-facts > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--color-border);
  font-size: 15px;
}

.tp-facts > div:first-child {
  padding-top: 0;
  border-top: 0;
}

.tp-facts dt {
  color: var(--color-secondary-op7);
}

.tp-facts dd {
  margin: 0;
  font-family: var(--font-main);
  font-weight: 700;
  text-align: right;
}

.tp-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 700;
  color: var(--js-color-onyx);
}

.tp-link:focus-visible,
.tp-rc:focus-visible {
  outline: 3px solid var(--js-color-onyx);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Store CTA: a dark card in a light section (data-bundle-color="onyx" gives
   the tokens). Copy on top, centred; under it a small scene of the store she
   is building, with the cut-out standing on the card's bottom edge. The scene
   reuses the images of the /themes/ banner (themes/index.html) but is its own,
   simpler composition: when that banner becomes a shared component, replace
   this block with it. */
.tp-acard--cta {
  position: relative;
  overflow: hidden;
  padding: 24px 22px 0;
  border-color: transparent;
  background-color: var(--color-background);
  background-image: radial-gradient(ellipse 85% 42% at 72% 80%, var(--js-color-green-glow) 0%, transparent 70%);
  color: var(--color-main);
  text-align: center;
}

.tp-cta__eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
}

.tp-acard--cta .tp-acard__title {
  margin-bottom: 10px;
  font-size: calc(var(--font-base-size) * 1.75);
  line-height: 1.15;
  text-wrap: balance;
}

.tp-acard--cta p.tp-cta__text {
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--color-main-op8);
}

/* Full width of the 320px card; centred and capped where the card stretches */
.tp-acard--cta .button {
  width: 100%;
  max-width: 340px;
  min-height: 44px;
  margin-inline: auto;
}

/* The scene: every piece is placed in % of one 1218:1130 box (the proportions
   of the /themes/ banner); the small text and borders are fixed px with a
   floor. Decorative only (aria-hidden): the text on the panels is not content. */
.tp-scene {
  --tp-ring: var(--color-main-op2);
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 340px;
  aspect-ratio: 1218 / 1130;
  margin: 24px auto 0;
}

.tp-scene > * {
  position: absolute;
}

.tp-scene__person {
  bottom: 0;
  left: 22%;
  z-index: 3;
  display: block;
  width: auto;
  height: 93%;
}

.tp-scene__window {
  top: 19%;
  left: 58%;
  z-index: 1;
  width: 42%;
  height: 27%;
  overflow: hidden;
  border-radius: 6px;
  background: var(--color-background);
  box-shadow: 0 0 0 1px var(--tp-ring), 0 10px 22px rgba(var(--js-color-onyx-rgb), .5);
}

.tp-scene__bar {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 9px;
  padding: 0 5px;
  background: var(--color-main-op1);
}

.tp-scene__bar span {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--color-main-op3);
}

.tp-scene__window img {
  display: block;
  width: 100%;
  height: calc(100% - 9px);
  object-fit: cover;
  object-position: top;
}

/* Floating panels share one card look; the text on them has a floor so it
   does not turn to dust at 320px */
.tp-scene__panel {
  z-index: 4;
  padding: 7px 9px;
  border-radius: 9px;
  background: var(--color-background);
  color: var(--color-main);
  box-shadow: 0 0 0 1px var(--tp-ring), 0 10px 22px rgba(var(--js-color-onyx-rgb), .5);
  text-align: left;
}

.tp-scene__label {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  font-family: var(--font-main);
  font-size: 9px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.tp-scene__label i {
  color: var(--color-accent);
}

.tp-scene__shipping {
  top: 34%;
  left: 0;
  z-index: 2;
  width: 38%;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.tp-scene__row {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 5px;
  border: 1px solid var(--color-border);
  border-radius: 5px;
}

.tp-scene__row--on {
  border-color: var(--color-accent);
  background: var(--color-main-op05);
}

.tp-scene__row i {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1px solid var(--color-main-op4);
}

.tp-scene__row--on i {
  border: 2px solid var(--color-accent);
}

.tp-scene__row b {
  flex: 1 1 auto;
  height: 4px;
  border-radius: 4px;
  background: var(--color-main-op2);
}

.tp-scene__row--on em {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
}

.tp-scene__palette {
  top: 3%;
  left: 62%;
  width: 36%;
}

/* Swatches: the colours of the themes the banner shows, from the brand
   primitives (page alias, rule 10: they must not follow the card theme) */
.tp-scene__swatches {
  display: flex;
  gap: 3px;
  margin-top: 6px;
}

.tp-scene__swatches span {
  flex: 1 1 0;
  aspect-ratio: 1;
  border-radius: 4px;
  box-shadow: 0 0 0 1px var(--color-main-op2);
}

.tp-scene__swatches span:nth-child(1) { background: var(--js-color-yellow-green); }
.tp-scene__swatches span:nth-child(2) { background: rgb(var(--js-color-purple-light-rgb)); }
.tp-scene__swatches span:nth-child(3) { background: rgb(var(--js-color-blue-light-rgb)); }
.tp-scene__swatches span:nth-child(4) { background: rgb(var(--js-color-teal-dark-rgb)); }
.tp-scene__swatches span:nth-child(5) { background: var(--js-color-bright-snow); }

/* Hugs its text and sticks to the right edge, so a narrow card never clips it */
.tp-scene__type {
  top: 68%;
  right: 0;
  width: auto;
}

.tp-scene__sample {
  margin: 6px 0 2px;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
}

.tp-scene__sample span {
  font-weight: 400;
}

.tp-scene__body {
  margin: 0;
  font-size: 10px;
  color: var(--color-main-op7);
}

/* ==========================================================================
   MORE TOOLS
   ========================================================================== */

.tools-page .tp-related.js-section {
  padding-top: 56px;
  padding-bottom: 72px;
  scroll-margin-top: 144px;
}

.tp-related__title {
  margin: 0 0 28px;
}

.tp-rel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.tp-rc {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--js-radius-lg);
  background: var(--js-color-white);
  color: var(--js-color-onyx);
  text-decoration: none;
  transition: var(--js-transition);
}

.tp-rc:hover {
  color: var(--js-color-onyx);
  border-color: var(--js-color-green-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(var(--js-color-onyx-rgb), .10);
}

.tp-rc__hd {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tp-rc__tile {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--js-radius-md);
}

.tp-rc__title {
  margin: 0;
  font-size: calc(var(--font-base-size) * 1.25);
  line-height: 1.3;
}

.tp-rc p {
  margin: 0;
  flex: 1 1 auto;
  font-size: 15px;
  line-height: 1.55;
  color: var(--color-secondary-op7);
}

.tp-rc__go {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 700;
}

/* The arrow nudges right on hover and focus and goes a bit further while it is
   pressed (the card or the link is the click target), the same ~4px that
   base.css uses for button--trsn. Reduced motion: it stays put. */
.tp-rc__go svg,
.tp-link svg {
  flex: 0 0 auto;
  transition: transform .2s ease;
}

.tp-rc:is(:hover, :focus-visible) .tp-rc__go svg,
.tp-link:is(:hover, :focus-visible) svg {
  transform: translateX(4px);
}

.tp-rc:active .tp-rc__go svg,
.tp-link:active svg {
  transform: translateX(7px);
}

/* Sixth card: not a tool but the way to the rest of them. A dark card
   (data-bundle-color="onyx" gives the tokens) so it stands out from the five
   white ones, with the same structure and height */
.tp-rc--all {
  border-color: transparent;
  background-color: var(--color-background);
  background-image: radial-gradient(ellipse 70% 80% at 100% 100%, var(--js-color-green-glow) 0%, transparent 70%);
  color: var(--color-main);
}

.tp-rc--all:hover {
  color: var(--color-main);
  border-color: var(--js-color-yellow-green);
}

.tp-rc--all .tp-rc__title {
  color: var(--color-main);
}

.tp-rc--all p {
  color: var(--color-main-op7);
}

.tp-rc--all .tp-rc__go {
  color: var(--color-accent);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

/* The store card sticks under the header (80px) and the section menu (52px).
   It is 521px tall, so it only sticks when the screen shows all of it:
   148px + 521px + a margin = 700px */
@media (min-width: 992px) and (min-height: 700px) {
  .tp-acard--cta {
    position: sticky;
    top: 148px;
  }
}

@media (max-width: 991px) {
  /* A two-column hero is centred once it stacks (rule 8): copy, subtext,
     badges and the illustration */
  .tp-hero__row {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }

  .tp-hero__copy {
    text-align: center;
  }

  .tp-sub {
    margin-inline: auto;
  }

  .tp-badges {
    justify-content: center;
  }

  .tp-art {
    justify-self: center;
  }

  .tp-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .tp-aside {
    position: static;
  }

  .tp-split {
    grid-template-columns: minmax(0, 1fr);
  }

  /* The result comes first: on a phone the form is under the code it changes */
  .tp-pane--preview {
    order: -1;
    border-bottom: 1px solid var(--color-border);
  }

  .tp-pane + .tp-pane {
    border-left: 0;
  }

  .tp-sticky {
    position: static;
  }

  .tp-rel {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 767px) {
  .tp-tabs {
    top: var(--header-height-mobile);
  }

  .tp-body > section,
  .tools-page .tp-related.js-section {
    scroll-margin-top: 124px;
  }

  .tools-page .tp-hero.js-section {
    padding-top: 20px;
    padding-bottom: 28px;
  }

  /* Phones: the tool comes first, the illustration waits for a wider screen */
  .tp-art {
    display: none;
  }

  .tp-tile {
    width: 56px;
    height: 56px;
    border-radius: 16px;
  }

  .tp-sub {
    font-size: 16px;
  }
}

@media (max-width: 575px) {
  .tp-pane {
    padding: 20px;
  }

  .tp-pair {
    grid-template-columns: minmax(0, 1fr);
  }

  .tp-actions .button {
    flex: 1 1 100%;
  }

  .tools-page .tp-related.js-section {
    padding-top: 40px;
    padding-bottom: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tp-actions .button.is-loading i {
    animation: none;
  }

  .tp-rc__go svg,
  .tp-link svg {
    transition: none;
  }

  .tp-rc:is(:hover, :focus-visible) .tp-rc__go svg,
  .tp-rc:active .tp-rc__go svg,
  .tp-link:is(:hover, :focus-visible) svg,
  .tp-link:active svg {
    transform: none;
  }

  .tw-toast,
  .tp-tabs a,
  .tp-input,
  .tp-box,
  .tp-rc {
    transition: none;
  }

  .tp-rc:hover {
    transform: none;
  }
}
