/* The public bar and footer (#552, epic #539): the markup comes from
   src/shell/render.ts on every public page (static pages, the Worker's blog
   pages and the React pages), so this is the one stylesheet for it. It lives
   in public/ under a fixed name because the blog pages, rendered by the
   Worker with `style-src 'self'`, link it without a build manifest.
   From the approved mockup (https://claude.ai/artifact/JqGSUPAKf8wbaYHcU9ktBF).
   Light only, like the app (#137). Everything is under .sh-* so it neither
   leaks into nor picks up the pages' own styles. */
.sh-bar, .sh-foot, .sh-help {
  --sh-navy: #06132D;
  --sh-navy-raised: #0B1F42;
  --sh-navy-line: #1C3260;
  --sh-ink: #101B33;
  --sh-muted: #667085;
  --sh-line: #E4EAF2;
  --sh-soft: #EEF2F7;
  --sh-cyan: #16DDE0;
  --sh-cyan-hover: #08BFC9;
  --sh-cyan-soft: #D8FAFA;
  --sh-magenta: #D90B62;
  --sh-yellow: #FFD128;
  --sh-max: 1360px;
  --sh-gutter: clamp(16px, 3vw, 40px);
  --sh-h: 72px;
  font-family: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
}
.sh-bar *, .sh-foot *, .sh-help * { box-sizing: border-box; }
.sh-bar [hidden], .sh-foot [hidden], .sh-help [hidden] { display: none !important; }
/* Commissions beta entries stay hidden until the browser confirms the beta is on (src/lib/commissionsBeta.ts). */
[data-commissions-beta][hidden] { display: none !important; }
.sh-bar :focus-visible, .sh-foot :focus-visible, .sh-help :focus-visible { outline: 3px solid #159DEB; outline-offset: 2px; }
.sh-bar summary, .sh-foot summary, .sh-help summary { list-style: none; cursor: pointer; }
.sh-bar summary::-webkit-details-marker, .sh-help summary::-webkit-details-marker { display: none; }
.sh-wrap { max-width: var(--sh-max); margin-inline: auto; padding-inline: var(--sh-gutter); }

/* Bar */
.sh-bar { position: sticky; top: 0; z-index: 30; background: var(--sh-navy); color: #fff; }
.sh-bar .sh-wrap { display: flex; align-items: center; gap: 28px; height: var(--sh-h); }
.sh-logo { display: flex; align-items: center; flex: none; min-height: 44px; }
.sh-logo img { display: block; height: 36px; width: auto; }
.sh-logo-icon { display: none !important; }
.sh-nav { display: flex; gap: 4px; flex: 1; min-width: 0; }
.sh-nav-link { color: #fff; text-decoration: none; padding: 10px 14px; border-radius: 10px; font-weight: 600; font-size: 15px; line-height: 1.2; font-family: inherit; white-space: nowrap; }
.sh-nav-link:hover { color: var(--sh-cyan); }
.sh-nav-link[aria-current="page"] { background: var(--sh-navy-raised); }
.sh-actions { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }

.sh-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 12px; border-radius: 10px; font-weight: 600; font-size: 14px; line-height: 1; font-family: inherit; text-decoration: none; white-space: nowrap; cursor: pointer; border: 0; background: none; color: #fff; }
.sh-outline { border: 1px solid var(--sh-navy-line); background: transparent; color: #fff; }
.sh-outline:hover, details[open] > .sh-outline { border-color: var(--sh-cyan); background: var(--sh-navy-raised); color: #fff; }
.sh-cta { background: var(--sh-cyan); color: var(--sh-navy); font-weight: 700; font-size: 15px; padding: 0 18px; }
.sh-cta:hover { background: var(--sh-cyan-hover); color: var(--sh-navy); }
.sh-icon-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: none; border-radius: 10px; border: 1px solid var(--sh-navy-line); background: transparent; color: #fff; cursor: pointer; text-decoration: none; padding: 0; }
.sh-icon-btn:hover { border-color: var(--sh-cyan); color: #fff; }
.sh-count { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--sh-magenta); color: #fff; font-weight: 700; font-size: 12px; line-height: 20px; font-family: inherit; text-align: center; }
.sh-avatar { width: 32px; height: 32px; margin-inline-start: -6px; border-radius: 50%; background: var(--sh-yellow); color: var(--sh-navy); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.sh-chevron { opacity: .8; transition: transform .15s; }
details[open] > summary .sh-chevron { transform: rotate(180deg); }
.sh-flag { display: block; flex: none; border-radius: 2px; }
.sh-help-slot:empty { display: none; }

/* Dropdowns: language and account */
.sh-menu { position: relative; }
.sh-pop { position: absolute; top: calc(100% + 8px); z-index: 40; min-width: 240px; padding: 8px; display: flex; flex-direction: column; background: #fff; color: var(--sh-ink); border: 1px solid var(--sh-line); border-radius: 14px; box-shadow: 0 18px 40px -16px rgba(6, 19, 45, .35); }
.sh-pop-end { right: 0; }
.sh-pop-note { margin: 0; padding: 10px 12px 8px; font-size: 13px; color: var(--sh-muted); overflow-wrap: anywhere; }
.sh-pop-note:empty { display: none; }
.sh-pop-item { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 12px; border-radius: 8px; border: 0; background: none; color: var(--sh-ink); font-weight: 600; font-size: 15px; line-height: 1.2; font-family: inherit; text-decoration: none; text-align: start; cursor: pointer; width: 100%; }
.sh-pop-item:hover { background: var(--sh-soft); color: var(--sh-ink); }
.sh-pop-item.sh-muted { color: #4B5565; }
.sh-lang-item span { flex: 1; }
.sh-lang-item[aria-current="true"] { background: var(--sh-cyan-soft); }
.sh-check { flex: none; color: var(--sh-navy); }
.sh-rule { border: 0; height: 1px; background: var(--sh-line); margin: 6px 0; }

/* Phone menu */
.sh-mobile { display: none; }
.sh-when-open { display: none; }
.sh-mobile[open] > summary { border-color: var(--sh-cyan); background: var(--sh-navy-raised); }
.sh-mobile[open] > summary .sh-when-open { display: block; }
.sh-mobile[open] > summary .sh-when-closed { display: none; }
.sh-sheet { position: fixed; top: var(--sh-h); left: 0; right: 0; bottom: 0; z-index: 40; overflow-y: auto; overscroll-behavior: contain; background: #fff; color: var(--sh-ink); display: flex; flex-direction: column; padding: 12px 12px 0; }
.sh-sheet-nav, .sh-sheet-rows { display: flex; flex-direction: column; }
.sh-sheet-link { color: var(--sh-ink); text-decoration: none; padding: 14px 12px; border-radius: 10px; font-weight: 700; font-size: 18px; }
.sh-sheet-link[aria-current="page"] { background: var(--sh-soft); }
.sh-sheet-link:hover { color: #B80A53; }
.sh-sheet .sh-rule { margin: 12px 12px; }
.sh-sheet-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 12px; border-radius: 10px; color: var(--sh-ink); text-decoration: none; font-weight: 600; font-size: 16px; }
button.sh-sheet-row { width: 100%; border: 0; background: none; font-family: inherit; text-align: start; cursor: pointer; }
.sh-sheet-row:hover { background: var(--sh-soft); color: var(--sh-ink); }
.sh-sheet-note { display: flex; align-items: center; gap: 8px; color: var(--sh-muted); font-weight: 500; font-size: 15px; overflow-wrap: anywhere; text-align: end; }
.sh-sheet-langs { display: flex; flex-direction: column; padding-inline-start: 12px; }
.sh-sheet-langs .sh-lang-item { justify-content: flex-start; }
.sh-sheet-cta { margin: auto 8px 0; height: 52px; border-radius: 12px; font-size: 17px; flex: none; position: sticky; bottom: 24px; margin-bottom: 24px; }

@media (max-width: 1100px) {
  .sh-bar .sh-wrap { gap: 18px; }
  .sh-nav-link { padding-inline: 10px; }
  .sh-account-label { display: none; }
}
@media (max-width: 960px) {
  .sh-bar, .sh-foot { --sh-h: 64px; }
  .sh-bar .sh-wrap { gap: 8px; padding-inline: 16px 12px; }
  .sh-nav, .sh-lang, .sh-signin, .sh-account, .sh-main-cta, .sh-actions > .sh-help-slot { display: none !important; }
  .sh-mobile { display: block; }
  .sh-logo-full { display: none !important; }
  .sh-logo-icon { display: block !important; height: 32px; }
  .sh-actions { gap: 8px; }
  .sh-bar:has(.sh-mobile[open]) .sh-cart { display: none; }
  html:has(.sh-mobile[open]) { overflow: hidden; }
}

/* Footer */
.sh-foot { background: var(--sh-navy); color: #fff; font-size: 15px; line-height: 1.5; border-top: 1px solid var(--sh-navy-line); }
.sh-foot-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 32px; padding-block: 56px 40px; }
.sh-foot-brand { grid-column: span 2; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.sh-foot-brand img { display: block; height: 36px; width: auto; }
.sh-foot-brand p { margin: 0; color: #C9D4EA; max-width: 340px; }
.sh-foot-langs { display: flex; flex-wrap: wrap; gap: 8px; }
.sh-chip { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--sh-navy-line); color: #C9D4EA; font-weight: 600; font-size: 14px; text-decoration: none; }
.sh-chip:hover { color: var(--sh-cyan); }
.sh-chip[aria-current="true"] { border-color: var(--sh-cyan); background: var(--sh-navy-raised); color: #fff; }
.sh-chip .sh-check { display: none; }
.sh-foot-col { display: flex; flex-direction: column; gap: 4px; }
.sh-foot-col h2 { margin: 0 0 6px; font-weight: 700; font-size: 13px; line-height: 1.4; font-family: inherit; letter-spacing: .1em; text-transform: uppercase; color: #9FB3D9; }
.sh-foot-col a, .sh-foot-base a { color: #C9D4EA; text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
.sh-foot-col a:hover, .sh-foot-base a:hover { color: var(--sh-cyan); }
.sh-foot-base { border-top: 1px solid var(--sh-navy-line); padding-block: 20px 32px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: 14px; color: #9FB3D9; }
@media (max-width: 960px) {
  .sh-foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; padding-block: 40px 28px; }
  .sh-foot-brand { grid-column: 1 / -1; }
}

/* Help button and panel (#553, board 7 of the mockup): src/shell/help.ts.
   Fixed bottom-right; under the bar's menus (40) and the consent banner. */
.sh-help { position: fixed; right: 24px; bottom: 24px; z-index: 35; font-family: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; color: var(--sh-ink); }
.sh-help-btn { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 20px 0 16px; margin-inline-start: auto; width: max-content; border-radius: 999px; border: 2px solid transparent; background: var(--sh-navy); color: #fff; font-weight: 700; font-size: 16px; line-height: 1; box-shadow: 0 10px 28px -10px rgba(6, 19, 45, .55); }
.sh-help-btn:hover, .sh-help[open] > .sh-help-btn { border-color: var(--sh-cyan); }
.sh-help-btn svg { flex: none; }
.sh-help-when-open { display: none; }
.sh-help[open] .sh-help-when-open { display: block; }
.sh-help[open] .sh-help-when-closed { display: none; }
.sh-help-panel { position: absolute; right: 0; bottom: calc(100% + 12px); width: min(360px, calc(100vw - 32px)); max-height: calc(100vh - 120px); overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; background: #fff; border: 1px solid var(--sh-line); border-radius: 18px; box-shadow: 0 18px 40px -16px rgba(6, 19, 45, .35); }
.sh-help-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sh-help-head h2 { margin: 0; font-family: "Bricolage Grotesque", "Figtree", ui-sans-serif, system-ui, sans-serif; font-weight: 800; font-size: 22px; line-height: 1.2; color: var(--sh-ink); }
.sh-help-x { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; margin: -10px -10px 0 0; border: 0; border-radius: 10px; background: none; color: var(--sh-muted); cursor: pointer; }
.sh-help-x:hover { background: var(--sh-soft); color: var(--sh-ink); }
.sh-help-hours { margin: 0; font-size: 14px; line-height: 1.45; color: #4B5565; }
.sh-help-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--sh-line); background: #fff; color: var(--sh-ink); font: inherit; text-align: start; text-decoration: none; cursor: pointer; }
.sh-help-row svg { flex: none; color: var(--sh-navy); }
.sh-help-row:hover { border-color: var(--sh-navy); color: var(--sh-ink); }
.sh-help-text { display: flex; flex-direction: column; min-width: 0; font-size: 15px; line-height: 1.3; }
.sh-help-text b { font-weight: 700; }
.sh-help-text span { font-size: 13px; color: #4B5565; overflow-wrap: anywhere; }
.sh-help-primary { background: var(--sh-navy); border-color: var(--sh-navy); color: #fff; }
.sh-help-primary:hover { background: var(--sh-navy-raised); border-color: var(--sh-cyan); color: #fff; }
.sh-help-primary svg { color: var(--sh-cyan); }
.sh-help-primary .sh-help-text span { color: #C9D4EA; }
/* The editor opens the panel from its site menu: no pill (#553), so the panel has its own close button. */
.sh-help-menu > .sh-help-btn, .sh-help:not(.sh-help-menu) .sh-help-x { display: none; }
.sh-help-menu .sh-help-panel { bottom: 0; }
html:has(.sh-mobile[open]) .sh-help { display: none; }
@media (max-width: 640px) {
  .sh-help { right: 16px; bottom: 16px; }
  .sh-help-btn { width: 56px; padding: 0; justify-content: center; }
  .sh-help-label { display: none !important; }
}

@media print { .sh-bar, .sh-foot, .sh-help { display: none !important; } }

/* Grouped primary navigation (#754), using the shell's native details menus. */
summary.sh-nav-link { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.sh-beta { display: inline-block; margin-inline-start: 5px; padding: 3px 6px; border-radius: 999px; background: var(--sh-cyan); color: var(--sh-navy); font-size: 10px; font-weight: 800; vertical-align: middle; }
.sh-nav-note { display: block; margin-top: 4px; color: var(--sh-muted); font-size: 13px; font-weight: 400; }
.sh-sheet-group > summary { display: block; cursor: pointer; }
.sh-sheet-sub { padding-inline: 12px; }
