/* The four menus of the bar (includes/patly-menu.php): Products, Overview, Pricing and Resources.

   One row everywhere: an icon, a name and up to two lines under it, the same height in every menu. Columns have one
   width in all four. Products spans the bar, from the name to the last button; Overview, Pricing and Resources, two
   columns each, hang from its right edge, so all four end on the same line. The bar links this file itself, with the time the file last
   changed in its address, so a browser never pairs a new menu with an old copy of these rules.

   Every rule is written ".nav ." on purpose, as in patly-nav.css: two of the pages carry a ".nav div{display:flex}"
   rule of their own, which outranks a plain class selector. */

/* ---- where a panel sits: against the bar, not against its own label */
header .nav{position:relative}
.nav .pnav.pn-products,.nav .pnav.pn-overview,.nav .pnav.pn-pricing,.nav .pnav.pn-resources{position:static}
.nav .pnav-menu.pm-products,.nav .pnav-menu.pm-overview,.nav .pnav-menu.pm-pricing,.nav .pnav-menu.pm-resources{
  top:calc(50% + 28px);left:24px;right:24px;width:auto;margin:0;padding:16px 16px 14px}
/* two columns of the width the wide menu gives each of its three */
.nav .pnav-menu.pm-overview,.nav .pnav-menu.pm-pricing,.nav .pnav-menu.pm-resources{left:auto;width:calc((100% - 106px) * 2 / 3 + 46px)}
/* the examiner's signed-in bar is wider than the site's: its Products menu keeps the site's width, from the right */
header.app .nav .pnav-menu.pm-products{left:auto;right:24px;width:1092px;max-width:calc(100% - 48px)}
/* the strip between a label and its panel, which keeps the menu open while the pointer travels down: it reaches up
   into the label on every bar, whatever the height of its links */
.nav .pnav-menu.pm-products::before,.nav .pnav-menu.pm-overview::before,.nav .pnav-menu.pm-pricing::before,.nav .pnav-menu.pm-resources::before{top:-18px;height:18px}
/* that strip runs under the whole bar: the buttons and the account stay above it, so a press on their lower edge is
   theirs even while a menu is open (the account keeps the level its own menu has always had) */
.nav .nav-links .nav-cta,.nav .nav-links a.btn{position:relative;z-index:61}
.nav .acct{position:relative;z-index:70}

/* ---- columns: a name over its rows */
.nav .pm-cols{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0 12px;align-items:start}
.nav .pm-overview .pm-cols,.nav .pm-pricing .pm-cols,.nav .pm-resources .pm-cols{grid-template-columns:repeat(2,minmax(0,1fr));gap:0 12px}
.nav .pm-col{display:block;min-width:0}
.nav .pm-col .pnav-grp{display:block;margin:0;padding:2px 10px 8px;line-height:1.5}
/* a second name in the same column: a line over it sets it apart */
.nav .pm-col .pnav-grp.pm-next{margin-top:8px;padding-top:14px;border-top:1px solid var(--line,rgba(157,175,214,.18))}
/* Each column stacks its rows at their own height, so the space between two rows is the same everywhere: a row with one
   line of text is not stretched to the height of a row with two. */
/* A window too short for a menu scrolls its rows, since the bar stays put and the page cannot bring the rest into
   view. The links under the rows stay in place. */
.nav .pm-products .pm-cols,.nav .pm-overview .pm-cols,.nav .pm-pricing .pm-cols{max-height:calc(100vh - 192px);overflow-y:auto;overscroll-behavior:contain}
.nav .pm-resources .pm-cols{max-height:calc(100vh - 152px);overflow-y:auto;overscroll-behavior:contain}

