/* The top bar and footer. Loaded by every page, old and new, so class names stay
   unique and every property is set here rather than inherited from the page. */
:root {
  --tb-display: 'Plus Jakarta Sans Variable', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --tb-body: 'Inter Variable', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --tb-cta: #3f8530;
  --tb-cta-hover: #336d27;
  --tb-surface: #ffffff;
  --tb-fg: #0a0c0b;
  --tb-fg-2: #454d48;
  --tb-fg-3: #646d67;
  --tb-accent: #3f8530;
  --tb-rule: rgba(10, 12, 11, 0.1);
  --tb-hover: rgba(10, 12, 11, 0.05);
}
html[data-mode='night'], .sitefoot {
  --tb-surface: #101311;
  --tb-fg: #ffffff;
  --tb-fg-2: #cfd5d1;
  --tb-fg-3: #9aa39d;
  --tb-accent: #8fd077;
  --tb-rule: rgba(255, 255, 255, 0.11);
  --tb-hover: rgba(255, 255, 255, 0.08);
}
.topbar, .topbar *, .topbar *::before, .topbar *::after, .sitefoot, .sitefoot *, .sitefoot *::before, .sitefoot *::after { box-sizing: border-box; }
.topbar p, .sitefoot p, .topbar ul, .sitefoot ul, .sitefoot h2, .topbar address, .sitefoot address { margin: 0; padding: 0; list-style: none; font-style: normal; }
.topbar a, .sitefoot a { color: inherit; text-decoration: none; }
.topbar a, .topbar button { min-width: 0; min-height: 0; }
.topbar button { margin: 0; padding: 0; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; }
.topbar img, .sitefoot img { display: block; max-width: 100%; }
.topbar :focus-visible, .sitefoot :focus-visible { outline: 2px solid #8fd077; outline-offset: 2px; border-radius: 6px; }
[data-nav='light'] .tb-bar :focus-visible, [data-mode='day'] .tb-panel :focus-visible, [data-mode='day'] .tb-sheet :focus-visible { outline-color: #0a0c0b; }

.topbar {
  position: fixed;
  top: 12px;
  left: clamp(10px, 1.6vw, 24px);
  right: clamp(10px, 1.6vw, 24px);
  z-index: 60;
  max-width: 1560px;
  margin-inline: auto;
  font-family: var(--tb-body);
  font-size: 15px;
  line-height: 1.4;
  letter-spacing: normal;
}
.tb-bar {
  position: relative;
  display: flex;
  align-items: center;
  height: 60px;
  padding: 0 10px 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: rgba(7, 9, 8, 0.66);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  color: #fff;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s, box-shadow 0.25s;
}
[data-nav='light'] .tb-bar {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(10, 12, 11, 0.12);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.08);
  color: #0a0c0b;
}
.tb-logo { position: relative; display: block; flex-shrink: 0; width: 136px; height: 30px; }
.tb-logo img { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity 0.2s; }
.tb-logo-light { opacity: 0; }
[data-nav='light'] .tb-logo-light { opacity: 1; }
[data-nav='light'] .tb-logo-dark { opacity: 0; }

.tb-nav { display: flex; align-items: center; gap: 2px; margin-left: clamp(14px, 2.4vw, 40px); }
.topbar .tb-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 13px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 0.15s;
}
.tb-item svg { opacity: 0.7; transition: transform 0.2s; }
.tb-item:hover, .tb-group.is-open > .tb-item { background: rgba(255, 255, 255, 0.13); }
[data-nav='light'] .tb-item:hover, [data-nav='light'] .tb-group.is-open > .tb-item { background: rgba(10, 12, 11, 0.06); }
.tb-group.is-open > .tb-item svg { transform: rotate(180deg); }
.tb-item.is-current::after { content: ''; position: absolute; left: 13px; right: 13px; bottom: 3px; height: 2px; border-radius: 2px; background: #8fd077; }
[data-nav='light'] .tb-item.is-current::after { background: var(--tb-cta); }

.tb-cta {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  height: 40px;
  margin-left: auto;
  padding: 0 18px;
  border-radius: 10px;
  background: var(--tb-cta);
  color: #fff !important;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.15s;
}
.tb-cta:hover { background: var(--tb-cta-hover); }

/* ---------------------------------------------------------------- panels */
.tb-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding: 24px;
  border: 1px solid var(--tb-rule);
  border-radius: 18px;
  background: var(--tb-surface);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
  color: var(--tb-fg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.2, 0.7, 0.2, 1), visibility 0.18s;
}
.tb-group.is-open > .tb-panel { opacity: 1; visibility: visible; transform: none; }
.tb-group::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 10px; display: none; }
.tb-group.is-open::after { display: block; }
.tb-layers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.tb-layer { padding: 4px 12px 8px; border-left: 1px solid var(--tb-rule); }
.tb-layer:first-child { border-left: 0; }
.tb-step { padding-left: 10px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; color: var(--tb-accent); font-variant-numeric: tabular-nums; }
.tb-layer-title { margin-top: 2px !important; padding-left: 10px; color: var(--tb-fg); font-family: var(--tb-display); font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.tb-layer-line { margin-bottom: 10px !important; padding-left: 10px; font-size: 13px; color: var(--tb-fg-3); }
.tb-link { display: block; padding: 9px 10px; border-radius: 10px; transition: background-color 0.12s; }
.tb-link:hover { background: var(--tb-hover); }
.tb-link strong { display: flex; align-items: center; gap: 7px; font-size: 14.5px; font-weight: 600; color: var(--tb-fg); }
.tb-link span { display: block; margin-top: 1px; font-size: 12.5px; line-height: 1.35; color: var(--tb-fg-2); }
.tb-dot { flex-shrink: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--tb-accent); }
.tb-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; margin-top: 14px; padding: 14px 10px 0; border-top: 1px solid var(--tb-rule); font-size: 13.5px; }
.tb-legend { display: inline-flex; align-items: center; gap: 7px; margin-right: auto; color: var(--tb-fg-3); font-size: 12.5px; }
.tb-more { font-weight: 600; color: var(--tb-accent) !important; }
.tb-more::after { content: ' →'; }
.tb-more:hover { text-decoration: underline !important; text-underline-offset: 3px; }
.tb-split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; }
.tb-panel-lead { margin-bottom: 12px !important; padding-left: 10px; color: var(--tb-fg); font-family: var(--tb-display); font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.tb-list { display: grid; gap: 2px 8px; }
.tb-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tb-feature { display: block; padding: 10px; border-radius: 12px; background: var(--tb-hover); transition: background-color 0.15s; }
.tb-feature:hover { background: var(--tb-rule); }
.tb-feature img { width: 100%; height: 150px; object-fit: cover; border-radius: 8px; }
.tb-feature strong { display: block; margin-top: 10px; font-family: var(--tb-display); font-size: 17px; font-weight: 700; color: var(--tb-fg); }
.tb-feature span { display: block; margin-top: 2px; font-size: 13px; line-height: 1.4; color: var(--tb-fg-2); }
.tb-reach { display: grid; align-content: start; gap: 6px; padding: 14px; border-radius: 12px; background: var(--tb-hover); font-size: 13.5px; color: var(--tb-fg-2); }
.tb-reach strong { font-family: var(--tb-display); font-size: 17px; font-weight: 700; color: var(--tb-fg); }
.tb-reach a { font-weight: 600; color: var(--tb-accent) !important; }

/* ---------------------------------------------------------------- phones and tablets */
.topbar .tb-burger { display: none; position: relative; width: 44px; height: 44px; margin-left: auto; border-radius: 10px; }
.tb-burger span { position: absolute; left: 11px; width: 22px; height: 2px; border-radius: 2px; background: currentColor; transition: transform 0.2s, top 0.2s; }
.tb-burger span:first-child { top: 17px; }
.tb-burger span:last-child { top: 25px; }
.sheet-open .tb-burger span:first-child { top: 21px; transform: rotate(45deg); }
.sheet-open .tb-burger span:last-child { top: 21px; transform: rotate(-45deg); }
.tb-sheet {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: calc(100vh - 96px);
  max-height: calc(100dvh - 96px);
  overflow-y: auto;
  padding: 8px 18px 18px;
  border: 1px solid var(--tb-rule);
  border-radius: 18px;
  background: var(--tb-surface);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
  color: var(--tb-fg);
}
.tb-sheet[hidden] { display: none; }
.tb-sheet summary, .tb-sheet-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  border-bottom: 1px solid var(--tb-rule);
  font-family: var(--tb-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.015em;
  list-style: none;
  cursor: pointer;
}
.tb-sheet summary::-webkit-details-marker { display: none; }
.tb-sheet summary::after { content: '+'; font-size: 20px; font-weight: 400; color: var(--tb-accent); }
.tb-sheet details[open] summary::after { content: '–'; }
.tb-sheet-head { margin-top: 10px !important; font-size: 11.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--tb-accent); }
.tb-sheet details ul { padding-bottom: 4px; }
.tb-sheet details li a { display: flex; align-items: center; min-height: 42px; color: var(--tb-fg-2); }
.tb-sheet-cta { display: flex; align-items: center; justify-content: center; height: 50px; margin-top: 16px; border-radius: 12px; background: var(--tb-cta); color: #fff !important; font-weight: 600; }
@media (max-width: 1080px) {
  .tb-nav, .tb-bar > .tb-cta { display: none; }
  .topbar .tb-burger { display: block; }
  .tb-bar { padding-left: 16px; }
}
@media (prefers-reduced-motion: reduce) { .topbar *, .topbar { transition: none !important; } }

/* ---------------------------------------------------------------- footer, black in both modes */
.sitefoot { background: #0a0c0b; color: var(--tb-fg-2); font-family: var(--tb-body); font-size: 14px; line-height: 1.5; letter-spacing: normal; }
html[data-mode='night'] .sitefoot { border-top: 1px solid var(--tb-rule); }
.sf-inner { max-width: 1480px; margin: 0 auto; padding: clamp(3rem, 6vw, 5rem) clamp(1rem, 4vw, 3.5rem) 2rem; }
.sf-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.5rem 3rem; padding-bottom: clamp(2rem, 4vw, 3.5rem); border-bottom: 1px solid var(--tb-rule); }
.sf-line { max-width: 18em; font-family: var(--tb-display); font-size: clamp(1.75rem, 3.6vw, 3rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.08; color: #fff; }
.sf-line .sf-accent { display: block; color: #bfe8ab; }
.tb-apos { margin-inline: -0.075em; }
.sf-cta { margin-left: 0; height: 48px; padding: 0 24px; font-size: 15px; }
.sf-cols { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2rem 1.5rem; padding-block: clamp(2rem, 4vw, 3rem); }
.sf-cols h2 { margin-bottom: 0.625rem; font-family: var(--tb-body); font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: #fff; }
.sf-cols a { display: inline-block; padding: 0.25rem 0; line-height: 1.35; }
.sitefoot a:hover { color: var(--tb-accent); }
.sf-base { padding-right: 56px; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--tb-rule); font-size: 13px; }
.sf-base img { width: 118px; height: auto; }
.sf-base address { flex: 1 1 320px; line-height: 1.55; }
.sf-base p { color: var(--tb-fg-3); }
.sf-base .sf-notice { flex-basis: 100%; }
.sf-notice a { text-decoration: underline; text-underline-offset: 2px; }
.sf-social { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }
@media (max-width: 1180px) { .sf-cols { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 720px) { .sf-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Page furniture hidden when stills are captured from the live scene. */
.capture .topbar, .capture .sitefoot { display: none !important; }
