/* ==========================================================================
   KDP Keywords tool page — insights.bookbub.com/tools/kdp-keywords/
   Extracted from kdp-keyword-ideas-mockup.html (concept mock). Loaded ONLY
   on the "KDP Keywords Tool" page template; every other stylesheet is
   dequeued there, so nothing leaks in either direction. All page content
   is scoped under .mock-body (the mock's scoping wrapper, kept as-is).
   ========================================================================== */

/* ==========================================================================
   BookBub Partners marketing-site header (logged-out, "red header" variant)
   Compiled from lello source:
     app/views/modules/_partner_header_nav.haml
     app/assets/stylesheets/core/partner_marketing/partners.scss (.pd-header-nav / .red-header)
     app/assets/stylesheets/core/apps/partners.scss
     app/assets/stylesheets/core/global.scss (.haml-bub-button)
   Palette (webster/variables/colors.scss):
     $red-100 #F44336 | $red-110 #DC3C31 | $red-130 #AB2F26
     $navy-90 #1D4254 | $navy-110 #04293B | $greyish #ECEFF1 | $white #FFF
   ========================================================================== */
*, *:before, *:after { box-sizing: border-box; }
body { margin: 0; font-family: "Helvetica Neue", Helvetica, sans-serif; }

.red-header .pd-header-nav {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 1000;
  padding: 10px 44px 7px 32px;
  background-color: #F44336;               /* $red-100 */
  box-shadow: 0 1px 8px 0 rgba(33,43,50,.06);
}
.pd-header-nav .container {
  max-width: 1170px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.pd-header-nav .partner-logo a { display: block; padding: 0; }
.pd-header-nav .partner-logo img {
  display: block;
  width: 165px;                             /* natural size 542x53, rendered ~col-md-2 width */
  height: auto;
}

/* Links */
.pd-header-nav .partner-links {
  position: relative;
  display: flex;
  align-items: center;
}
.pd-header-nav a {
  color: #fff;
  font-size: 14px;
  line-height: 1.5em;
  font-weight: 600;                         /* @include t-bold */
  text-decoration: none;
  cursor: pointer;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.pd-header-nav .partner-links > a { padding-right: 25px; }

/* Dropdown toggles */
.pd-header-nav .dropdown {
  position: relative;
  display: inline-block;
  border: none;
  margin: 0;
  padding: 0 22px 0 0;
  background: transparent;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  -webkit-font-smoothing: antialiased;
}
.pd-header-nav .dropdown .expand-arrow {
  font-size: 10px;
  display: inline-flex;
}

/* Dropdown menus */
.pd-header-nav ul.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%; left: 0;
  z-index: 1000;
  min-width: 220px;
  margin: 20px 0 0;
  padding: 10px 0;
  list-style: none;
  background-color: #fff;
  border: none;
  border-radius: 4px;
  box-shadow: 1px 2px 12px 0 rgba(33,43,50,.10);   /* $elevation-low */
}
.pd-header-nav .dropdown.open ul.dropdown-menu { display: block; }
.pd-header-nav ul.dropdown-menu:after {
  content: "";
  position: absolute;
  top: -10px; left: 30px;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 10px solid #fff;
}
.pd-header-nav ul.dropdown-menu li a {
  display: block;
  padding: 10px 20px;
  font-weight: 500;
  color: #1D4254;                           /* $navy-90 */
  cursor: pointer;
}
.pd-header-nav ul.dropdown-menu li a:hover {
  background-color: #ECEFF1;                /* $greyish */
  color: #04293B;                           /* $navy-110 */
}
.pd-header-nav ul.dropdown-menu li.divider {
  height: 1px;
  margin: 9px 0;
  overflow: hidden;
  background-color: #e5e5e5;
}

/* Sign In divider */
.pd-header-nav .nav-divider {
  border-left: 1px solid rgba(255,255,255,.25);
  padding-left: 25px;
}

/* Sign Up button (.haml-bub-button.small.marketing.partners on red header) */
.pd-header-nav .haml-bub-button {
  display: inline-flex;
  position: relative;
  justify-content: center;
  align-items: baseline;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  border-radius: 3px;
  margin-bottom: 6px;
  margin-right: 6px;
  font-weight: 600;
}
.pd-header-nav .haml-bub-button.small {
  margin-top: 3px;
  padding: 5px 24px;
  font-size: 12px;
  line-height: 1.5em;
}
.red-header .pd-header-nav .haml-bub-button.partners {
  background-color: #DC3C31;                /* $red-110 */
  color: #fff;
}
.red-header .pd-header-nav .haml-bub-button.partners:hover,
.red-header .pd-header-nav .haml-bub-button.partners:focus,
.red-header .pd-header-nav .haml-bub-button.partners:active {
  background-color: #AB2F26;                /* $red-130 */
  color: #fff;
  text-decoration: none;
  transition-duration: .2s;
  transition-timing-function: ease-in-out;
}

/* Below ~992px the real site swaps to a hamburger + offpage drawer; the
   desktop links are simply hidden. */
@media (max-width: 991px) {
  .pd-header-nav .partner-links { display: none; }
  .pd-header-nav .partner-logo img { height: 19px; width: auto; margin-bottom: 3px; }
}

/* viewport-fit=cover (set in the template) extends the page behind the
   status bar / notch so env(safe-area-inset-*) reports real values — pad
   the fixed header by the insets so the logo clears the clock in portrait
   and the notch in landscape. Desktop: env() = 0, nothing changes. */
.red-header .pd-header-nav {
  padding-top: max(10px, env(safe-area-inset-top, 0px));
  padding-left: max(32px, env(safe-area-inset-left, 0px));
  padding-right: max(44px, env(safe-area-inset-right, 0px));
}

/* --- page scaffolding: offset for the fixed header --- */
.mock-body { padding: calc(92px + env(safe-area-inset-top, 0px)) env(safe-area-inset-right, 0px) 0 env(safe-area-inset-left, 0px); background: #fff; min-height: 100vh; }
/* The fixed header shrinks at 991px (links + button hidden, 19px logo:
   ~39px tall vs ~55px on desktop) — shrink the clearance with it, or
   mobile ends up with MORE dead space than desktop above a smaller
   viewport. 64px = short header + comfortable breathing room. */
@media (max-width: 991px) {
  .mock-body { padding-top: calc(64px + env(safe-area-inset-top, 0px)); }
  .mock-body .hero { padding-top: 24px; }
}

/* ==========================================================================
   Page content styles — scoped to .mock-body; header CSS above untouched
   ========================================================================== */
.mock-body{
  --bb-red:#F44336; --bb-red-dark:#DC3C31; --bb-ink:#1D4254; --bb-slate:#5c6570;
  --bb-line:#e3e6e9; --bb-bg:#f7f8f9; --bb-green:#2e844a; --bb-amber:#b07d10; --bb-blue:#2a6496;
  color:var(--bb-ink); line-height:1.55;
}
.mock-body a{color:var(--bb-blue);text-decoration:none}
.mock-body .wrap{max-width:1060px;margin:0 auto;padding:0 24px}
.mock-body .btn{display:inline-block;background:var(--bb-red);color:#fff;font-weight:700;border:none;border-radius:3px;padding:10px 22px;font-size:15px;cursor:pointer}
.mock-body .btn:hover{background:var(--bb-red-dark)}
.mock-body .btn.small{padding:10px 18px;font-size:14px;line-height:1.2}
.mock-body .btn.ghost{background:#fff;color:var(--bb-red);border:2px solid var(--bb-red)}
.mock-body .hero{padding:32px 0 20px}
.mock-body .kicker{font-size:12px;font-weight:700;letter-spacing:2px;text-transform:uppercase;color:var(--bb-red)}
/* Freshness stamp rides the kicker line, deemphasized next to the red label. */
.mock-body .kicker .updated{color:var(--bb-slate);font-weight:400}
.mock-body h1{font-size:36px;letter-spacing:-.5px;margin:6px 0 12px}
.mock-body .lede{font-size:17px;color:var(--bb-slate);max-width:780px;margin:0}
.mock-body .lede b{color:var(--bb-ink)}
.mock-body .ledebox{
  background:#f7f8f9;     /* var(--bb-bg) — the page's existing light-gray token */
  border-radius:10px;
  padding:20px 24px;
  margin-top:14px;
  max-width:820px;
}
.mock-body .flowline{font-size:14px;font-weight:600;color:var(--bb-ink);margin:16px 0 0;padding:10px 14px;background:var(--bb-bg);border:1px solid var(--bb-line);border-radius:6px;display:inline-block}
.mock-body .stephead{font-size:13px;font-weight:700;letter-spacing:1px;text-transform:uppercase;color:var(--bb-slate);margin:26px 0 0}
.mock-body .count{font-size:13px;font-weight:600;color:var(--bb-slate);margin-left:8px}
/* Builder heading: flex keeps "Clear all" on the heading line at every width
   (the old float slipped below the h2 box on narrow screens and touched the
   first slot). Scoped class — the other panel h2 contains .lname and must
   not become a flex row. */
.mock-body .buildhead{display:flex;align-items:baseline;justify-content:space-between;gap:10px}
.mock-body .clearlink{flex-shrink:0;font-size:12px;font-weight:600;color:var(--bb-slate);cursor:pointer;text-decoration:underline;white-space:nowrap}
.mock-body .clearlink:hover{color:var(--bb-red-dark)}
.mock-body .textlink{color:var(--bb-blue);cursor:pointer;text-decoration:underline}
.mock-body .handoff{margin-top:16px;padding-top:12px}
.mock-body .subchips{display:flex;gap:6px;flex-wrap:wrap;margin:10px 0 12px;align-items:center}
.mock-body .subchips .lbl{font-size:11px;font-weight:700;letter-spacing:.5px;text-transform:uppercase;color:var(--bb-slate);margin-right:2px}
.mock-body .schip{border:1px solid #c9ced4;background:#fff;border-radius:14px;padding:4px 12px;font-size:12.5px;font-weight:600;cursor:pointer}
.mock-body .schip.on{border-color:var(--bb-red);background:#fdeeed;color:var(--bb-red-dark)}
.mock-body .panelstep{font-size:11px;font-weight:700;letter-spacing:1px;text-transform:uppercase;color:var(--bb-slate);margin:0 0 2px}
.mock-body .tabs{display:flex;gap:8px;margin:10px 0 0;flex-wrap:wrap}
.mock-body .tab{border:1px solid #c9ced4;background:#fff;border-radius:16px;padding:7px 16px;font-size:14px;font-weight:600;cursor:pointer}
.mock-body .tab.on{border-color:var(--bb-red);background:#fdeeed;color:var(--bb-red-dark)}
.mock-body .grid{display:grid;grid-template-columns:1.5fr 1fr;gap:22px;margin:22px 0}
@media(max-width:820px){.mock-body .grid{grid-template-columns:1fr}}
.mock-body .panel{background:#fff;border:1px solid var(--bb-line);border-radius:8px;padding:20px}
.mock-body .panel h2{font-size:19px;margin:0 0 20px}
.mock-body .panel .sub{font-size:12.5px;color:var(--bb-slate);margin-bottom:12px}
.mock-body table{width:100%;border-collapse:collapse;font-size:14px}
.mock-body th{font-size:11px;text-transform:uppercase;letter-spacing:.6px;color:var(--bb-slate);text-align:left;padding:6px 8px;border-bottom:2px solid var(--bb-line)}
.mock-body td{padding:9px 8px;border-bottom:1px solid var(--bb-line);vertical-align:middle}
.mock-body .kw{font-weight:600}
.mock-body .rank{color:var(--bb-slate);font-size:13px;width:24px}
.mock-body .bar{height:7px;border-radius:4px;background:#e6e9ec;position:relative;width:100px;display:inline-block;vertical-align:middle}
.mock-body .bar i{position:absolute;left:0;top:0;bottom:0;border-radius:4px;background:var(--bb-red)}
.mock-body .add{background:#fff;border:1px solid #c9ced4;border-radius:4px;padding:4px 10px;font-size:12px;font-weight:700;cursor:pointer;min-width:70px;text-align:center}
.mock-body .add:hover{border-color:var(--bb-red);color:var(--bb-red)}
/* Confirmation state: phrase is in the slots. Wins over :hover by order at
   equal specificity; min-width above keeps the column from shifting. */
.mock-body .add.added{border-color:var(--bb-green);color:var(--bb-green);background:#e2f2e7;cursor:default}
.mock-body .up{color:var(--bb-green);font-weight:700}
.mock-body .down{color:var(--bb-red-dark)}
/* Null YoY delta = phrase wasn't rankable in the Aug 2025 edition; quiet gray so it doesn't compete with the green/red numbers. */
.mock-body .newpill{font-size:11px;font-weight:700;padding:2px 8px;border-radius:10px;background:#eef0f2;color:var(--bb-slate);white-space:nowrap}
.mock-body td .newpill{cursor:help}
.mock-body .slots{display:flex;flex-direction:column;gap:8px}
.mock-body .slot{display:flex;align-items:center;gap:10px;border:1px dashed #c9ced4;border-radius:4px;padding:8px 10px;font-size:14px;background:var(--bb-bg)}
.mock-body .slot.filled{border-style:solid;background:#fff}
.mock-body .slot .num{width:22px;height:22px;border-radius:50%;background:var(--bb-ink);color:#fff;font-size:12px;font-weight:700;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.mock-body .slot .txt{flex:1;color:var(--bb-slate)}
.mock-body .slot.filled .txt{color:var(--bb-ink);font-weight:600}
.mock-body .slot .x{border:none;background:none;color:var(--bb-slate);cursor:pointer}
.mock-body .msg{font-size:13px;margin-top:10px;padding:9px 12px;border-radius:4px;display:none}
.mock-body .msg.warn{display:block;background:#faf0d8;color:var(--bb-amber)}
.mock-body .msg.ok{display:block;background:#e2f2e7;color:var(--bb-green)}
.mock-body .slotactions{display:flex;gap:10px;margin-top:12px;flex-wrap:wrap}
.mock-body .slot .copybtn{border:1px solid #c9ced4;background:#fff;border-radius:4px;font-size:11px;font-weight:700;padding:3px 8px;cursor:pointer;white-space:nowrap}
.mock-body .slot .copybtn:hover{border-color:var(--bb-red);color:var(--bb-red)}
.mock-body .slot.copied{border-color:var(--bb-green)}
.mock-body .slot.copied .num{background:var(--bb-green)}
.mock-body .note{font-size:12px;color:var(--bb-slate);margin-top:10px}
.mock-body .section{margin:34px 0}
.mock-body .section h2{font-size:24px;margin:0 0 6px}
.mock-body .section > p{color:var(--bb-slate);max-width:780px;margin:0 0 14px}
.mock-body .catcard{display:flex;justify-content:space-between;gap:14px;align-items:center;border:1px solid var(--bb-line);border-radius:6px;padding:12px 16px;margin-bottom:8px;font-size:14px;flex-wrap:wrap}
.mock-body .catcard code{font-family:Menlo,Consolas,monospace;font-size:12.5px;background:var(--bb-bg);padding:2px 6px;border-radius:3px}
.mock-body .tier{font-size:11px;font-weight:700;padding:2px 8px;border-radius:10px;white-space:nowrap}
.mock-body .tier.high{background:#e2f2e7;color:var(--bb-green)}
.mock-body .tier.med{background:#faf0d8;color:var(--bb-amber)}
.mock-body .tier.low{background:#eef0f2;color:var(--bb-slate)}
.mock-body .tier.chigh{background:#fbe4e2;color:var(--bb-red-dark)}
.mock-body .method{background:var(--bb-bg);border:1px solid var(--bb-line);border-radius:8px;padding:20px;font-size:13.5px;color:var(--bb-slate)}
.mock-body .method h3{font-size:15px;color:var(--bb-ink);margin:0 0 6px}
.mock-body .method b{color:var(--bb-ink)}
.mock-body .faqitem{border-top:1px solid var(--bb-line);padding:14px 0}
.mock-body .faqitem:last-of-type{border-bottom:1px solid var(--bb-line)}
.mock-body .faqitem summary{font-size:16px;font-weight:700;cursor:pointer;list-style:none;display:flex;justify-content:space-between;gap:12px}
.mock-body .faqitem summary::-webkit-details-marker{display:none}
.mock-body .faqitem summary::after{content:"+";color:var(--bb-blue);font-weight:700;flex-shrink:0}
.mock-body .faqitem[open] summary::after{content:"–"}
.mock-body .faqitem p{font-size:14px;color:var(--bb-slate);max-width:780px;margin:10px 0 0}
.mock-body .faqitem p b{color:var(--bb-ink)}
/* ---------- Shared footer (the blog's shaded link columns) ----------
   Markup is single-sourced: the template calls genesis_footer_scripts()
   — the same Genesis "Footer Scripts" setting the blog prints on
   wp_footer — so link/text edits in wp-admin update both pages. These
   STYLES are a manual copy (this page dequeues all site CSS) of:
   1) style.css "# BB Footer", 2) the Bootstrap-3.4 grid subset the
   footer markup uses (blog loads Bootstrap from a CDN). If the blog
   footer is ever RESTYLED, re-sync this block by hand. FontAwesome for
   the social icons already reaches this page via a raw wp_head link. */
.mock-body .footer{font-family:brandon-grotesque,"brandon-grotesque",Candara,"Gill Sans MT","Trebuchet MS",Verdana,sans-serif;color:#fff;font-size:15.5px;font-weight:200;background-color:#333333;padding-top:40px;border-top:5px solid black;margin-top:20px}
.mock-body .footer h4{font-size:19px;font-weight:700;text-transform:uppercase;color:#fff;margin:10px 0}
.mock-body .footer a{color:#fff;text-decoration:none}
.mock-body .footer a:hover{color:#fff}
.mock-body .footer ul{margin:0 0 10px;padding:0}
.mock-body .footer li{margin-bottom:2.5px}
.mock-body .footer .small{margin-top:23px;margin-bottom:26px;font-size:14px}
.mock-body .footer .footer-logo{margin-top:0;margin-bottom:7px;line-height:42px}
.mock-body .footer .social-links i{line-height:42px;padding-top:3px}
.mock-body .footer .social-links{margin-right:10px;font-size:19px}
.mock-body .footer .container{margin:0 auto;padding:0 15px}
@media(min-width:768px){.mock-body .footer .container{width:750px}}
@media(min-width:992px){.mock-body .footer .container{width:970px}}
@media(min-width:1200px){.mock-body .footer .container{width:1170px}}
.mock-body .footer .row{margin:0 -15px}
.mock-body .footer .row::after{content:"";display:table;clear:both}
.mock-body .footer [class*="col-"]{position:relative;min-height:1px;padding:0 15px}
.mock-body .footer .col-xs-6{float:left;width:50%}
@media(min-width:768px){
	.mock-body .footer .col-sm-3{float:left;width:25%}
	.mock-body .footer .col-sm-10{float:left;width:83.3333%}
	.mock-body .footer .col-sm-12{float:left;width:100%}
}
@media(min-width:992px){
	.mock-body .footer .col-md-3{float:left;width:25%}
	.mock-body .footer .col-md-8{float:left;width:66.6667%}
}
@media(min-width:1200px){.mock-body .footer .col-lg-7{float:left;width:58.3333%}}
.mock-body .footer .list-unstyled{padding-left:0;list-style:none}
.mock-body .footer .img-responsive{display:block;max-width:100%;height:auto}

/* ==========================================================================
   Production additions (not in the concept mock)
   ========================================================================== */
/* Chips/tabs are real <button>s here (the mock used spans). Explicit text
   color too: iOS Safari's UA stylesheet tints button text system-blue when
   no color is set — Chrome defaults to black, so DevTools iPhone emulation
   (Chrome's engine) never shows it. Selected/hover/added states still win
   on specificity. */
.mock-body .schip, .mock-body .tab, .mock-body .add, .mock-body .slot .copybtn {
  font-family: inherit;
  color: var(--bb-ink);
}

/* Keyword tables scroll inside their own wrapper on narrow screens instead
   of overflowing the page (the mock had no responsive table handling).
   min-width:0 on the grid items: without it the table's intrinsic width
   propagates through the overflow wrapper and stretches the page. */
.mock-body .grid > * { min-width: 0; }
/* position:relative keeps absolutely-positioned .screen-reader-text spans
   inside the scroller — otherwise they resolve against the viewport and
   widen the page on narrow screens. */
.mock-body .tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; position: relative; }
.mock-body .tablewrap table { min-width: 540px; }

/* ---- Mobile: stacked rows instead of a horizontal-scrolling table ----
   At phone widths each row reflows into a two-line block (rank + phrase +
   Add, then bar/% + YoY), so nothing scrolls sideways. CSS-only: the
   server-rendered markup, chip-filter JS, and Add buttons are untouched.
   The display overrides linearize table semantics for screen readers at
   these widths — acceptable for a ranked list; the SR caption stays.
   NOTE: "vs. Aug 2025" below is CSS-generated content — bump it together
   with the edition labels at every quarterly refresh (see rules doc). */
@media (max-width: 640px) {
  .mock-body .tablewrap table { min-width: 0; display: block; }
  .mock-body .tablewrap thead { display: none; }
  .mock-body .tablewrap tbody { display: block; }
  .mock-body .tablewrap tr {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "rank   kw     add"
      "demand demand delta";
    align-items: center;
    column-gap: 10px;
    row-gap: 5px;
    padding: 10px 0;
    border-bottom: 1px solid var(--bb-line);
  }
  .mock-body .tablewrap td { display: block; padding: 0; border-bottom: none; }
  .mock-body .tablewrap td.rank { grid-area: rank; width: auto; }
  .mock-body .tablewrap td.kw { grid-area: kw; }
  .mock-body .tablewrap td.demand { grid-area: demand; }
  .mock-body .tablewrap td.up,
  .mock-body .tablewrap td.down,
  .mock-body .tablewrap td.delta { grid-area: delta; text-align: right; font-size: 13px; }
  .mock-body .tablewrap tr > td:last-child { grid-area: add; text-align: right; }
  /* the hidden thead took the column context with it — restate it inline */
  .mock-body .tablewrap td.up::after,
  .mock-body .tablewrap td.down::after {
    content: " vs. Aug 2025";
    color: var(--bb-slate);
    font-weight: 400;
    font-size: 11px;
  }
}

/* One server-rendered table per subgenre tag; JS chips switch between them.
   Same pattern one level up: one panel per genre, switched by the tabs. */
.mock-body .tagview[hidden] { display: none !important; }
.mock-body .genrepanel[hidden] { display: none !important; }
.mock-body .stephead { margin-top: 0; }
.mock-body .tabs { margin-bottom: 4px; }
.mock-body td.demand { white-space: nowrap; }
/* "Avg" stands in for 0% (at the genre average) — muted so it doesn't compete with the real percentages. */
.mock-body .avgmark { color: var(--bb-slate); font-size: 13px; }
.mock-body .delta { color: var(--bb-slate); }

/* ---- Mobile status bar (created by kdp-keywords.js) ----
   Only exists visually on stacked layouts (<=820px, where the builder
   panel — and #msg with all its feedback — is below the fold). Steady
   state shows the running slot count + a jump link; warn/ok flashes
   mirror the builder messages for ~3s. Desktop never renders it. */
.mock-body .mobilebar { display: none; }
@media (max-width: 820px) {
  /* Floating pill, not flush chrome: a bottom-flush bar's height couples to
     Safari's dynamic toolbar (safe-area inset is ~34pt with the toolbar
     minimized, ~0 expanded), producing a tall empty apron under the text in
     one state and a squashed bar in the other. Insetting the pill decouples
     it — the safe-area math moves the gap UNDER the pill, never its shape. */
  .mock-body .mobilebar {
    position: fixed;
    left: calc(12px + env(safe-area-inset-left, 0px));
    right: calc(12px + env(safe-area-inset-right, 0px));
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 900; /* under the fixed header (1000), over content */
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--bb-ink);
    color: #fff;
    padding: 10px 12px 10px 16px;
    border-radius: 12px;
    font-size: 13.5px;
    box-shadow: 0 2px 12px rgba(33, 43, 50, .28);
    transition: transform .18s ease, opacity .18s ease;
  }
  /* tucked away while the page is actively scrolling (see kdp-keywords.js):
     iOS Safari's collapsing toolbar squashes fixed-bottom elements
     mid-transition, so the bar hides during the swipe and slides back
     once scrolling settles */
  .mock-body .mobilebar.scrolling,
  .mock-body .mobilebar.at-builder,
  .mock-body .mobilebar.fadeout {
    /* fade in place — do NOT translate below the viewport: with
       viewport-fit=cover the page extends under Safari's toolbar, and
       Safari tints its chrome by sampling that zone. A flash-green pill
       parked there turned the whole toolbar green (Rick's screenshot,
       8/13), and the tint lingers after the pill returns.
       .at-builder: the pill is redundant while the builder panel itself
       is on screen (IntersectionObserver in kdp-keywords.js). */
    transform: translateY(6px) scale(.98);
    opacity: 0;
    pointer-events: none;
  }
  .mock-body .mobilebar[hidden] { display: none; }
  .mock-body .mobilebar.warn { background: var(--bb-red-dark); }
  .mock-body .mobilebar.ok { background: var(--bb-green); }
  .mock-body .mobilebar .mb-jump {
    flex-shrink: 0;
    background: #fff;
    color: var(--bb-ink);
    border: none;
    border-radius: 4px;
    font-family: inherit;
    font-weight: 700;
    font-size: 12.5px;
    padding: 9px 14px; /* ~36px tall — comfortable thumb target */
    cursor: pointer;
  }
  /* keep the page footer / last slot reachable above the pill */
  .mock-body.has-mobilebar { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }

  /* Thumb targets: "Clear all" and the slot ✕ are dense desktop
     affordances. Pad their hit areas to ~44px and cancel the growth with
     negative margins so the layout doesn't shift — invisible padding,
     bigger target. Slightly larger glyph/text too. */
  .mock-body .clearlink {
    font-size: 13px;
    padding: 12px 4px 12px 12px;
    margin: -12px 0;
  }
  .mock-body .slot .x {
    font-size: 15px;
    padding: 12px 10px;
    margin: -12px -6px -12px -4px;
  }
}

/* In-page anchors land below the fixed header */
.mock-body [id] { scroll-margin-top: calc(84px + env(safe-area-inset-top, 0px)); }

/* Visually hidden, available to crawlers and screen readers */
.mock-body .screen-reader-text {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
