/* Canonical shared site shell (v6) -------------------------------------------
   Header, menu and footer for every public page. Tokens come from /v6/base.css.
   This stylesheet loads last on every page so the chrome is identical everywhere. */

/* Header */
.site-shell-header { position: relative; z-index: 30; flex: 0 0 auto; background: var(--bg); }
.site-shell-header-in { height: 76px; display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.site-shell-brand { display: inline-flex; align-items: center; min-width: 0; color: var(--ink); text-decoration: none; font-family: var(--sans-bold); font-weight: 900; font-size: 20px; letter-spacing: .01em; }
.site-shell-brand img, .site-shell-brand svg { display: block; width: auto; height: 30px; max-width: 180px; }
.site-shell-tools { display: flex; align-items: center; gap: var(--s2); margin-left: auto; }
.theme-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); border-radius: 0; padding: 6px 14px; font-size: 13px; min-height: 44px; transition: color var(--t-fast), border-color var(--t-fast); }
.theme-btn:hover { color: var(--ink); border-color: var(--ink-3); }
.theme-btn svg { width: 16px; height: 16px; }
.site-shell-menu-toggle, .site-shell-back { width: 44px; height: 44px; min-height: 44px; padding: 0; border: 1px solid var(--line-strong); border-radius: 0; background: transparent; color: var(--ink-2); transition: border-color var(--t-fast), color var(--t-fast); }
.site-shell-menu-toggle:hover, .site-shell-back:hover { color: var(--ink); border-color: var(--ink-3); }
.site-shell-menu-toggle { display: grid; place-content: center; gap: 4px; }
.site-shell-menu-toggle span { display: block; width: 16px; border-top: 2px solid currentColor; border-radius: 2px; }
.site-shell-back { display: none; place-content: center; font: 400 24px/1 var(--sans); }
.site-shell-header.questioning .site-shell-back { display: grid; }
.site-shell-header.questioning .site-shell-header-in { gap: var(--s2); }
.site-shell-header.questioning .site-shell-brand { margin-right: auto; }

/* Question progress: a slim bar under the header */
.site-shell-progress { border-top: 1px solid var(--line); background: var(--bg); }
.site-shell-progress-in { display: flex; align-items: center; gap: var(--s3); padding: 8px 0; }
.site-shell-progress-segments { flex: 1; display: flex; gap: 4px; }
.site-shell-progress-segments i { flex: 1; height: 3px; border-radius: 0; background: var(--line); transition: background var(--t-fast); }
.site-shell-progress-segments i.on { background: var(--accent); }
.site-shell-progress-count { color: var(--ink-3); font: 700 12px/1.3 var(--mono); white-space: nowrap; }

/* Menu */
.site-shell-menu-panel { position: absolute; top: 72px; right: max(var(--pad), calc((100% - 1360px) / 2)); z-index: 40; width: min(300px, calc(100vw - 32px)); padding: 8px; display: grid; border-radius: 0; background: var(--bg); border: 1px solid var(--ink); box-shadow: 0 12px 32px rgba(0, 0, 0, .12); }
.site-shell-menu-panel button, .site-shell-menu-panel a { display: flex; align-items: center; width: 100%; min-height: 46px; padding: 0 14px; border: 0; border-radius: 0; background: transparent; color: var(--ink-2); font: 500 14px/1.45 var(--sans); text-align: left; text-decoration: none; }
.site-shell-menu-panel button { margin: 0 0 6px; background: var(--ink); color: var(--bg); font-family: var(--sans-bold); font-weight: 700; cursor: pointer; justify-content: center; }
.site-shell-menu-panel button:hover { background: var(--accent); color: var(--accent-ink); }
.site-shell-menu-panel a:hover, .site-shell-menu-panel a:focus-visible { background: var(--surface-2); color: var(--ink); outline: none; }

/* Footer */
.site-shell-footer { flex: 0 0 auto; margin-top: auto; border-top: 1px solid var(--ink); background: var(--bg); color: var(--ink-3); }
.site-shell-footer-inner { padding: var(--s5) 0 var(--s4); display: grid; gap: var(--s3); }
.site-shell-footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-shell-footer-links a { color: var(--ink-2); font-size: 13px; line-height: 1.6; text-decoration: none; border-bottom: 1px solid transparent; }
.site-shell-footer-links a:hover { color: var(--ink); border-color: var(--ink); }
.site-shell-footer-note { color: var(--ink-3); font-size: 12px; line-height: 1.8; }
.site-shell-footer-brand { font-size: 12px; font-family: var(--sans-bold); font-weight: 700; color: var(--ink-3); letter-spacing: .04em; }

@media (max-width: 720px) {
  .site-shell-header-in { height: 62px; }
  .site-shell-brand svg, .site-shell-brand img { height: 26px; }
  .theme-btn span { display: none; }
  .theme-btn { padding: 0; width: 44px; min-height: 44px; justify-content: center; border-radius: 0; }
  .site-shell-menu-panel { top: 58px; }
}
@media print {
  .site-shell-header, .site-shell-footer, .toast { display: none !important; }
}
