/* The website's top bar, menus and footer (#916, #917, #923, Website915_1 board, Ed 2 Dec), on every page.
   Colours come from the page's own stylesheet (web.css, or site.css on pages not yet redesigned), so it
   follows Light and Dark the same way. No scripts needed: the menus open on hover, on focus and on tap;
   site.js only adds the floating look once you scroll. */

/* The top bar: no background or line on the first screen; once you scroll, a rounded floating bar. */
header.bar { position: sticky; top: 0; z-index: 20; height: 76px; padding: 10px 16px 0; pointer-events: none; }
header.bar .in { pointer-events: auto; max-width: 1312px; height: 56px; margin: 0 auto; display: flex; align-items: center; gap: 30px; padding: 0 12px 0 24px; border-radius: 18px;
  transition: max-width .3s ease, background-color .3s ease, box-shadow .3s ease; }
header.bar.scrolled .in { max-width: 1120px; background: var(--bar, rgba(44,44,46,.62)); -webkit-backdrop-filter: saturate(1.6) blur(20px); backdrop-filter: saturate(1.6) blur(20px); box-shadow: 0 10px 30px var(--shadow, rgba(0,0,0,.35)); }
header.bar .home { display: flex; flex: none; }
header.bar .home img { height: 22px; width: auto; display: block; }
header.bar .links { display: flex; align-items: center; gap: 4px; height: 100%; }
header.bar .it { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 10px; font-size: 15px; font-weight: 500; color: var(--muted2, rgba(235,235,245,.82)); text-decoration: none; }
header.bar .it:hover, header.bar .it[aria-current="page"], header.bar .dd:focus-within > .it { color: var(--text); }
header.bar .it .chev { width: 10px; height: 10px; opacity: .6; transition: transform .2s ease; }
header.bar .end { margin-left: auto; display: flex; align-items: center; gap: 12px; }

/* The drop-downs: a floating card under the name. Opens after a short hover (so passing over it doesn't),
   stays open while the pointer moves into it, and on keyboard focus. Clicking the name opens its page. */
.dd { position: relative; height: 100%; display: flex; align-items: center; }
.dd .panel { position: absolute; top: 100%; left: -14px; padding-top: 10px; opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .16s ease .14s, transform .16s ease .14s, visibility 0s linear .3s; }
.dd:hover .panel, .dd:focus-within .panel { opacity: 1; visibility: visible; transform: none; transition: opacity .16s ease .12s, transform .16s ease .12s, visibility 0s linear .12s; }
.dd:hover > .it .chev, .dd:focus-within > .it .chev { transform: rotate(180deg); }
.dd .card { display: grid; grid-auto-flow: column; grid-auto-columns: 250px; gap: 6px; padding: 12px; border-radius: 20px; background: var(--menu, rgba(44,44,46,.94));
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); box-shadow: 0 30px 60px var(--shadow, rgba(0,0,0,.6)), 0 0 0 .5px var(--line); }
.mi { display: flex; gap: 14px; padding: 12px; border-radius: 14px; color: var(--text); text-decoration: none; }
.mi:hover, .mi:focus-visible { background: var(--card2); }
.mi .ic { width: 36px; height: 36px; border-radius: 10px; background: var(--card); color: var(--accent); flex: none; display: grid; place-items: center; }
.mi .ic svg { width: 20px; height: 20px; fill: currentColor; }
.mi b { display: block; font-size: 16px; font-weight: 600; line-height: 1.3; }
.mi span span { display: block; font-size: 14px; color: var(--muted); line-height: 1.4; margin-top: 2px; }

