/* stopbar.css - JOB STOPBAR (26 Nov 2026, STYLE.md 4a/4b): one top bar on every page.
   One row, 56px on a phone and 64px from 900px (54/62 + the 2px line). Colours only from the page's tokens. */
html body > header:is(.bar, .top) { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 9; padding: 0; margin: 0; border-bottom: 2px solid var(--line); }
html body > header.top { z-index: 20; }
html body > header:is(.bar, .top) > :is(.bar-in, .top-in) { box-sizing: border-box; height: 54px; display: flex; flex-wrap: nowrap; align-items: center; gap: 4px; padding: 0 8px; margin-block: 0; }

/* the logo: book and "MyFuture" in ink, "Plans" in the pop colour (Midnight: zing) */
html body header a.brand { color: var(--ink) !important; margin: 0 auto 0 0; min-height: 44px; min-width: 0; flex: 0 1 auto; }
html body header a.brand .mfp-plans { color: var(--pop, var(--acc)); }
html:root[data-vibe="midnight"] body header a.brand .mfp-plans { color: var(--zing); }

/* sparks, My pathways, Menu, Profile, then one main button */
html body header .bar-in .sparks, html body header .top-in .sparks,
html body header :is(.bar-in, .top-in) .iconbtn { box-sizing: border-box; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 44px; min-height: 44px; min-width: 44px; margin: 0; cursor: pointer; }
html body header :is(.bar-in, .top-in) .iconbtn { width: 44px; padding: 0; border-radius: 999px; border: 2px solid var(--line); background: var(--card); color: var(--ink); }
html body header :is(.bar-in, .top-in) .iconbtn[aria-expanded="true"] { border-color: var(--pop); box-shadow: inset 0 0 0 2px var(--pop); }
html body header :is(.bar-in, .top-in) .sparks { border: 2px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); padding: 0 6px; font-family: var(--display); font-weight: 800; font-size: .9rem; font-variant-numeric: tabular-nums; }
html body header :is(.bar-in, .top-in) .sparks svg { width: 18px; height: 18px; flex: none; }
html body header #sparks svg { color: var(--zing); }
html body header #pathBtn svg { color: var(--pop); }
html body header :is(.bar-in, .top-in) .iconbtn svg { width: 22px; height: 22px; flex: none; }
html body header :is(.bar-in, .top-in) .btn.small { flex: 0 0 auto; min-height: 44px; padding: 4px 10px; font-size: .9rem; margin: 0; }
html body header .tb-w { display: none; font-family: var(--display); font-weight: 800; font-size: .95rem; white-space: nowrap; }

@media (max-width: 400px) {
  html body header a.brand { font-size: .84rem !important; gap: 4px; }
  html body header a.brand .mfp-mark { height: 26px; }
}
@media (max-width: 359px) {
  html body > header:is(.bar, .top) > :is(.bar-in, .top-in) { gap: 2px; padding: 0 4px; }
  html body header a.brand { font-size: .74rem !important; gap: 2px; }
  html body header a.brand .mfp-mark { height: 20px; }
  html body header :is(.bar-in, .top-in) .sparks { padding: 0 2px; gap: 2px; font-size: .8rem; }
  html body header :is(.bar-in, .top-in) .sparks svg { width: 14px; height: 14px; }
  html body header :is(.bar-in, .top-in) .btn.small { padding: 4px 6px; font-size: .8rem; }
}
/* the home page has the Start button as well, so its phone bar sits tighter: the logo is never squeezed */
@media (max-width: 400px) {
  html body > header.top > .top-in { gap: 2px; padding: 0 4px; }
  html body header .top-in a.brand { flex: 0 0 auto; }
  html body header .top-in .btn.small { padding: 4px 8px; }
}
@media (max-width: 359px) {
  html body > header.top > .top-in { gap: 1px; padding: 0 2px; }
  html body header .top-in .sparks { padding: 0 1px; }
  html body header .top-in .btn.small { padding: 4px 5px; font-size: .76rem; }
}
@media (min-width: 900px) {
  html body > header:is(.bar, .top) > :is(.bar-in, .top-in) { height: 62px; gap: 8px; padding: 0 16px; }
  html body header .tb-w { display: inline; }
  html body header :is(.bar-in, .top-in) .iconbtn { width: auto; padding: 0 14px; gap: 6px; }
  html body header :is(.bar-in, .top-in) .sparks { padding: 0 14px; gap: 6px; }
  html body header :is(.bar-in, .top-in) .btn.small { padding: 4px 16px; font-size: .95rem; }
}

/* the two panels drop from the bar, over the page, so the bar stays one row */
html body header [hidden] { display: none !important; }
/* while a panel is open it sits above the bottom banners ("Your work is back", "You are signed out": z-index 60),
   so no button in it is ever covered */
