/* FIND1 (13 Oct 2026): the find box that stays as you scroll, the "You are here" line and "Back to the top", on every long page (findbox.js;
   job FIND1). Colours: only the site's own, from each page's own values so that dark mode follows the
   page (the text navy --ink, the heading blue --sea, the soft blue --sea-soft, the page --surface, the rule --rule, and the amber the site
   already uses to mark what has changed, #E8B03C). The buttons take the shared button look of buttons.css (NAV2) like every other button.
   Source: Gibraltar Treaty Analysis/Build system/findbox.css, copied to public/public/findbox.css by findbox.py. Check: tools/findbox_check.py. */

#fb{box-sizing:border-box;background:var(--surface,#FFFFFF);color:var(--ink,#0E1A33);font:15px/1.35 -apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif}
#fb *{box-sizing:border-box;font-family:inherit}
#fb .fb-row{display:flex;align-items:center;gap:6px}
#fb input#fb-q{flex:1 1 auto;min-width:0;width:100%;min-height:40px;margin:0;padding:6px 10px;border:2px solid var(--ink,#0E1A33);border-radius:4px;
  background:var(--surface,#FFFFFF);color:var(--ink,#0E1A33);font-size:16px;line-height:1.2;-webkit-appearance:none;appearance:none}
#fb input#fb-q::placeholder{color:var(--ink-3,#5F6B82);opacity:1}   /* HOME4D, built by HOME5: the site's standard muted colour (was --ink-2, as dark as typed text); typing hides it */
#fb input#fb-q:focus-visible{outline:3px solid var(--sea,#003399);outline-offset:2px}
#fb input#fb-q::-webkit-search-cancel-button{cursor:pointer}
#fb .fb-n{flex:0 0 auto;min-width:4.6em;text-align:center;font-size:14px;font-weight:700;color:var(--ink,#0E1A33);white-space:nowrap;font-variant-numeric:tabular-nums}
#fb .fb-n:empty{min-width:0}
#fb .fb-b{flex:0 0 auto;width:40px;height:40px;min-width:40px;padding:0;margin:0;font-size:19px;line-height:1;display:inline-flex;align-items:center;justify-content:center}
#fb .fb-b:disabled{opacity:.45;cursor:default}
#fb .fb-sr{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0;padding:0;margin:-1px}
#fb .fb-here{margin:6px 0 0;font-size:13.5px;line-height:1.35;color:var(--ink-2,#3A4660);overflow-wrap:anywhere}   /* TRF1 (16 Oct 2026): no overflow:hidden - the line under the box is never cut off */
#fb .fb-here-l{font-weight:700;color:var(--sea,#003399)}
#fb .fb-here-t{color:var(--ink,#0E1A33)}

/* the matches: every one in a light amber, the one you are on in the full amber; a closed panel that holds a match is marked on its line */
::highlight(fb-all){background-color:rgba(232,176,60,.42)}
::highlight(fb-cur){background-color:#E8B03C;color:#0E1A33}
details.fb-hit:not([open])>summary{box-shadow:inset 5px 0 0 #E8B03C!important}
/* a plain-term box the find box had to open itself (its button has no script on that page, FIND1F1): shown as a box, as on the other pages */
.gl1-box.fb-opened{display:block;margin:8px 0;padding:.6rem .9rem;background:var(--sea-soft,#E8EEF9);border:1px solid var(--sea,#003399);border-radius:8px;
  color:var(--ink,#0E1A33);font:15px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif;font-style:normal;font-weight:400;text-align:left;overflow-wrap:anywhere}
.gl1-box.fb-opened b{font-weight:600;margin-right:.35em}

/* a phone or a narrow window: a bar at the top of the page, under the top bar, that stays as you scroll; the line below it wraps (TRF1) */
@media (max-width:1099.98px){
  #fb{position:-webkit-sticky;position:sticky;top:var(--fb-top,0px);z-index:55;margin:0;padding:6px 10px 6px;border-bottom:2px solid var(--ink,#0E1A33)}
  #fb .fb-here{margin-top:4px;min-height:1.35em}   /* TRF1: the line wraps (it used to keep one line and end in "..."); findbox.js measures the box again when the line changes */
  html:has(body.fb-on){scroll-padding-top:calc(var(--fb-top,0px) + var(--fb-h,0px) + 16px)}
}
/* a computer: at the top of the side menu's column, the menu just below it; the line below has room for two lines (the part, then the question
   or card) and grows if a title is longer; the menu below it follows (TRF1) */
@media (min-width:1100px){
  #fb{position:fixed;left:0;top:var(--fb-top,0px);width:300px;z-index:41;padding:12px 12px 10px 16px;border-right:2px solid var(--ink,#0E1A33);border-bottom:2px solid var(--ink,#0E1A33)}
  #fb .fb-row{flex-wrap:wrap}
  #fb input#fb-q{flex-basis:100%}
  #fb .fb-n{flex:1 1 auto;text-align:left;padding-left:2px}
  #fb .fb-here{min-height:2.7em}
  #fb .fb-here .fb-lv{display:block}   /* TRF1: each part wraps inside the 300px column instead of ending in "..." */
  #fb .fb-here .fb-sep{display:none}
  html body.fb-on nav.sn#sn-menu{top:calc(var(--fb-top,0px) + var(--fb-h,0px));translate:none;bottom:0!important}   /* --fb-top already counts a preview banner */
}

/* APL3F1 (T6; TRG-1119): a page with no side menu (Five things, Ask, Plans, Support, Funding): the bar at the top of the page at every width */
@media (min-width:1100px){
  html body.fb-nomenu #fb{position:-webkit-sticky;position:sticky;left:auto;top:var(--fb-top,0px);width:auto;margin:0;padding:6px 16px;z-index:55;border-right:0;border-bottom:2px solid var(--ink,#0E1A33)}
  html body.fb-nomenu #fb .fb-row{flex-wrap:nowrap;max-width:46rem}
  html body.fb-nomenu #fb input#fb-q{flex-basis:auto}
  html body.fb-nomenu #fb .fb-n{flex:0 0 auto;text-align:center}
  html body.fb-nomenu #fb .fb-here{min-height:1.35em}
  html body.fb-nomenu #fb .fb-here .fb-lv{display:inline}
  html body.fb-nomenu #fb .fb-here .fb-sep{display:inline}
  html:has(body.fb-nomenu){scroll-padding-top:calc(var(--fb-top,0px) + var(--fb-h,0px) + 16px)}
}

#fb-top{/* Back to the top */position:fixed;right:16px;bottom:calc(16px + var(--fb-lift,0px));z-index:56;display:inline-flex;align-items:center;gap:2px;min-height:44px;padding:8px 14px;
  font:700 15px/1.2 -apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif;box-shadow:0 2px 10px rgba(14,26,51,.18)!important}
#fb-top[hidden]{display:none!important}
/* the pages that already have their own "Top" button below 1120px keep it there; this one shows from 1120px */
@media (max-width:1119.98px){body.fb-has-totop #fb-top{display:none!important}}

/* the record cards and numbers on Laws in progress, in the side menu */
.sn a .fb-no{display:inline-block;min-width:1.9em;font-weight:700;color:var(--sea,#003399);font-variant-numeric:tabular-nums}

/* HOME7 (20 Oct 2026, the owner, 20 Oct 03:02, point 2; changed by WID1 below): where the find box and "You are here" sit inside the side menu's column (the front pages and the full-text pages), the column
   scrolls by itself to keep the marked item in view, and the box used to scroll up out of it: its first line was cut off. Now the box stays stuck at the top of the column, whole,
   on its own background (the page's), the column starts under any fixed bar at the top of the page (--fb-top) and ends inside the window, and the list is read below the box
   (sidenav.js keeps the marked item clear of it). Pages whose box is its own fixed bar (the other side-menu pages) are not touched (:has(#fb)). */
@media (min-width:960px){
  html body.fb-on nav.sn#sn-menu:has(#fb){top:calc(var(--fb-top,0px) + 12px)!important;max-height:min(calc(100vh - var(--fb-top,0px) - 24px),var(--fb-room,100vh))!important;bottom:auto!important;translate:none!important;display:flex!important;flex-direction:column;overflow:hidden!important;padding-bottom:0!important}
  html body nav.sn #fb{position:static!important;flex:0 0 auto;z-index:3!important;background:var(--des1-page,var(--page))!important;border-bottom:2px solid var(--line,var(--rule,#DCE2EE))!important;margin-bottom:9px!important}
  /* WID1 (25 Oct 2026; the owner 25 Oct 15:11, "the contents box search is cut off at the top"): the box used to be stuck at the top of the column that scrolled, so the list ran under it and an item
     showed cut off at its lower edge. Now the box is a solid block that does not scroll, and only the list under it scrolls. */
  html body nav.sn:has(#fb) > ul{flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;padding-bottom:0;scroll-snap-type:y mandatory}   /* WID1B3: no extra room under the last item, so the column is as tall as before (a short menu does not grow) */
  html body.fb-on nav.sn:has(#fb) > ul li{scroll-snap-align:start}
  /* WID1B (26 Oct 2026; the owner 25 Oct 15:01, "some text is cut off at the top next to the find box"): the pages whose find panel is its own fixed bar over the top of the menu (the panel and the menu both start under the top bar).
     The menu keeps its top edge where it is; the room under the panel is taken as padding and only the list scrolls below it, so an item no longer runs under the panel's lower edge. */
  html body.fb-on:not(.fb-nomenu) nav.sn#sn-menu:not(:has(#fb)){scroll-snap-type:y mandatory}
  html body.fb-on:not(.fb-nomenu) nav.sn#sn-menu:not(:has(#fb)) li{scroll-snap-align:start}
}
@media (min-width:1100px){
  html body.fb-on.sb-on.has-sn nav.sn#sn-menu:not(:has(#fb)){display:flex!important;flex-direction:column;overflow:hidden!important;scroll-snap-type:none;padding-top:calc(var(--fb-top,0px) + var(--fb-h,0px) - var(--tb-h,60px))!important;padding-bottom:0!important}
  html body.fb-on.sb-on.has-sn nav.sn#sn-menu:not(:has(#fb)) > .sn-title{display:none}   /* it sat under the panel; it stays out of sight rather than appearing between the panel and the list */
  html body.fb-on.sb-on.has-sn nav.sn#sn-menu:not(:has(#fb)) > ul{flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;padding-bottom:5.5rem;scroll-snap-type:y mandatory}   /* WID1B3 (26 Oct 2026): at the end of the list, room for one item below the last, so the list can come to rest on a whole item without an empty column */
}

@media print{#fb,#fb-top{display:none!important}html body.fb-on nav.sn#sn-menu{top:0}}

/* NAV4 (27 Oct 2026): the link back to where the reader was, beside "Back to the front page" (the same look as that button; on the members' fixed band it sits at its own place, and on a phone, where the band has no room for it, on a second line under it). Words are in the script, PROPOSED. */
html .band.sb a#hubprev{font:400 14px/1.1 "Newsreader","Iowan Old Style","Palatino Linotype",Palatino,Georgia,serif;border-radius:8px;padding:9px 11px;text-decoration:none;cursor:pointer;display:inline-flex;align-items:center;min-height:0;height:auto;margin:0;position:static;inset:auto}
@media (max-width:760px){html .band.sb a#hubprev{padding:7px 8px}}
@media (max-width:460px){html .band.sb a#hubprev{padding:8px 10px}}
html body:not(.nav2-admin) a#hubprev{background:var(--des1-navy)!important;color:#FFFFFF!important;border:1px solid var(--des1-band-line)!important;border-radius:8px!important;font-family:var(--des1-serif)!important;font-weight:400!important;text-decoration:none!important;box-shadow:none!important;font-size:14px!important}
@media (hover:hover){html body:not(.nav2-admin) a#hubprev:hover{background:var(--des1-band-hover)!important;border-color:var(--des1-band-line)!important;color:#FFFFFF!important}}
html body:not(.nav2-admin) a#hubprev:focus-visible{outline:3px solid var(--des1-band-focus)!important;outline-offset:2px!important}
a#hubprev.n4-fx{position:fixed;top:6px;z-index:9999;height:32px;padding:0 12px;white-space:nowrap;display:inline-flex;align-items:center;box-sizing:border-box}
html.n4-two a#hubprev.n4-fx{top:50px}
html.n4-two #hubbar{height:88px!important}
html.n4-two body{padding-top:88px!important}
@media print{a#hubprev{display:none!important}}

/* NAV3 (26 Oct 2026): where a jump stops, and the brief mark on the item. The same block is at the end of findbox.css and topbar.css (a page loads one or both; the rules are the same, so they agree).
   One rule instead of three: the room above an item used to be added up from the page's top-bar line, the find box's line, 64 px on the heading (sidenav.css) and 0 to 90 px on the item in the page's own style,
   so a jump stopped 60 to 125 px too low on most pages and under the fixed bar on the front page. Now the room is on the page (scroll-padding-top, so Tab and find-in-page keep their room too) and none is on the item.
   --nav3-off is the bottom of what is stuck at the top of the window (findbox.js sets --fb-top, the fixed bar, and --fb-h, the find box where it is stuck above the text: a phone, a narrow window, and the pages with no side menu) and 12 px.
   It changes no layout: scroll-padding and scroll-margin move nothing. The mark is a shadow, which moves nothing either. */
html{--nav3-off:calc(var(--fb-top,var(--tb-h,0px)) + 12px)}
@media (max-width:1099.98px){
  html{--nav3-off:calc(var(--fb-top,0px) + 12px)}
  html:has(body.fb-on){--nav3-off:calc(var(--fb-top,0px) + var(--fb-h,0px) + 12px)}
}
@media (max-width:1099.98px){html:has(details.toc-m){--nav3-off:calc(var(--fb-top,0px) + 45px + 12px)}}   /* the Contents bar the two Ending-picture pages keep stuck at the top of a phone (45 px high) */
@media (min-width:1100px){html:has(body.fb-nomenu){--nav3-off:calc(var(--fb-top,0px) + var(--fb-h,0px) + 12px)}}
html{scroll-padding-top:var(--nav3-off)!important}
html body [id]{scroll-margin-top:0!important}
/* the mark: a soft tint, and a coloured edge just outside its left side, for about two seconds, then it fades back; the colours are the page's own theme colours (its blue, and a soft mix of that blue), so they follow light and dark;
   with reduced motion there is no fade: a plain outline for two seconds. The tint is a shadow inside the item, so the item keeps its size and nothing moves. */
.nav3-hit{--nav3-edge:var(--sea,var(--link,#003399));--nav3-tint:var(--sea-soft,var(--btn,#E8EEF9));animation:nav3-hit 1.8s ease-out both}
@supports (color:color-mix(in srgb,red,blue)){.nav3-hit{--nav3-tint:color-mix(in srgb,var(--nav3-edge) 18%,transparent)}}
@keyframes nav3-hit{
  0%,35%{box-shadow:-6px 0 0 0 var(--nav3-edge),inset 0 0 0 999px var(--nav3-tint)}
  100%{box-shadow:-6px 0 0 0 transparent,inset 0 0 0 999px transparent}
}
@media (prefers-reduced-motion:reduce){.nav3-hit{animation:none;outline:3px solid var(--nav3-edge);outline-offset:2px}}

/* SFX2A (1 Nov 2026; the owner 1 Nov 15:54 and his read-back answers; colours: the page's own, none added) */
/* F: on a phone a long "You are here" line shows two lines, and "Read more" (Ver más) opens it in full; a computer is unchanged */
@media (max-width:699.98px){
  html body #fb .fb-here.fb-fold{display:flex;align-items:flex-end;gap:6px}
  html body #fb .fb-here.fb-fold:not(.fb-open) .fb-here-t{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
  html body #fb .fb-here.fb-fold .fb-here-t{flex:1 1 auto;min-width:0}
  html body #fb .fb-more{flex:none;margin:0;padding:2px 4px;border:0;background:none;color:var(--sea,#003399);font:inherit;font-weight:600;text-decoration:underline;text-underline-offset:2px;cursor:pointer}
  html body #fb .fb-more:focus-visible{outline:2px solid var(--sea,#003399);outline-offset:2px}
}
/* K: a page whose side menu starts below the first screen keeps the find bar under the top bar (findbox.js adds fb-high): the bar looks as it does on a page with no side menu */
@media (min-width:1100px){
  html body.fb-high #fb{position:-webkit-sticky;position:sticky;left:auto;top:var(--fb-top,0px);width:auto;margin:0;padding:6px 16px;z-index:55;border-right:0;border-bottom:2px solid var(--ink,#0E1A33)}
  html body.fb-high #fb .fb-row{flex-wrap:nowrap;max-width:46rem}
  html body.fb-high #fb input#fb-q{flex-basis:auto}
  html body.fb-high #fb .fb-n{flex:0 0 auto;text-align:center}
  html body.fb-high #fb .fb-here{min-height:1.35em}
  html body.fb-high #fb .fb-here .fb-lv{display:inline}
  html body.fb-high #fb .fb-here .fb-sep{display:inline}
  html:has(body.fb-high){scroll-padding-top:calc(var(--fb-top,0px) + var(--fb-h,0px) + 16px)}
}
