/* Slim sticky site bar for static HTML tools — sits above each app’s own topbar. */
:root {
  --site-chrome-h: 48px;
  /* Matches Next.js SiteHeader row height (logo scales with viewport). */
  --site-header-row-est: clamp(3.75rem, 18vw, 6.5rem);
  /* Approximate tool row height for scroll-padding (title + actions + padding). */
  --app-tool-row-est: 4.25rem;
}

html {
  scroll-padding-top: calc(var(--site-chrome-h) + 8px);
}

html:has(body.site-chrome--merged) {
  /* Headers scroll with the page — no sticky offset needed */
  scroll-padding-top: 8px;
}

/* Legacy: fixed strip only (no merged tool row). */
body.has-site-chrome:not(.site-chrome--merged) {
  padding-top: var(--site-chrome-h);
}

body.has-site-chrome.site-chrome--merged {
  padding-top: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

/* Header is out of .app — let .app fill the viewport below the merged banner. */
body.has-site-chrome.site-chrome--merged .app-site-header {
  flex-shrink: 0;
}

body.has-site-chrome.site-chrome--merged .app {
  flex: 1 1 auto;
  min-height: 0;
}

/*
 * Merged header: site row + tool row (scrolls with page — not sticky).
 */
.app-site-header {
  position: relative;
  top: auto;
  z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  background: transparent;
  border-bottom: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.app-site-header .site-header-next {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
}

.app-site-header .topbar.topbar--tool {
  border-bottom: none;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  /* Safe area lives on .app-site-header; avoid double inset on the tool row */
  padding-top: clamp(8px, 2vw, 12px);
  padding-bottom: clamp(8px, 2vw, 14px);
}

.site-footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 16px;
  padding: 14px 16px 0;
  margin: 0 auto;
  max-width: 1200px;
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: 0.78rem;
}

.site-footer-legal a {
  color: #64748b;
  text-decoration: none;
  font-weight: 600;
}

.site-footer-legal a:hover {
  color: #c2410c;
  text-decoration: underline;
}

.footer-properties-note {
  margin: 0.75rem auto 0;
  max-width: 42rem;
  padding: 0 16px;
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: 0.72rem;
  line-height: 1.55;
  color: #78716c;
  text-align: center;
}

.site-footer-unified .footer-properties-note {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}