html body > header:is(.bar, .top):has(> .mfp-profile:not([hidden]), > .sitemenu:not([hidden])) { z-index: 61; }
html body header .sitemenu, html body header .mfp-profile { position: absolute; top: calc(100% + 2px); box-sizing: border-box; overflow-y: auto; overscroll-behavior: contain; max-height: calc(100vh - 70px); max-height: calc(100dvh - 70px); }
html body header .sitemenu { left: 0; right: 0; background: var(--bg); border-bottom: 2px solid var(--line); }
html body header .mfp-profile { right: 8px; width: min(23rem, calc(100% - 16px)); background: var(--card); color: var(--ink); border: 2px solid var(--line); border-radius: 22px; padding: 16px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 12px 30px rgba(0, 0, 0, .22); text-align: left; font-size: 1rem; }
html body header .mfp-profile .pf-g { display: flex; flex-direction: column; gap: 8px; }
html body header .mfp-profile .pf-btn { width: 100%; min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 2px solid var(--pop); background: var(--pop); color: var(--pop-ink); font: inherit; font-weight: 700; cursor: pointer; }
html body header .mfp-profile .vibes { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 10px; margin: 0; padding: 4px; max-width: none; font-size: 14px; font-weight: 700; color: var(--soft); }
html body header .mfp-profile .vibe { width: 44px; height: 44px; flex: none; cursor: pointer; }
html body header .mfp-profile .sm-acct { flex: none; margin: 0; max-width: none; border-top: 2px solid var(--line); padding-top: 12px; }
html body header .mfp-profile .sm-acct .btn, html body header .mfp-profile .sm-acct .sa-link { min-height: 44px; }
/* Delete my account: last, and set apart */
html body header .mfp-profile .pf-del { margin-top: 20px; border-top: 2px dashed var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
html body header .mfp-profile #mfpDelHost { display: flex; flex-direction: column; gap: 10px; }
html body header .mfp-profile #mfpDelHost:empty { display: none; }
html body header .mfp-profile #mfpDelKeep { min-height: 44px; }
html body header .mfp-profile img.fox-ov { width: 48px !important; height: auto !important; align-self: flex-end; margin: 0 0 -8px; }

/* the privacy page keeps its quiet look; only its top bar takes the house colours */
body[data-page="privacy"] > header { --bg: #eef3ff; --card: #ffffff; --ink: #16204a; --soft: #4d5888; --line: #d5ddf5; --pop: #3355ff; --pop-ink: #ffffff; --zing: #ffcf3a; --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif; background: var(--bg); color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body[data-page="privacy"] > header { --bg: #0f1430; --card: #1a2147; --ink: #eef1ff; --soft: #aab3dd; --line: #2d376a; --pop: #7d93ff; --pop-ink: #0f1430; --zing: #ffd659; } }
html:root[data-vibe="midnight"] body[data-page="privacy"] > header { --bg: #0b0e17; --card: #161b2b; --ink: #e8eaf2; --soft: #9aa1b8; --line: #2a3047; --pop: #6a3df0; --pop-ink: #ffffff; --zing: #c9b8ff; }
html:root[data-vibe="forest"] body[data-page="privacy"] > header { --bg: #eef5ef; --card: #ffffff; --ink: #13261b; --soft: #4a6354; --line: #cfe0d4; --pop: #1f7a4d; --pop-ink: #ffffff; --zing: #ffcf3a; }
html:root[data-vibe="sunset"] body[data-page="privacy"] > header { --bg: #fff1ec; --card: #ffffff; --ink: #2a1520; --soft: #6e4a58; --line: #f3d3c8; --pop: #c93a64; --pop-ink: #ffffff; --zing: #ffcf3a; }
body[data-page="privacy"] > header .vibe { border-radius: 50%; border: 3px solid var(--card); box-shadow: 0 0 0 2px var(--line); padding: 0; }
body[data-page="privacy"] > header .vibe[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--ink); }
body[data-page="privacy"] > header .vibe[data-v="bright"] { background: linear-gradient(135deg, #3355ff 50%, #ffcf3a 50%); }
body[data-page="privacy"] > header .vibe[data-v="midnight"] { background: linear-gradient(135deg, #0b0e17 50%, #6a3df0 50%); }
body[data-page="privacy"] > header .vibe[data-v="forest"] { background: linear-gradient(135deg, #1f7a4d 50%, #eef5ef 50%); }
body[data-page="privacy"] > header .vibe[data-v="sunset"] { background: linear-gradient(135deg, #c93a64 50%, #ffcf3a 50%); }
body[data-page="privacy"] > header a.brand, body[data-page="privacy"] > header .sparks, body[data-page="privacy"] > header .tb-w { font-family: var(--display); font-weight: 800; }
body[data-page="privacy"] [hidden] { display: none !important; }
@media print { body[data-page="privacy"] > header { display: none; } }

/* PPROFILE (27 Nov 2026): the account part first, in a deeper shade of the page's own colour; four tidy buttons */
html body header .mfp-profile .sm-acct { border-top: 0; padding: 0 0 16px; border-bottom: 2px solid var(--line); }
html body header .mfp-profile .sm-acct:empty, html body header .mfp-profile .sm-del:empty { display: none; }
html body header .mfp-profile .sm-acct .who { margin-top: 0; }
html body header .mfp-profile .sm-acct .sm-row { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
html body header .mfp-profile :is(.sm-acct .sm-row, .pf-del) .btn { box-sizing: border-box; width: 100%; min-height: 44px; justify-content: center; text-align: center; margin: 0; }
html body header .mfp-profile .sm-acct button:is(#mfpASignOut, #mfpASignIn, #mfpASignUp) { background: color-mix(in srgb, var(--pop, var(--acc)) 65%, #000); border: 2px solid color-mix(in srgb, var(--pop, var(--acc)) 65%, #000); color: #fff; }
html body header .mfp-profile .sm-del .pf-del { margin-top: 0; }
