/* One site frame for every EnviroRegIndex experience. */
:root {
  --site-content-max: 1200px;
  --site-gutter: 24px;
  --site-gutter-mobile: 16px;
  --site-shell-border: #d9d5cb;
}

eri-global-header {
  display: block;
  position: sticky;
  top: 0;
  z-index: 100;
}

.global-header {
  background: #191917;
  border-bottom: 3px solid #2e7d52;
}

.global-header-inner {
  width: min(var(--site-content-max), calc(100% - (2 * var(--site-gutter))));
  min-height: 56px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.global-header-logo {
  flex-shrink: 0;
  color: #fff;
  font: 600 14px 'IBM Plex Mono', monospace;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.global-header-logo span { color: #5cce8a; }

.global-header-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.global-header-link {
  padding: 6px 14px;
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.55);
  font: 500 12px 'DM Sans', sans-serif;
  letter-spacing: 0.03em;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}

.global-header-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.global-header-link.active {
  color: #5cce8a;
  background: rgba(92, 206, 138, 0.1);
}

.global-header-link:focus-visible,
.global-header-logo:focus-visible {
  outline: 2px solid #5cce8a;
  outline-offset: 2px;
}

eri-global-footer {
  display: block;
  margin-top: auto;
}

.global-footer {
  margin-top: 64px;
  padding: 0;
  border-top: 1px solid var(--site-shell-border);
  background: #fff;
}

.global-footer-inner {
  width: min(var(--site-content-max), calc(100% - (2 * var(--site-gutter))));
  min-height: 92px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.global-footer-logo {
  color: #1d1d1a;
  font: 600 15px 'IBM Plex Mono', monospace;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.global-footer-logo span { color: #247a49; }

.global-footer-inner p {
  margin: 0;
  color: #85827a;
  font: 400 12px 'DM Sans', sans-serif;
  text-align: right;
}

/* Shared outer content width; page-specific components retain their own layout. */
.container,
.hero-inner,
.platform-main,
.workflow-main,
.workflow-detail-main {
  width: min(var(--site-content-max), calc(100% - (2 * var(--site-gutter))));
  max-width: none;
  margin-left: auto;
  margin-right: auto;
  padding-left: 0;
  padding-right: 0;
}

#workflow-content,
.workflow-detail-loading,
.workflow-detail-error { max-width: 980px; }

@media (max-width: 768px) {
  .global-header-inner {
    width: calc(100% - (2 * var(--site-gutter-mobile)));
    min-height: 56px;
    gap: 10px;
  }

  .global-header-logo { font-size: 12px; }
  .global-header-link { padding: 6px 8px; font-size: 11px; }

  .global-footer-inner {
    width: calc(100% - (2 * var(--site-gutter-mobile)));
    min-height: 112px;
    padding: 24px 0;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;
  }

  .global-footer-inner p { text-align: left; }

  .container,
  .hero-inner,
  .platform-main,
  .workflow-main,
  .workflow-detail-main {
    width: calc(100% - (2 * var(--site-gutter-mobile)));
  }
}
