/* ─────────────────────────────────────────
   THE CARBON WORKBENCH - site-header.css
   One shared public header for every marketing, calculator,
   Learn and Field Kit page. Prefixed .tcwh- so it cannot
   collide with page-level nav styles.
   ───────────────────────────────────────── */

.tcwh-skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 1000;
  padding: 10px 16px;
  border-radius: 6px;
  background: #46a074;
  color: #0c1512;
  font: 600 14px/1.2 "Instrument Sans", system-ui, -apple-system, sans-serif;
  text-decoration: none;
}
.tcwh-skip:focus { top: 10px; }

.tcwh {
  position: sticky;
  top: 0;
  z-index: 900;
  background: #0c1512;
  border-bottom: 1px solid #24352e;
  font-family: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
.tcwh-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  max-width: 1240px;
  height: 60px;
  margin: 0 auto;
  padding: 0 24px;
}
.tcwh-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: #f1f4f2;
  text-decoration: none;
  white-space: nowrap;
}
.tcwh-brand img { width: 26px; height: 27px; display: block; }
.tcwh-brand span {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 20px;
  letter-spacing: -0.01em;
  line-height: 1;
}
.tcwh-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: auto;
}
.tcwh .tcwh-nav a,
.tcwh .tcwh-signin {
  padding: 8px 12px;
  border-radius: 6px;
  color: #c9d6cf;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  background: transparent;
  border: 0;
}
.tcwh .tcwh-nav a:hover,
.tcwh .tcwh-signin:hover { color: #ffffff; background: #16241f; }
.tcwh-nav a[aria-current="page"] {
  color: #ffffff;
  box-shadow: inset 0 -2px 0 #46a074;
  border-radius: 0;
}
.tcwh-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.tcwh .tcwh-cta {
  padding: 9px 16px;
  border-radius: 7px;
  background: #46a074;
  color: #0c1512;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.tcwh .tcwh-cta:hover { background: #5ab686; }

.tcwh a:focus-visible,
.tcwh summary:focus-visible {
  outline: 2px solid #7fd3a6;
  outline-offset: 2px;
}

/* Mobile menu: a native <details>, so it works without JavaScript */
.tcwh-menu { display: none; position: relative; }
.tcwh-menu summary {
  list-style: none;
  cursor: pointer;
  padding: 8px 12px;
  border: 1px solid #33473f;
  border-radius: 7px;
  color: #e6ebe8;
  font-size: 14px;
  font-weight: 600;
}
.tcwh-menu summary::-webkit-details-marker { display: none; }
.tcwh-menu[open] summary { background: #16241f; }
.tcwh-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  display: grid;
  min-width: 230px;
  padding: 8px;
  border: 1px solid #24352e;
  border-radius: 10px;
  background: #0c1512;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}
.tcwh-menu-panel a {
  padding: 11px 12px;
  border-radius: 6px;
  color: #e6ebe8;
  font-size: 15px;
  text-decoration: none;
}
.tcwh-menu-panel a:hover { background: #16241f; }
.tcwh-menu-panel hr { border: 0; border-top: 1px solid #24352e; margin: 6px 4px; }

#main-content:focus { outline: none; }

@media (max-width: 900px) {
  .tcwh-nav, .tcwh-signin { display: none; }
  .tcwh-menu { display: block; }
  .tcwh-inner { gap: 12px; padding: 0 16px; }
  .tcwh-actions { margin-left: auto; }
}
@media (max-width: 380px) {
  .tcwh-brand span { font-size: 17px; }
  .tcwh .tcwh-cta { padding: 8px 12px; }
}

/* Respect the reduced-motion preference across every public page */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Legacy page styles give .nav-link-signin and .nav-cta !important colours
   and borders; these keep the shared header's own treatment. */
.tcwh a.tcwh-signin { color: #c9d6cf !important; border: 0 !important; background: transparent !important; font-size: 14px !important; }
.tcwh a.tcwh-signin:hover { color: #ffffff !important; background: #16241f !important; }
.tcwh a.tcwh-cta { color: #0c1512 !important; background: #46a074 !important; border: 0 !important; font-size: 14px !important; }
.tcwh a.tcwh-cta:hover { background: #5ab686 !important; }
