/* The shared public-site shell, independent of each page's content styles. */
html { scroll-padding-top: 108px; scroll-behavior: smooth; }
.site-header, .site-footer { --site-ink: #101426; --site-muted: #53617a; --site-line: #e3e8f2; font-family: Inter, system-ui, sans-serif; color: var(--site-ink); }
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(245,247,252,.96); border-bottom: 1px solid rgba(227,232,242,.8); backdrop-filter: blur(16px); }
.site-header-inner, .site-footer-inner { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.site-header-inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 36px; min-height: 88px; }
.site-brand { display: inline-flex; flex: none; align-items: center; text-decoration: none; }
.site-brand img { display: block; width: 148px; height: auto; }
.site-menu { margin: 0; padding: 0; border: 0; flex: 1; min-width: 0; }
.site-menu > summary { display: none; }
.site-navigation { display: flex; align-items: center; justify-content: flex-end; gap: 30px; }
.site-nav-links, .site-nav-actions { display: flex; align-items: center; gap: 6px; }
.site-header a:not(.site-brand) { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: 10px 12px; border-radius: 10px; color: var(--site-muted); font-size: 14px; line-height: 1.4; font-weight: 550; text-decoration: none; white-space: nowrap; transition: color 180ms ease, background 180ms ease; }
.site-header a:not(.site-brand):hover { color: #075bff; background: #eaf0ff; }
.site-header a[aria-current] { color: #0546c8; background: #eaf0ff; }
.site-header .site-nav-actions { gap: 10px; }
.site-header a.site-cta { gap: 14px; padding: 12px 17px; background: var(--site-ink); color: #fff; box-shadow: 0 3px 8px #1014260a; }
.site-header a.site-cta:hover { background: #24314a; color: #fff; }
.site-header a.site-mobile-help { display: none; }
.site-header [hidden] { display: none !important; }
.site-header :focus-visible, .site-footer :focus-visible { outline: 3px solid #075bff; outline-offset: 4px; }
/* Keep the keyboard shortcut out of the layout until it receives focus. */
body > .skip-link { position: fixed; left: 16px; top: 16px; z-index: 200; transform: translateY(calc(-100% - 32px)); max-width: calc(100vw - 32px); padding: 12px 16px; border-radius: 10px; background: #101426; color: #fff; font: 600 16px/1.5 Inter, system-ui, sans-serif; text-decoration: none; }
body > .skip-link:focus { top: 16px; transform: none; outline: 3px solid #075bff; outline-offset: 3px; }
.site-footer { display: block; margin-top: 64px; padding: 0; border-top: 1px solid var(--site-line); background: #eef2fa; font-size: 14px; }
.site-footer-inner { padding-top: 44px; padding-bottom: 24px; }
.site-footer-top { display: grid; grid-template-columns: 1.8fr 1fr 1fr; gap: 48px; padding-bottom: 36px; }
.site-footer .site-brand img { width: 132px; }
.site-footer p { margin: 12px 0 0; font-size: 14px; color: var(--site-muted); line-height: 1.6; }
.site-footer .site-footer-note { max-width: 27ch; margin-top: 6px; }
.site-footer nav { display: flex; flex-direction: column; align-items: start; gap: 4px; }
.site-footer h2 { margin: 0 0 10px; font: 650 14px/1.5 Inter, system-ui, sans-serif; letter-spacing: 0; color: var(--site-ink); }
.site-footer a:not(.site-brand), .site-footer button { display: inline-flex; align-items: center; min-height: 32px; margin: 0; padding: 3px 0; color: var(--site-muted); font-size: 14px; line-height: 1.5; text-decoration: none; }
.site-footer a:hover, .site-footer button:hover { color: #0546c8; text-decoration: underline; text-underline-offset: 4px; }
.site-footer-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; border-top: 1px solid #dce3ef; padding-top: 20px; }
.site-footer-bottom p { margin: 0; font-size: 13px; }
.site-footer-bottom > div { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; }
.site-footer-bottom a, .site-footer-bottom button { font-size: 13px !important; }
.site-footer-bottom > p { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.site-footer .site-footer-bottom a.site-parent-link { display: inline-flex; min-height: 44px; padding: 0; text-decoration: underline; text-underline-offset: 3px; }
/* Keep a native control reachable if a no-JS visitor closes the menu then widens the window. */
@media (min-width: 961px) {
  .site-menu:not([open]) { flex: none; }
  .site-menu:not([open]) > summary { display: flex; align-items: center; min-height: 44px; padding: 10px 14px; border: 1px solid #dce3ef; border-radius: 12px; font-size: 14px; font-weight: 600; cursor: pointer; background: #fff; }
}
@media (max-width: 960px) {
  html { scroll-padding-top: 88px; }
  .site-header-inner { min-height: 76px; }
  .site-menu { flex: none; }
  .site-menu > summary { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 14px; border: 1px solid #dce3ef; border-radius: 12px; font-size: 14px; font-weight: 600; list-style: none; cursor: pointer; background: #fff; user-select: none; }
  .site-menu > summary::-webkit-details-marker { display: none; }
  .site-menu-icon { position: relative; width: 16px; height: 14px; }
  .site-menu-icon::before, .site-menu-icon::after { content: ''; position: absolute; left: 0; width: 16px; height: 2px; border-radius: 2px; background: currentColor; transition: transform 180ms ease; }
  .site-menu-icon::before { top: 3px; }.site-menu-icon::after { bottom: 3px; }
  .site-menu[open] .site-menu-icon::before { transform: translateY(3px) rotate(45deg); }.site-menu[open] .site-menu-icon::after { transform: translateY(-3px) rotate(-45deg); }
  .site-navigation { position: absolute; top: calc(100% - 2px); left: 24px; right: 24px; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 14px; padding: 16px; border: 1px solid #dce3ef; border-radius: 16px; background: #fff; box-shadow: 0 20px 50px #1014261f; max-height: calc(100dvh - 96px); overflow: auto; }
  .site-navigation > * { flex-shrink: 0; }
  .site-nav-links { flex-direction: column; align-items: stretch; gap: 4px; }
  .site-header .site-nav-links a { justify-content: flex-start; padding: 12px 14px; font-size: 16px; }
  .site-header .site-nav-actions { border-top: 1px solid var(--site-line); padding-top: 14px; gap: 12px; }
  .site-nav-actions a { flex: 1; }
  .site-header a.site-mobile-help { display: inline-flex; align-self: center; min-height: 44px; }
}
@media (max-width: 600px) {
  .site-header-inner, .site-footer-inner { padding-left: 20px; padding-right: 20px; }
  .site-brand img { width: 132px; }
  .site-navigation { left: 16px; right: 16px; }
  .site-footer-top { grid-template-columns: 1fr 1fr; gap: 30px 24px; }
  .site-footer-brand { grid-column: 1 / -1; }
  .site-footer { margin-top: 44px; }
  .site-footer a:not(.site-brand), .site-footer button { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; }.site-header *, .site-footer * { transition: none !important; } }

/* Comfortable touch targets and readable form fields on phones and tablets. */
@media (pointer: coarse) {
  .link-list a { display: flex; align-items: center; min-height: 44px; }
  .chips button, .tweak .acts .btn, .tweak .link, .colour-reset, .site-footer a:not(.site-brand), .site-footer button { min-height: 44px; }
  .tweak .link, .colour-reset { min-width: 44px; }
  .tweak summary { min-height: 44px; padding: 10px 0; }
  .colour-swatch, .panel input[type="color"] { width: 44px; height: 44px; flex-basis: 44px; }
  .panel input[type="text"], .panel input[type="number"], .panel input.colour-hex, .panel select { min-height: 44px; font-size: 16px; }
  .filters input[type="search"] { min-height: 44px; font-size: 16px; }
  .faq summary { min-height: 44px; padding-top: 8px; padding-bottom: 8px; }
  .form .links a { display: inline-flex; align-items: center; min-height: 44px; }
  .analytics-settings { min-height: 44px; }
}
@media (pointer: coarse) and (max-width: 640px) {
  .colour-presets { grid-template-columns: repeat(4, 44px); }
}
