/* Shared header and footer for every page (2026-10). Own class names (sc-*) so no
   page's inline CSS can restyle it. Colours match the site's navy and gold. */
.sc-nav, .sc-drawer, .sc-footer {
    --sc-navy: #0a1628; --sc-navy-mid: #121f36; --sc-navy-light: #1a2942; --sc-line: #243450;
    --sc-gold: #d4a853; --sc-gold-light: #e8c778; --sc-text: #dee2e6; --sc-muted: #8a9bb0;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
}
.sc-nav *, .sc-drawer *, .sc-footer * { box-sizing: border-box; }
.sc-nav a, .sc-drawer a, .sc-footer a { text-decoration: none; }

/* Header */
.sc-nav { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; height: 72px; background: rgba(10, 22, 40, 0.86);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.sc-nav.scrolled { background: rgba(10, 22, 40, 0.96); }
.sc-nav-inner { max-width: 1200px; height: 100%; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 1.5rem; }
.sc-brand { display: flex; align-items: center; gap: 0.7rem; color: #fff; flex-shrink: 0; }
.sc-brand img { width: 34px; height: 34px; border-radius: 8px; display: block; }
.sc-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.sc-brand-title { font-weight: 700; font-size: 0.98rem; color: #fff; }
.sc-brand-sub { font-size: 0.68rem; color: var(--sc-gold); letter-spacing: 0.02em; }
.sc-links { display: flex; align-items: center; gap: 0.25rem; margin-left: auto; }
.sc-links > a, .sc-dd-btn { white-space: nowrap; color: var(--sc-text); font-size: 0.9rem; font-weight: 500; padding: 0.5rem 0.7rem; border-radius: 8px;
    background: none; border: 0; cursor: pointer; font-family: inherit; display: inline-flex; align-items: center; gap: 0.35rem; }
.sc-links > a:hover, .sc-dd-btn:hover, .sc-dd.open .sc-dd-btn { color: #fff; background: rgba(255, 255, 255, 0.05); }
.sc-links > a[aria-current="page"] { color: var(--sc-gold); }
.sc-dd { position: relative; }
.sc-dd-caret { transition: transform 0.2s; }
.sc-dd.open .sc-dd-caret { transform: rotate(180deg); }
.sc-dd-panel { display: none; position: absolute; top: calc(100% + 8px); right: 0; min-width: 240px; padding: 0.5rem;
    background: var(--sc-navy-mid); border: 1px solid var(--sc-line); border-radius: 12px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45); }
.sc-dd.open .sc-dd-panel { display: block; }
.sc-dd.sc-current .sc-dd-btn { color: var(--sc-gold); }
.sc-dd-panel a { display: block; color: var(--sc-text); font-size: 0.9rem; padding: 0.5rem 0.75rem; border-radius: 8px; }
.sc-dd-panel a:hover { background: var(--sc-navy-light); color: #fff; }
.sc-dd-panel a[aria-current="page"] { color: var(--sc-gold); }
.sc-dd-panel .sc-dd-sep { height: 1px; background: var(--sc-line); margin: 0.4rem 0.5rem; }
.sc-actions { display: flex; align-items: center; gap: 0.5rem; margin-left: 0.5rem; }
.sc-icon { color: var(--sc-muted); display: inline-flex; padding: 0.4rem; border-radius: 8px; }
.sc-icon:hover { color: #fff; }
.sc-account { color: var(--sc-text); font-size: 0.9rem; font-weight: 500; padding: 0.5rem 0.6rem; }
.sc-account:hover { color: #fff; }
.sc-cta { background: var(--sc-gold); color: var(--sc-navy) !important; font-weight: 700; font-size: 0.88rem; padding: 0.6rem 1rem; border-radius: 9px; white-space: nowrap; }
.sc-cta:hover { background: var(--sc-gold-light); }
.sc-toggle { display: none; margin-left: auto; background: none; border: 0; color: #fff; width: 44px; height: 44px; align-items: center; justify-content: center; cursor: pointer; }

/* Mobile drawer (opened by /js/site-nav.js through the shared ids) */
.sc-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55); opacity: 0; visibility: hidden; transition: opacity 0.2s; z-index: 1001; }
.sc-overlay.open { opacity: 1; visibility: visible; }
.sc-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(340px, 88vw); background: var(--sc-navy-mid); border-left: 1px solid var(--sc-line);
    transform: translateX(100%); visibility: hidden; transition: transform 0.25s ease, visibility 0s linear 0.25s; z-index: 1002; overflow-y: auto; padding: 1.25rem 1.25rem 2rem; }
.sc-drawer.open { transform: translateX(0); visibility: visible; transition: transform 0.25s ease, visibility 0s; }
.sc-drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; color: #fff; font-weight: 700; }
.sc-drawer-close { background: none; border: 0; color: var(--sc-text); font-size: 1.6rem; line-height: 1; cursor: pointer; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; margin-right: -0.5rem; }
.sc-drawer a { display: block; color: var(--sc-text); padding: 0.7rem 0; font-size: 1rem; border-bottom: 1px solid rgba(255, 255, 255, 0.04); }
.sc-drawer a:hover { color: #fff; }
.sc-drawer-label { margin: 1.25rem 0 0.35rem; font: 600 0.7rem 'SFMono-Regular', Consolas, monospace; letter-spacing: 0.12em; text-transform: uppercase; color: var(--sc-gold); }
.sc-drawer .sc-cta { display: block; text-align: center; margin-top: 1.25rem; border-bottom: 0; }

@media (max-width: 1180px) {
    .sc-links > a.sc-hide-md { display: none; }
    .sc-brand-sub { display: none; }
}
/* Below 1000px the links move into the drawer; the main action stays in the bar. */
@media (max-width: 1000px) {
    .sc-links, .sc-icon, .sc-account { display: none; }
    .sc-actions { margin-left: auto; }
    .sc-cta { padding: 0.5rem 0.8rem; font-size: 0.82rem; }
    .sc-toggle { display: inline-flex; margin-left: 0.25rem; }
}
@media (max-width: 480px) {
    .sc-nav-inner { padding: 0 16px; gap: 0.6rem; }
    .sc-brand-title { font-size: 0.88rem; }
    .sc-brand { min-width: 0; }
}
@media (max-width: 400px) {
    .sc-brand-text { display: none; }
}

/* Footer */
.sc-footer { background: var(--sc-navy); border-top: 1px solid rgba(255, 255, 255, 0.06); padding: 4rem 0 2rem; color: var(--sc-muted); }
.sc-footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.sc-footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr)); gap: 2rem; }
.sc-footer-brand strong { display: block; color: #fff; font-size: 1.05rem; margin-bottom: 0.6rem; }
.sc-footer-brand p { font-size: 0.88rem; line-height: 1.6; margin: 0 0 0.6rem; }
.sc-footer-brand .sc-tagline { color: var(--sc-gold); font-style: italic; }
.sc-footer h4 { color: #fff; font: 600 0.78rem 'DM Sans', sans-serif; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 0.9rem; }
.sc-footer ul { list-style: none; margin: 0; padding: 0; }
.sc-footer li { margin: 0 0 0.55rem; }
.sc-footer li a { color: var(--sc-muted); font-size: 0.9rem; }
.sc-footer li a:hover { color: #fff; }
.sc-footer-skye { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--sc-line); font-size: 0.9rem; }
.sc-footer-skye a { color: var(--sc-gold); }
.sc-footer-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 1.25rem; font-size: 0.82rem; }
.sc-footer-bottom a { color: var(--sc-muted); margin-left: 1.25rem; }
.sc-footer-bottom a:first-child { margin-left: 0; }
.sc-footer-bottom a:hover { color: #fff; }
@media (max-width: 960px) {
    .sc-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sc-footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
    .sc-footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; }
}

/* Keyboard focus, in the brand colour */
.sc-nav a:focus-visible, .sc-dd-btn:focus-visible, .sc-toggle:focus-visible, .sc-drawer a:focus-visible,
.sc-drawer-close:focus-visible, .sc-footer a:focus-visible { outline: 2px solid var(--sc-gold); outline-offset: 2px; border-radius: 6px; }

/* Footer links: comfortable tap targets on phones */
@media (max-width: 600px) {
    .sc-footer li { margin: 0; }
    .sc-footer li a { display: inline-block; padding: 0.4rem 0; }
}

/* The chat button: smaller on phones, clear of the home indicator, and off on the docs pages */
@media (max-width: 900px) {
    #insumer-chat-toggle { width: 48px !important; height: 48px !important; bottom: calc(16px + env(safe-area-inset-bottom)) !important; right: 16px !important; }
}
body.sc-docs #insumer-chat-toggle { display: none !important; }
/* Kept clear of the homepage code card while the hero is in view on phones */
body.sc-chat-clear #insumer-chat-toggle { opacity: 0 !important; pointer-events: none !important; }