/* Getting the app: Apple's badge once the On the App Store switch is on (banner.js), the beta until then. */
.badge { display: inline-flex; flex: none; line-height: 0; border-radius: 10px; }
.badge img { height: 48px; width: auto; }
.badge.sm img { height: 36px; }
.badge[hidden], .getb[hidden] { display: none; }
.getb { display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border-radius: 10px; background: var(--brand-btn, #c2410c); color: #fff; font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.getb:hover { background: #a8380a; }
.getb.lg { height: 48px; padding: 0 22px; font-size: 17px; border-radius: 12px; }

/* On a phone: one menu with the same groups, each opening in place. */
details.mob { display: none; margin-left: auto; }
details.mob > summary { list-style: none; cursor: pointer; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; color: var(--text); }
details.mob > summary::-webkit-details-marker { display: none; }
details.mob > summary svg { width: 24px; height: 24px; fill: currentColor; }
details.mob > summary .x { display: none; }
details.mob[open] > summary .x { display: block; } details.mob[open] > summary .o { display: none; }
details.mob .sheet { position: fixed; inset: 66px 0 0; background: var(--bg); overflow-y: auto; padding: 8px 22px 40px; }
details.mob .grp { border-bottom: .5px solid var(--line); }
details.mob .grp > summary, details.mob .grp > a { list-style: none; display: flex; align-items: center; padding: 18px 0; font-size: 20px; font-weight: 600; color: var(--text); text-decoration: none; cursor: pointer; }
details.mob .grp > summary::-webkit-details-marker { display: none; }
details.mob .grp > summary .chev { margin-left: auto; width: 14px; height: 14px; opacity: .5; transition: transform .2s ease; }
details.mob .grp[open] > summary .chev { transform: rotate(180deg); }
details.mob .grp a.sub { display: block; font-size: 17px; color: var(--muted2, var(--muted)); padding: 0 0 16px 2px; text-decoration: none; }
details.mob .get { display: flex; flex-direction: column; gap: 12px; align-items: stretch; margin-top: 22px; }
details.mob .get .signin { text-align: center; padding: 13px; border-radius: 12px; background: var(--card2); color: var(--text); font-weight: 600; text-decoration: none; }
details.mob .get .badge { align-self: flex-start; }

@media (max-width: 960px) {
  header.bar { padding: 6px 10px 0; height: 66px; }
  header.bar .in { padding: 0 4px 0 14px; gap: 12px; }
  header.bar .links, header.bar .end .it { display: none; }
  header.bar .end { margin-left: auto; }
  details.mob { display: block; margin-left: 0; }
}
@media (max-width: 400px) { header.bar .end .getb { display: none; } }

/* The footer: the page map in four columns; Privacy, Terms and Cookies in a small row underneath. */
footer.map { border-top: .5px solid var(--line); padding: 52px 16px 40px; margin-top: 40px; }
footer.map .in { max-width: 1200px; margin: 0 auto; }
footer.map .fg { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 30px; }
footer.map .about img.logo { height: 22px; width: auto; display: block; }
footer.map .about p { font-size: 14px; color: var(--muted); margin: 14px 0 18px; line-height: 1.5; max-width: 260px; }
footer.map h2 { font-size: 13px; font-weight: 600; color: var(--muted); margin: 0 0 14px; letter-spacing: 0; line-height: 1.3; }
footer.map .col a { display: block; font-size: 15px; color: var(--muted2, var(--text)); margin-bottom: 11px; text-decoration: none; }
footer.map .col a:hover { color: var(--text); }
footer.map .low { display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: 13px; color: var(--muted); padding-top: 22px; margin-top: 40px; border-top: .5px solid var(--line); line-height: 1.5; }
footer.map .low a { color: var(--muted); text-decoration: none; }
footer.map .low a:hover { color: var(--text); }
footer.map .low .co { margin-left: auto; max-width: 560px; text-align: right; }
@media (max-width: 760px) {
  footer.map { padding: 36px 22px 32px; }
  footer.map .fg { grid-template-columns: 1fr; gap: 0; }
  footer.map .about { padding-bottom: 18px; }
  footer.map .col { border-top: .5px solid var(--line); padding: 16px 0 6px; }
  footer.map .col div { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
  footer.map .low { margin-top: 10px; }
  footer.map .low .co { margin-left: 0; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  header.bar .in, .dd .panel, .it .chev, details.mob .chev { transition: none !important; }
}
