/* The free route planner: the Route Planner engine on /tools/route-optimiser/, plan "free" (one engine for every tier,
   Dan 21 Nov 2026). Loaded only by AppHead plan="free"; every rule sits under html.rp-free, so the app is unchanged.

   route-planner.css is written for a whole-window app (#app-container, the bottom sheet and the modals are
   position: fixed; the site header is fixed and the footer hidden). Here the app sits in one box on a normal page with
   the SEO text and footer below it. The box has a transform, which makes it the containing block for every fixed
   element inside it: the sheet, the map and the app's own modals stay in the box and scroll away with it. */

html.rp-free header { position: relative; }
html.rp-free footer { display: block !important; }
html.rp-free main { padding: 0 !important; margin: 0 !important; max-width: none !important; }

/* The sheet sits at the top of the box. route-planner.css puts it 73px down, under the whole-window app's fixed site
   header; here the header is above the box, so those 73px were a white gap over "Plan a round" (Dan, 23 Nov). */
@media (min-width: 768px) { html.rp-free .bottom-sheet { top: 0 !important; padding-top: 16px; box-sizing: border-box; } }
/* Round planned, on a computer: the heading says "2 stops · 10.2 mi" in large type, so the small bar above it saying
   the same was a second copy sitting on the heading (Dan, 23 Nov). The bar stays whenever it carries a warning (late,
   unrouted, times unchecked: .rp-summary-warn), and while planning (Cancel lives there). The phone keeps it: there it
   is the sheet's handle, the line you see with the sheet lowered. */
@media (min-width: 768px) {
  html.rp-free #bottom-sheet:has(#panel-stops:not([style*="none"])) #sheet-summary:not(:has(.rp-summary-warn)):not(:has(#btnCancelSolve:not([style*="none"]))) { display: none; }
}
/* the heading clear of the bar on the phone, with the sheet scrolled to the top */
html.rp-free #panel-stops > .rpn-planned-head { padding-top: 6px; }