/* ---- a row */
/* a row is as tall as its name and its line, and never shorter than its icon */
.nav .pnav-i.pi{padding:9px 14px 9px 56px;min-height:52px}
.nav .pnav-i.pi::after{content:none}
.nav .pnav-i.pi b{margin:0 0 2px;padding:0;line-height:1.3}
.nav .pnav-i.pi span{line-height:1.4;text-wrap:balance}
.nav .pnav-i .pi-ic{position:absolute;left:10px;top:9px;width:34px;height:34px;border-radius:10px;display:grid;place-items:center;font-style:normal;
  background:rgba(245,179,1,.10);border:1px solid rgba(245,179,1,.18);color:var(--gold,#F5B301);
  transition:background-color .18s ease,color .18s ease,border-color .18s ease,transform .22s cubic-bezier(.2,.8,.2,1)}
.nav .pnav-i .pi-ic svg{display:block;transform:none;opacity:1}
.nav .pnav-i.pi:hover .pi-ic,.nav .pnav-i.pi:focus-visible .pi-ic{background:var(--gold,#F5B301);border-color:var(--gold,#F5B301);color:#0E1A3A;transform:scale(1.06)}
/* a word beside a name, such as Free */
.nav .pnav-i.pi b u{display:inline-block;margin-left:8px;padding:0 7px;border-radius:999px;text-decoration:none;vertical-align:2px;
  font-size:.6rem;font-weight:800;line-height:1.5;letter-spacing:.08em;text-transform:uppercase;white-space:nowrap;
  color:#7DE3AC;background:rgba(78,208,143,.12);border:1px solid rgba(78,208,143,.34)}
/* the row of the page being shown: its icon filled, on a faint ground */
.nav .pnav-i.pi.tag{background:rgba(245,179,1,.06);box-shadow:inset 0 0 0 1px rgba(245,179,1,.2)}
.nav .pnav-i.pi.tag .pi-ic{background:var(--gold,#F5B301);border-color:var(--gold,#F5B301);color:#0E1A3A}
.nav .pnav-i.pi.tag b{padding-right:0}

/* ---- the links under a menu, on one line */
.nav .pm-products .pnav-foot,.nav .pm-overview .pnav-foot,.nav .pm-pricing .pnav-foot{display:flex;flex-wrap:wrap;gap:4px 28px;margin:8px 0 0;padding:12px 10px 0;
  border-top:1px solid var(--line,rgba(157,175,214,.18))}
.nav .pm-products .pnav-foot a,.nav .pm-overview .pnav-foot a,.nav .pm-pricing .pnav-foot a{font-size:.82rem;font-weight:700;line-height:1.5;white-space:nowrap}
.nav .pnav-foot a svg{display:inline-block;margin-left:4px;vertical-align:-2px;transform:none;opacity:1;transition:transform .18s ease}
.nav .pnav-foot a:hover svg,.nav .pnav-foot a:focus-visible svg{transform:translateX(3px)}

/* ---- folded into the stacked menu: every panel opens in place, one row to a line. Written twice: for the width at
   which every bar has folded, and for a page that folds its bar sooner (the script marks the page). */
@media (max-width:1100px){
  .nav .pnav-menu.pm-products,.nav .pnav-menu.pm-overview,.nav .pnav-menu.pm-pricing,.nav .pnav-menu.pm-resources{
    top:auto;left:auto;right:auto;width:auto;max-width:none;padding:2px 0 10px;margin-left:0!important}
  header.app .nav .pnav-menu.pm-products{left:auto;right:auto;width:auto;max-width:none}
  .nav .pm-cols,.nav .pm-products .pm-cols,.nav .pm-overview .pm-cols,.nav .pm-pricing .pm-cols,.nav .pm-resources .pm-cols{display:block;max-height:none;overflow:visible}
  .nav .pm-cols[class*="pm-r"]>.pm-col{display:block}
  .nav .pm-col .pnav-grp{padding:12px 0 6px}
  .nav .pm-col .pnav-grp.pm-gap{display:none}
  .nav .pnav-i.pi{padding:9px 8px 9px 48px;min-height:0}
  .nav .pnav-i .pi-ic{left:0;top:9px}
  .nav .pnav-i.pi.tag{background:none;box-shadow:none}
  .nav .pm-products .pnav-foot,.nav .pm-overview .pnav-foot,.nav .pm-pricing .pnav-foot{gap:0 22px;margin-top:6px;padding:10px 0 0}
  .nav .pm-products .pnav-foot a,.nav .pm-overview .pnav-foot a,.nav .pm-pricing .pnav-foot a{white-space:normal}
}
.nav-folded .nav .pnav-menu.pm-products,.nav-folded .nav .pnav-menu.pm-overview,.nav-folded .nav .pnav-menu.pm-pricing,.nav-folded .nav .pnav-menu.pm-resources{
  top:auto;left:auto;right:auto;width:auto;max-width:none;padding:2px 0 10px;margin-left:0!important}
.nav-folded header.app .nav .pnav-menu.pm-products{left:auto;right:auto;width:auto;max-width:none}
.nav-folded .nav .pm-cols,.nav-folded .nav .pm-products .pm-cols,.nav-folded .nav .pm-overview .pm-cols,.nav-folded .nav .pm-pricing .pm-cols,.nav-folded .nav .pm-resources .pm-cols{display:block;max-height:none;overflow:visible}
.nav-folded .nav .pm-cols[class*="pm-r"]>.pm-col{display:block}
.nav-folded .nav .pm-col .pnav-grp{padding:12px 0 6px}
.nav-folded .nav .pm-col .pnav-grp.pm-gap{display:none}
.nav-folded .nav .pnav-i.pi{padding:9px 8px 9px 48px;min-height:0}
.nav-folded .nav .pnav-i .pi-ic{left:0;top:9px}
.nav-folded .nav .pnav-i.pi.tag{background:none;box-shadow:none}
.nav-folded .nav .pm-products .pnav-foot,.nav-folded .nav .pm-overview .pnav-foot,.nav-folded .nav .pm-pricing .pnav-foot{gap:0 22px;margin-top:6px;padding:10px 0 0}
.nav-folded .nav .pm-products .pnav-foot a,.nav-folded .nav .pm-overview .pnav-foot a,.nav-folded .nav .pm-pricing .pnav-foot a{white-space:normal}

/* ================================================================================================================
   The stacked menu of a phone or a tablet, in full. The bar's script marks the page (nav-folded) and says when the
   sheet is open (nav-open). A row of the first level is a label with its arrow at the far edge; a tap opens its
   section and a second tap closes it; inside, a row is an icon, a name and a line, large enough for a finger.
   ================================================================================================================ */
/* the button: three bars that cross into an X while the sheet is open, in a square a finger can find */
.nav .nav-toggle{box-sizing:border-box;min-width:44px;min-height:44px;margin-right:-10px;padding:13px 11px;border-radius:10px;-webkit-tap-highlight-color:transparent}
.nav .nav-toggle span{transition:transform .22s cubic-bezier(.2,.8,.2,1),opacity .15s ease}
.nav .nav-toggle[aria-expanded="true"] span:nth-child(1){transform:translateY(7px) rotate(45deg)}
.nav .nav-toggle[aria-expanded="true"] span:nth-child(2){opacity:0}
.nav .nav-toggle[aria-expanded="true"] span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}
.nav .nav-toggle:focus-visible{outline:2px solid var(--gold,#F5B301);outline-offset:2px}

/* the sheet: under the bar, as tall as the screen allows (the script sets the height), scrolling inside itself */
.nav-folded .nav .nav-links{box-sizing:border-box;padding:2px 20px calc(22px + env(safe-area-inset-bottom,0px));max-height:calc(100vh - 72px);max-height:calc(100dvh - 72px);
  overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;box-shadow:0 36px 60px -26px rgba(2,6,18,.8)}
.nav-folded .nav .nav-links.open{animation:pm-sheet .2s ease both}
@keyframes pm-sheet{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}
/* what is still in view under a short sheet is dimmed, so the sheet reads as the layer in front; the bar above it is left as it is */
@supports (clip-path:inset(0 -1px -1px -1px)){
  .nav-folded .nav .nav-links.open{box-shadow:0 36px 60px -26px rgba(2,6,18,.8),0 0 0 100vmax rgba(4,8,20,.64);clip-path:inset(0 -100vmax -100vmax -100vmax)}
}
/* the page holds still under an open sheet, and the assistant's button steps aside */
@media (hover:none){html.nav-open,html.nav-open body{overflow:hidden}}
html.nav-open .pas-launch{display:none}

/* the first level: a label, and its arrow at the far edge; a hairline between rows */
.nav-folded .nav .nav-links>li{border-bottom:1px solid var(--line,rgba(157,175,214,.16))}
.nav-folded .nav .nav-links>li.nav-cta,.nav-folded .nav .nav-links>li.acct,.nav-folded .nav .nav-links>li:last-child{border-bottom:0}
.nav-folded .nav .nav-links>li>a:not(.nbtn):not(.btn){display:flex;align-items:center;justify-content:space-between;gap:12px;box-sizing:border-box;min-height:56px;padding:6px 0;
  font-size:1.08rem;font-weight:800;line-height:1.25;color:var(--ink,#EAF0FC);-webkit-tap-highlight-color:transparent}
.nav-folded .nav .pnav>a svg{width:14px;height:9px;margin-right:3px;opacity:.75}
.nav-folded .nav .pnav.open>a{color:var(--gold,#F5B301)}
.nav-folded .nav .pnav.open>a svg{opacity:1}
/* the two buttons close the sheet, with air above them */
.nav-folded .nav .nav-links>li.nav-cta{margin-top:16px}
.nav-folded .nav .nav-links>li.nav-cta+li.nav-cta{margin-top:10px}
.nav-folded .nav .nav-links a.nbtn{min-height:50px;border-radius:12px;font-size:1.02rem}

/* the arrow follows the section, not the finger that last touched the label */
.nav-folded .nav .pnav:hover>a svg{transform:none}
.nav-folded .nav .pnav.open>a svg{transform:rotate(180deg)}
/* on a screen with no pointer, a row that was touched does not stay lit */
@media (hover:none){
  .nav .pnav-i:not(.tag):hover b{color:var(--ink,#EAF0FC)}
  .nav .pnav-i:hover span{color:var(--muted,#9DAFD6)}
  .nav .pnav-i.pi:not(.tag):hover .pi-ic{background:rgba(245,179,1,.10);border-color:rgba(245,179,1,.18);color:var(--gold,#F5B301);transform:none}
  .nav .pnav-i:hover::before,.nav .pnav-i:hover::after{opacity:0}
  .nav .pnav-i:hover{box-shadow:none}
}

/* an open section */
.nav-folded .nav .pnav.open>.pnav-menu{padding:0 0 14px;animation:pm-sect .22s ease both}
@keyframes pm-sect{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:none}}
.nav-folded .nav .pm-col .pnav-grp{padding:14px 0 6px;font-size:.66rem;opacity:.8}
.nav-folded .nav .pm-col:first-child>.pnav-grp:first-child{padding-top:0}
.nav-folded .nav .pm-col .pnav-grp.pm-next{margin-top:0;padding-top:14px;border-top:0}
/* a row: the place to press runs a little past the words on both sides, and answers the finger */
.nav-folded .nav .pnav-i.pi{margin:0 -10px;padding:10px 12px 10px 58px;border-radius:12px;min-height:54px;box-sizing:border-box;-webkit-tap-highlight-color:transparent}
.nav-folded .nav .pm-overview .pnav-i.pi{padding-right:12px}
.nav-folded .nav .pnav-i .pi-ic{left:10px;top:10px;width:36px;height:36px;border-radius:11px}
.nav-folded .nav .pnav-i.pi b{margin-bottom:3px;font-size:1rem;line-height:1.3}
.nav-folded .nav .pnav-i.pi span{font-size:.87rem;line-height:1.45}
.nav-folded .nav .pnav-i.pi:active{background:rgba(245,179,1,.09)}
.nav-folded .nav .pnav-i.pi.tag b{color:var(--gold,#F5B301)}
/* the links under a section: rounded, side by side, wrapping when they must */
.nav-folded .nav .pm-products .pnav-foot,.nav-folded .nav .pm-overview .pnav-foot,.nav-folded .nav .pm-pricing .pnav-foot{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 0;padding:14px 0 0;border-top:1px solid var(--line,rgba(157,175,214,.16))}
.nav-folded .nav .pm-products .pnav-foot a,.nav-folded .nav .pm-overview .pnav-foot a,.nav-folded .nav .pm-pricing .pnav-foot a{display:inline-flex;align-items:center;box-sizing:border-box;min-height:40px;padding:0 14px;border:1px solid rgba(157,175,214,.3);border-radius:999px;
  font-size:.87rem;font-weight:700;line-height:1.2;color:var(--body,#C4D0EC);white-space:nowrap}
.nav-folded .nav .pm-products .pnav-foot a:active,.nav-folded .nav .pm-overview .pnav-foot a:active,.nav-folded .nav .pm-pricing .pnav-foot a:active{border-color:var(--gold,#F5B301);color:var(--gold,#F5B301)}

/* the account and the Explore menu of a signed-in bar: rows of the first level like the others, their arrows at the far
   edge, and inside them rows a finger can press */
.nav-folded .nav .acct{margin-top:0;padding-top:0;border-top:0}
.nav-folded .nav .nav-links>li.acct{border-bottom:1px solid var(--line,rgba(157,175,214,.16))}
.nav-folded .nav .acct-btn{box-sizing:border-box;min-height:62px;padding:8px 0;-webkit-tap-highlight-color:transparent}
.nav-folded .nav .acct-btn .acct-chev{width:14px;height:9px;margin-right:3px;opacity:.75}
.nav-folded .nav .acct.open .acct-btn .acct-chev{opacity:1}
.nav-folded .nav .acct.xp .xp-btn{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:56px;padding:6px 0;font-size:1.08rem;font-weight:800;line-height:1.25;color:var(--ink,#EAF0FC)}
.nav-folded .nav .acct.xp .xp-btn .acct-chev{margin-left:auto;margin-right:3px}
.nav-folded .nav .acct.xp.open .xp-btn{color:var(--gold,#F5B301)}
.nav-folded .nav .acct.open .acct-menu{padding:0 0 12px;animation:pm-sect .22s ease both}
.nav-folded .nav .acct-quick{grid-template-columns:minmax(0,1fr);gap:8px;padding:2px 0 6px}
.nav-folded .nav .acct-q{min-height:46px;padding:0 14px;border-radius:12px;font-size:.96rem}
.nav-folded .nav .acct-q svg{width:16px;height:16px}
/* in the account's own pages the sheet already ends on the same New examination button: it is shown once */
.nav-folded header.app .nav .acct-quick .acct-q.pri{display:none}
.nav-folded header.app .nav .acct-quick{padding:0}
.nav-folded header.app .nav .acct-quick .acct-q:not(.pri){margin:2px 0 6px}
.nav-folded .nav .acct-grp{padding:14px 0 4px;font-size:.66rem;opacity:.8}
.nav-folded .nav .acct-i{box-sizing:border-box;min-height:46px;margin:0 -10px;padding:10px;width:calc(100% + 20px);border-radius:12px;font-size:1rem;gap:14px;-webkit-tap-highlight-color:transparent}
.nav-folded .nav .acct-i svg{width:19px;height:19px}
.nav-folded .nav .acct-i:active{background:rgba(245,179,1,.09)}
.nav-folded .nav .acct-out{margin:8px 0 0;padding:8px 0 0}
@media (min-width:720px){
  .nav-folded .nav .acct-quick{grid-template-columns:repeat(2,minmax(0,280px))}
}

/* a tablet has the width for two columns of rows (three for the products once there is room) */
@media (min-width:720px){
  .nav-folded .nav .nav-links{padding-left:28px;padding-right:28px}
  .nav-folded .nav .pm-cols,.nav-folded .nav .pm-products .pm-cols,.nav-folded .nav .pm-overview .pm-cols,.nav-folded .nav .pm-pricing .pm-cols,.nav-folded .nav .pm-resources .pm-cols{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 36px;align-items:start}
  .nav-folded .nav .pm-cols[class*="pm-r"]{grid-template-rows:none}
  .nav-folded .nav .pm-cols[class*="pm-r"]>.pm-col{display:block;grid-row:auto}
  .nav-folded .nav .pm-col .pnav-grp.pm-gap{display:block;visibility:hidden}
  .nav-folded .nav .pm-col>.pnav-grp:first-child{padding-top:0}
  .nav-folded .nav .pm-products .pm-col:nth-child(n+3)>.pnav-grp:first-child{padding-top:14px}
}
/* ...and for the two buttons to stand side by side instead of running the width of the screen */
@media (min-width:720px){
  .nav-folded .nav .nav-links.open{flex-direction:row;flex-wrap:wrap;align-items:flex-start;column-gap:12px}
  .nav-folded .nav .nav-links>li{width:100%}
  .nav-folded .nav .nav-links>li.nav-cta,.nav-folded .nav .nav-links>li.nav-cta+li.nav-cta{width:auto;flex:0 1 240px;margin-top:18px}
  .nav-folded header.app .nav .nav-links>li:last-child{width:auto;flex:0 1 240px}
}
@media (min-width:980px){
  .nav-folded .nav .pm-products .pm-cols{grid-template-columns:repeat(3,minmax(0,1fr))}
  .nav-folded .nav .pm-products .pm-col:nth-child(n+3)>.pnav-grp:first-child{padding-top:0}
}

@media (prefers-reduced-motion:reduce){.nav .pnav-i .pi-ic,.nav .pnav-foot a svg,.nav .nav-toggle span{transition:none}.nav-folded .nav .nav-links.open,.nav-folded .nav .pnav.open>.pnav-menu{animation:none}}

/* A statute, rule or MPEP section named in a page's text links to its official text: gold and not underlined, as on the comparison page */
main a[href^="https://www.law.cornell.edu/"],main a[href^="https://www.uspto.gov/web/offices/pac/mpep/"]{color:var(--gold,#F5B301);text-decoration:none;font-weight:700}
main a[href^="https://www.law.cornell.edu/"]:hover,main a[href^="https://www.uspto.gov/web/offices/pac/mpep/"]:hover,main a[href^="https://www.law.cornell.edu/"]:focus-visible,main a[href^="https://www.uspto.gov/web/offices/pac/mpep/"]:focus-visible{color:#FFC83D}
