/* (7 Nov) The site menu: a "Menu" button that opens a panel of links. Shared by every page with a header.
   The home page shows it on phones only (its links are in the top bar on a computer). Every other page shows it on phones and small windows; on a computer (1221px+) its links sit in the top bar like the home page.
   Colours come from the page: --rtm-accent (the "Try it free" button), --rtm-on-accent, and on dark tops --rtm-fg / --rtm-line. */
.rtm{position:relative;flex:none;display:flex;--rtm-accent-d:#5A3DF0}
.rtm-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;min-width:44px;box-sizing:border-box;padding:0 14px 0 12px;border-radius:12px;border:1.5px solid var(--rtm-line,#D9D4F2);background:var(--rtm-btn-bg,transparent);color:var(--rtm-fg,#17142B);font:600 16px 'DM Sans',system-ui,sans-serif;line-height:1;cursor:pointer;-webkit-tap-highlight-color:transparent}
.rtm-btn:hover{border-color:var(--rtm-fg,#17142B)}
.rtm-btn:focus-visible{outline:3px solid var(--rtm-ring,var(--rtm-accent,#5A3DF0));outline-offset:2px}
.rtm-btn svg{width:22px;height:22px;flex:none;display:block}
.rtm-btn .rtm-x{display:none}
.rtm-btn[aria-expanded="true"] .rtm-x{display:block}
.rtm-btn[aria-expanded="true"] .rtm-bars{display:none}
.rtm-panel{position:absolute;right:0;top:calc(100% + 10px);z-index:1000;width:300px;max-width:calc(100vw - 32px);box-sizing:border-box;background:#FFFFFF;color:#17142B;border:1px solid #E2DFF0;border-radius:20px;box-shadow:0 24px 60px rgba(23,20,43,.24);padding:8px;display:flex;flex-direction:column;text-align:left}
.rtm-panel[hidden]{display:none}
.rtm-panel a{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:48px;box-sizing:border-box;padding:0 14px;border-radius:12px;color:#17142B;text-decoration:none;font:600 17px/1.2 'DM Sans',system-ui,sans-serif;white-space:normal}
.rtm-panel > a::after{content:"";width:8px;height:8px;border-right:2px solid #A9A4C2;border-top:2px solid #A9A4C2;transform:rotate(45deg);flex:none;margin-right:4px}
.rtm-panel a:hover{background:#F3F1FB;color:#17142B}
.rtm-panel a:focus-visible{outline:3px solid var(--rtm-accent,#5A3DF0);outline-offset:-3px}
.rtm-panel a[aria-current="page"]{background:#F3F1FB;padding-left:20px}
.rtm-panel a[aria-current="page"]::before{content:"";position:absolute;left:7px;width:4px;height:22px;border-radius:2px;background:var(--rtm-accent,#5A3DF0)}
.rtm-panel > a{position:relative}
.rtm-end{display:flex;gap:8px;margin-top:6px;padding:10px 4px 4px;border-top:1px solid #EDEAF7}
.rtm-end a{flex:1 1 auto;justify-content:center;text-align:center;border:1.5px solid #D9D4F2;padding:0 12px}
.rtm-end a.rtm-try{flex:2 1 auto;background:var(--rtm-accent,#5A3DF0);color:var(--rtm-on-accent,#FFFFFF);border-color:transparent}
.rtm-end a.rtm-try:hover{filter:brightness(.94);background:var(--rtm-accent,#5A3DF0);color:var(--rtm-on-accent,#FFFFFF)}
header.rtm-h .hjoin{margin-left:auto}
/* The home page: the menu button on phones only. */
@media (min-width:761px){.rtm.rtm-ph{display:none}}
/* Phones: just the icon (the button is still called "Menu" for screen readers). */
@media (max-width:480px){.rtm-btn{padding:0;width:44px}.rtm-l{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}}
/* Pages other than home: the top bar (logo, join button, menu) fits on one line down to 320px wide. */
@media (max-width:480px){
  header.rtm-h{padding-left:16px !important;padding-right:16px !important;gap:10px !important}
  header.rtm-h > a:first-child{gap:8px !important;min-width:0}
  header.rtm-h > a:first-child svg{width:30px;height:30px}
  header.rtm-h > a:first-child > span{font-size:19px !important}
  header.rtm-h > a:first-child b{font-size:19px !important}
  header.rtm-h > a:first-child small{font-size:9px !important;letter-spacing:.16em !important}
  header.rtm-h .hjoin{padding:11px 13px !important;font-size:15px !important;margin-left:auto}
  header.rtm-h .nm{display:none}
}
@media (max-width:370px){
  header.rtm-h{padding-left:12px !important;padding-right:12px !important;gap:8px !important}
  header.rtm-h > a:first-child svg{width:26px;height:26px}
  header.rtm-h > a:first-child > span,header.rtm-h > a:first-child b{font-size:17px !important}
  header.rtm-h > a:first-child small{font-size:8px !important;letter-spacing:.12em !important}
  header.rtm-h .hjoin{padding:10px 10px !important;font-size:14px !important}
}
@media (prefers-reduced-motion:no-preference){.rtm-panel:not([hidden]){animation:rtm-in .14s ease-out}@keyframes rtm-in{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}}
/* (7 Nov, Paul) Computers: every page shows the links in the top bar like the home page, no Menu button.
   Same links as the home page's bar (Help and the duplicate join button stay in the phone menu only). */
@media (min-width:1221px){
  .rtm:not(.rtm-ph) .rtm-btn{display:none}
  header.rtm-h > a:first-child{flex:none;white-space:nowrap}
  .rtm:not(.rtm-ph){order:1;margin-left:auto}
  header.rtm-h .hjoin{order:2;margin-left:0}
  .rtm:not(.rtm-ph) .rtm-panel{display:flex;position:static;flex-direction:row;align-items:center;gap:20px;width:auto;max-width:none;padding:0;margin-right:12px;background:none;border:0;border-radius:0;box-shadow:none;animation:none}
  .rtm:not(.rtm-ph) .rtm-panel a,.rtm:not(.rtm-ph) .rtm-end a.rtm-login{min-height:0;padding:0;border:0;border-radius:0;background:none;color:var(--rtm-fg,#17142B);font-family:inherit;font-weight:500;font-size:16px;line-height:1.2;white-space:nowrap;flex:none}
  .rtm:not(.rtm-ph) .rtm-panel a:hover{background:none;color:var(--rtm-fg,#17142B);text-decoration:underline;text-underline-offset:4px}
  .rtm:not(.rtm-ph) .rtm-panel > a::after,.rtm:not(.rtm-ph) .rtm-panel a[aria-current="page"]::before{display:none}
  .rtm:not(.rtm-ph) .rtm-panel a[aria-current="page"]{padding-left:0;text-decoration:underline;text-underline-offset:4px}
  .rtm:not(.rtm-ph) .rtm-end a.rtm-try{display:none}
  /* (19 Nov) The menu got longer when the home page was split into pages: on a computer the top bar keeps the main
     pages (How it works, Prices, Trades, Switching, Getting paid, Help, Log in; u203: Help back, Fable RE-CHECK 43 #1); the rest stay in the phone menu. */
  .rtm:not(.rtm-ph) .rtm-panel > a[href="/"],.rtm:not(.rtm-ph) .rtm-panel > a[href="/founding"],.rtm:not(.rtm-ph) .rtm-panel > a[href="/tools/"],.rtm:not(.rtm-ph) .rtm-panel > a[href="/guides/"]{display:none}
  .rtm:not(.rtm-ph) .rtm-end{display:contents}
}
/* (u203) With Help back in the top bar, the narrowest computer windows close the gaps a little so every header fits. */
@media (min-width:1221px) and (max-width:1320px){.rtm:not(.rtm-ph) .rtm-panel{gap:14px;margin-right:10px}header.rtm-h{gap:12px !important}}