html.rp-free .rpf-app-box { position: relative; transform: translateZ(0); overflow: hidden;
  /* the space left on screen under the site header and the band (--rpf-above: measured by the page, 23 Nov), so the whole
     planner fits a laptop screen without scrolling */
  height: calc(100vh - var(--rpf-above, 170px)); height: calc(100dvh - var(--rpf-above, 170px)); min-height: 480px; max-height: 1000px;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
html.rp-free #app-container { position: absolute; top: 0 !important; left: 0; right: 0; bottom: 0; }
/* the in-app account button and its menu have no use without an account */
html.rp-free #btnUserMenu, html.rp-free #user-menu, html.rp-free .user-menu { display: none !important; }
/* saved routes, saved defaults: an account's; Save route shows locked on Round planned instead */
html.rp-free #btnSavedRoutes, html.rp-free .saved-routes-wrap, html.rp-free .save-default-row { display: none !important; }
html.rp-free .save-route-hint { display: none; }

/* ===== Open in Maps: every stop, in sections ===== */
html.rp-free .rpf-handoff { margin: 0 0 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 16px; background: var(--card); }
html.rp-free .rpf-handoff[hidden] { display: none; }
html.rp-free .rpf-handoff-title { margin: 0 0 8px; font-weight: 700; font-size: 1rem; color: var(--text); }
html.rp-free .rpf-handoff-links { display: flex; flex-direction: column; gap: 6px; }
html.rp-free .rpf-handoff-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
html.rp-free .rpf-handoff-span { flex: 1 0 100%; font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }
html.rp-free .rpf-handoff-link { flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 12px;
  border-radius: 12px; font-weight: 700; text-decoration: none; box-sizing: border-box; }
html.rp-free .rpf-handoff-google { background: var(--primary, #2563eb); color: #fff; }
html.rp-free .rpf-handoff-apple { background: #1c1c1e; color: #fff; }
html.rp-free .rpf-handoff-link:hover { filter: brightness(1.08); }
/* the offer under the planned round (Dan, 26 Nov 2026): what Pro adds, the price, one trial button, the email way in */
html.rp-free .rpf-result-card { margin: 0 0 10px; padding: 14px 16px; border: 1px solid rgba(37, 99, 235, 0.35); border-radius: 16px;
  background: rgba(37, 99, 235, 0.06); color: var(--text); }
html.rp-free .rpf-result-card[hidden] { display: none; }
html.rp-free .rpf-result-card h3 { margin: 0 0 4px; font-size: 1.08rem; line-height: 1.3; font-weight: 700; color: var(--text); }
html.rp-free .rpf-rc-lead { margin: 0 0 6px; font-size: 0.95rem; line-height: 1.45; color: var(--text); }
html.rp-free .rpf-rc-price { margin: 0 0 12px; font-size: 0.86rem; line-height: 1.45; color: var(--text-muted); }
html.rp-free .rpf-rc-go { display: flex; align-items: center; justify-content: center; width: 100%; box-sizing: border-box; min-height: 48px;
  text-decoration: none; font-weight: 700; font-size: 1rem; }
html.rp-free .rpf-rc-email, .rpf-lock-email { display: block; margin: 10px 0 0; text-align: center; font-size: 0.9rem; font-weight: 600;
  color: var(--primary, #2563eb); text-decoration: underline; text-underline-offset: 2px; }
html.rp-free .rpf-rc-go:focus-visible, html.rp-free .rpf-rc-email:focus-visible, .rpf-lock-email:focus-visible { outline: 3px solid var(--primary, #2563eb); outline-offset: 2px; }

/* ===== Locks: the facelift's lock look (blue tint, a small lock, a tag) ===== */
html.rp-free .rpf-locked-btn { position: relative; }
html.rp-free #btnStartNav.rpf-locked-btn,
html.rp-free .btn-save-route.rpf-locked-btn { background: rgba(37, 99, 235, 0.06); color: var(--text); border: 1px solid rgba(37, 99, 235, 0.3); box-shadow: none; }
/* a padlock, not a box (Dan, 23 Nov: the old CSS box read as a small blue rectangle): the lock icon as a mask, in the blue */
html.rp-free #btnStartNav.rpf-locked-btn::before,
html.rp-free .btn-save-route.rpf-locked-btn::before,
html.rp-free .rpf-lock-ic { content: ""; display: inline-block; width: 16px; height: 16px; margin-right: 6px; vertical-align: -3px; flex: 0 0 16px;
  background-color: var(--primary, #2563eb);
  -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.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%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.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") center / contain no-repeat; }
/* Start round's own icon is a play triangle drawn with borders (new-look.css): none under the padlock */
html.rp-free.rp-new-look #btnStartNav.rpf-locked-btn::before { border: 0; }
html.rp-free .rpf-locks { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
html.rp-free .rpf-locks[hidden] { display: none; }
html.rp-free .rpf-locked-row { display: flex; align-items: center; gap: 8px; width: 100%; box-sizing: border-box; min-height: 46px; padding: 10px 14px;
  border: 1px solid rgba(37, 99, 235, 0.25); border-radius: 12px; background: rgba(37, 99, 235, 0.05); color: var(--text);
  font: inherit; font-size: 0.95rem; font-weight: 600; text-align: left; cursor: pointer; }
html.rp-free .rpf-locked-row:hover { background: rgba(37, 99, 235, 0.1); }
html.rp-free .rpf-locked-text { flex: 1 1 auto; min-width: 0; }
html.rp-free .rpf-locked-tag { flex: 0 0 auto; font-size: 0.75rem; font-weight: 700; color: var(--primary, #2563eb); text-transform: uppercase; letter-spacing: 0.03em; }
html.rp-free .rpf-more-premium { border: 1px solid var(--border); border-radius: 12px; padding: 0 10px; }
html.rp-free .rpf-more-premium summary { min-height: 44px; display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; color: var(--text); list-style: none; padding-right: 4px; }
html.rp-free .rpf-more-premium summary::-webkit-details-marker { display: none; }
html.rp-free .rpf-more-premium .rpf-more-title { flex: 1 1 auto; }
html.rp-free .rpf-more-premium .rpf-more-count { font-weight: 500; font-size: 0.88rem; color: var(--text-muted); }
/* the chevron: points down when closed, up when open */
html.rp-free .rpf-more-premium summary::after { content: ""; flex: 0 0 8px; width: 8px; height: 8px; margin: -4px 6px 0 0; border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted); transform: rotate(45deg); }
html.rp-free .rpf-more-premium[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
html.rp-free .rpf-more-premium summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 8px; }
html.rp-free .rpf-more-premium[open] { padding-bottom: 10px; }
html.rp-free .rpf-more-premium .rpf-locked-row + .rpf-locked-row { margin-top: 6px; }

/* The upsell pop-up (Dan, 23 Nov 2026), appended to body so it covers the window. Computer: about 960px (inside the
   window), two columns, the guide video the larger (about 59%) on the left and what the feature does on the right.
   Phone: a bottom sheet, video on top. */
.rpf-lock-modal { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(15, 23, 42, 0.6); box-sizing: border-box; }
.rpf-lock-modal[hidden] { display: none; }
html.rpf-up-open, html.rpf-up-open body { overflow: hidden; }
.rpf-up-card { position: relative; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 28px; align-items: start;
  width: 100%; max-width: 960px; max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); overflow: auto; box-sizing: border-box;
  padding: 26px; border-radius: 18px; background: var(--card, #fff); color: var(--text, #111827); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); }
.rpf-up.rpf-up-novideo .rpf-up-card { grid-template-columns: minmax(0, 1fr); max-width: 420px; }
.rpf-up.rpf-up-novideo .rpf-up-media { display: none; }
.rpf-up-close { position: absolute; top: 8px; right: 8px; z-index: 2; width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; font-size: 26px; line-height: 1; color: var(--text-muted, #64748b); cursor: pointer; }
.rpf-up-close:hover { background: var(--bg-secondary, #f1f5f9); color: var(--text, #111827); }
.rpf-up-close:focus-visible, .rpf-up-play:focus-visible, .rpf-up-guide:focus-visible, .rpf-up .rpf-lock-go:focus-visible { outline: 3px solid var(--primary, #2563eb); outline-offset: 2px; }
.rpf-up-media { min-width: 0; }
.rpf-up-frame { position: relative; aspect-ratio: 16 / 9; width: 100%; overflow: hidden; border-radius: 12px; background: #000; }
.rpf-up-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.rpf-up-play { position: absolute; inset: 0; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: #000; cursor: pointer; }
.rpf-up-play img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* a round play button in the thumbnails' clear space, between the bullet list and the phone (both thumbnails keep
   it free), so it covers neither the title nor the phone */
.rpf-up-btn { position: absolute; left: 52%; top: 75%; display: flex; align-items: center; justify-content: center; width: 58px; height: 58px;
  margin: -29px 0 0 -29px; border-radius: 50%; background: #fff; color: var(--primary, #2563eb); box-shadow: 0 3px 12px rgba(15, 23, 42, 0.22);
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease; }
.rpf-up-btn svg { margin-left: 3px; }
.rpf-up-play:hover .rpf-up-btn { transform: scale(1.06); background: var(--primary, #2563eb); color: #fff; }
@media (prefers-reduced-motion: reduce) { .rpf-up-btn { transition: none; } .rpf-up-play:hover .rpf-up-btn { transform: none; } }
.rpf-up-chapter { margin: 10px 0 2px; font-size: 0.88rem; line-height: 1.4; color: var(--text, #111827); }
.rpf-up-guide { font-size: 0.88rem; color: var(--primary, #2563eb); }
.rpf-up-body { min-width: 0; padding-top: 4px; }
.rpf-up-kicker { margin: 0 44px 6px 0; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--primary, #2563eb); }
.rpf-up-card h3 { margin: 0 36px 12px 0; font-size: 1.45rem; line-height: 1.2; letter-spacing: -0.01em; color: var(--text, #111827); }
.rpf-up-points { margin: 0 0 18px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; }
.rpf-up-points li { position: relative; padding-left: 26px; font-size: 0.97rem; line-height: 1.45; color: var(--text, #111827); }
.rpf-up-points li::before { content: ""; position: absolute; left: 0; top: 3px; width: 16px; height: 16px; background-color: var(--primary, #2563eb);
  -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='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-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='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat; }
.rpf-lock-go { display: flex; align-items: center; justify-content: center; min-height: 50px; text-decoration: none; font-weight: 700; font-size: 1.02rem; }
.rpf-up .rpf-lock-go { display: flex; width: 100%; box-sizing: border-box; }
.rpf-up-card:focus { outline: none; }
.rpf-lock-note { margin: 10px 0 0; font-size: 0.84rem; line-height: 1.45; color: var(--text-muted, #64748b); }
.rpf-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 640px) {
  .rpf-lock-modal { align-items: flex-end; padding: 0; }
  .rpf-up-card { grid-template-columns: minmax(0, 1fr); gap: 16px; max-width: none; max-height: 100vh; max-height: 100dvh;
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px)); border-radius: 20px 20px 0 0; }
  .rpf-up.rpf-up-novideo .rpf-up-card { max-width: none; }
  .rpf-up-media { margin-top: 30px; }
  .rpf-up-card h3 { font-size: 1.3rem; }
}
