/* TrulySovereign shared header and footer.
   Matches the live main site: Inter title-case nav, cyan Contact button,
   Tools link with a chevron, footer in title case except uppercase tool names.
   Tokens from ts-design.css when present; fallbacks included. */

:root {
  --ts-cyan: #00ccff;
  --ts-navy: #070b16;
  --ts-night: #00030a;
  --ts-font-display: "Orbitron", "Segoe UI", sans-serif;
  --ts-font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ts-font-mono: "Share Tech Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ts-chrome-max: 1280px;
  --ts-chrome-pad: 40px;
  --ts-chrome-muted: #b4c4d0;
}

html:has(.ts-chrome-bar) { overflow-x: clip; }

.ts-chrome-skip {
  position: absolute;
  left: 1rem;
  top: 0.5rem;
  z-index: 200;
  transform: translateY(-6rem);
  background: var(--ts-night, #00030a);
  color: var(--ts-cyan, #00ccff);
  padding: 0.75rem 1rem;
  border-radius: 2px;
  text-decoration: none;
  font-family: var(--ts-font-body);
}
.ts-chrome-skip:focus { transform: none; }

/* Full-bleed bar/footer. Resets any host-page nav/footer rules (borders, max-width, uppercase). */
.ts-chrome-bar,
.ts-chrome-foot {
  box-sizing: border-box;
  width: 100vw;
  max-width: 100vw !important;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background: var(--ts-navy, #070b16);
  color: #e1e7ef;
  font-family: var(--ts-font-body);
  -webkit-font-smoothing: antialiased;
  border: 0;
}

.ts-chrome-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  margin-top: -1.5rem;
  border-bottom: 0;
}

.ts-chrome-bar__inner,
.ts-chrome-sub__inner,
.ts-chrome-foot__inner {
  box-sizing: border-box;
  max-width: var(--ts-chrome-max);
  margin: 0 auto;
  padding: 0 var(--ts-chrome-pad);
}

.ts-chrome-bar__inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ts-chrome-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
  border-radius: 2px;
  border: 0;
}
.ts-chrome-brand:hover .ts-chrome-logo {
  filter: drop-shadow(0 0 12px hsl(192 100% 50% / 0.4));
}
.ts-chrome-brand:focus-visible,
.ts-chrome-nav a:focus-visible,
.ts-chrome-more a:focus-visible,
.ts-chrome-foot a:focus-visible,
.ts-chrome-sub a:focus-visible,
.ts-chrome-more > summary:focus-visible {
  outline: 2px solid var(--ts-cyan, #00ccff);
  outline-offset: 2px;
}

.ts-chrome-logo { width: 36px; height: 36px; display: block; flex-shrink: 0; }
.ts-chrome-logo--sm { width: 28px; height: 28px; }

.ts-chrome-wordmark {
  font-family: var(--ts-font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ts-cyan, #00ccff);
  text-shadow: 0 0 18px hsl(192 100% 50% / 0.35);
}

.ts-chrome-slash {
  color: #3a4660;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 0.15rem;
}

.ts-chrome-tool {
  font-family: var(--ts-font-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
}

.ts-chrome-badge {
  font-family: var(--ts-font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ffc35c;
  border: 1px solid rgba(245, 165, 36, 0.55);
  background: rgba(245, 165, 36, 0.08);
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
  white-space: nowrap;
}
.ts-chrome-badge:empty { display: none; }

/* Primary nav: Inter, 14px, title case, wide gaps — same as the live site. */
.ts-chrome-bar nav.ts-chrome-nav {
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  max-width: none;
  position: static;
  display: none;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 1.5rem;
  background: transparent;
}
.ts-chrome-nav a {
  font-family: var(--ts-font-body) !important;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  color: var(--ts-chrome-muted);
  text-decoration: none !important;
  padding: 0.5rem 0;
  border: 0;
  border-bottom: 0 !important;
  background: transparent;
  line-height: 1.25;
}
.ts-chrome-nav a:hover { color: #fff; }
.ts-chrome-nav a.ts-chrome-tools {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}
.ts-chrome-chevron {
  width: 14px;
  height: 14px;
  display: block;
  opacity: 0.85;
}
.ts-chrome-nav a.ts-chrome-contact {
  margin-left: 0.15rem;
  padding: 0.5rem 1rem;
  border: 1px solid hsl(192 100% 50% / 0.5) !important;
  border-radius: 4px;
  color: var(--ts-cyan, #00ccff);
  background: transparent;
}
.ts-chrome-nav a.ts-chrome-contact:hover {
  background: hsl(192 100% 50% / 0.08);
  color: var(--ts-cyan, #00ccff);
  border-color: var(--ts-cyan, #00ccff) !important;
}

.ts-chrome-more {
  margin-left: auto;
  position: relative;
  border: 0;
}
.ts-chrome-more > summary {
  list-style: none;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #e1e7ef;
  font-family: var(--ts-font-body);
  font-size: 14px;
  letter-spacing: normal;
  text-transform: none;
}
.ts-chrome-more > summary::-webkit-details-marker { display: none; }
.ts-chrome-more nav {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  min-width: 16rem;
  background: #0b0f1c;
  border: 1px solid #1d2438;
  border-radius: 10px;
  padding: 0.4rem;
  margin: 0;
  max-width: none;
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.4);
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: stretch;
}
.ts-chrome-more nav a {
  font-family: var(--ts-font-body);
  font-size: 14px;
  letter-spacing: normal;
  text-transform: none;
  color: var(--ts-chrome-muted);
  text-decoration: none !important;
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 0.75rem;
  border: 0;
  border-radius: 6px;
}
.ts-chrome-more nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

@media (min-width: 960px) {
  .ts-chrome-bar nav.ts-chrome-nav { display: flex; }
  .ts-chrome-more { display: none; }
}
@media (max-width: 720px) {
  .ts-chrome-wordmark { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ts-chrome-slash { display: none; }
  .ts-chrome-bar { margin-top: 0; }
  :root { --ts-chrome-pad: 20px; }
}

/* Slim secondary bar for the tool's own page links. Hidden when empty. */
.ts-chrome-sub:not(:has(a)) { display: none; }
.ts-chrome-bar nav.ts-chrome-sub {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  max-width: none;
  position: static;
  background: #060910;
}
.ts-chrome-sub__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 1.35rem;
  min-height: 36px;
  padding-top: 0;
  padding-bottom: 0;
}
.ts-chrome-sub a {
  font-family: var(--ts-font-body) !important;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  color: #8d9ab0;
  text-decoration: none !important;
  padding: 0.45rem 0;
  border: 0 !important;
  border-bottom: 0 !important;
  background: transparent;
  line-height: 1.2;
}
.ts-chrome-sub a:hover { color: #fff; }
.ts-chrome-sub a[aria-current="page"] {
  color: #eef4f8;
  box-shadow: inset 0 -2px 0 var(--ts-cyan, #00ccff);
}

/* Footer */
.ts-chrome-foot {
  margin-top: 3rem;
  margin-bottom: -1.5rem;
  font-size: 14px;
  padding: 0 0 2rem;
  border-top: 0;
}
.ts-chrome-foot__rule {
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(0, 204, 255, 0.5), transparent);
}
.ts-chrome-foot__note {
  max-width: var(--ts-chrome-max);
  margin: 0 auto;
  padding: 1.25rem var(--ts-chrome-pad) 0;
  color: var(--ts-chrome-muted);
  font-size: 0.85rem;
  font-family: var(--ts-font-body);
}
.ts-chrome-foot__note:empty { display: none; }
.ts-chrome-foot__note p { margin: 0 0 0.5rem; }
.ts-chrome-foot__note a { color: #b9c6d8; font-family: var(--ts-font-body); text-transform: none; }
.ts-chrome-foot__note a:hover { color: #fff; }

.ts-chrome-foot__inner { padding-top: 2.5rem; }
.ts-chrome-foot__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
@media (min-width: 640px) {
  .ts-chrome-foot__grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 960px) {
  .ts-chrome-foot__grid { grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 2.5rem; }
}

.ts-chrome-foot__tagline {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  color: var(--ts-chrome-muted);
  font-family: var(--ts-font-body);
  letter-spacing: normal;
  text-transform: none;
}
.ts-chrome-foot__heading {
  font-family: var(--ts-font-display);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8d9ab0;
  margin: 0 0 0.5rem;
}

/* Kill host-page <nav> borders (the extra short rules under the last link in each column). */
.ts-chrome-foot nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  max-width: none !important;
  position: static;
  background: transparent;
}
.ts-chrome-foot nav a {
  font-family: var(--ts-font-body) !important;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  color: var(--ts-chrome-muted) !important;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0;
  min-height: 44px;
  border: 0 !important;
  border-bottom: 0 !important;
  background: transparent;
  line-height: 1.4;
}
@media (min-width: 640px) {
  .ts-chrome-foot nav a { min-height: 0; padding: 0.32rem 0; }
}
.ts-chrome-foot nav a:hover { color: var(--ts-cyan, #00ccff) !important; }
.ts-chrome-foot .ts-chrome-toolname { text-transform: uppercase; }
.ts-chrome-foot .ts-chrome-toolname--written { text-transform: none !important; }

.ts-chrome-foot__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  font-family: var(--ts-font-body);
  font-size: 13px;
  letter-spacing: normal;
  text-transform: none;
  color: var(--ts-chrome-muted);
  border-top: 1px solid #1d2438;
  padding-top: 1.25rem;
  margin-top: 0.25rem;
}
.ts-chrome-foot__legal nav {
  flex-direction: row !important;
  gap: 1.25rem;
  border: 0 !important;
  padding: 0 !important;
}
.ts-chrome-foot__legal nav a {
  min-height: 44px;
  text-transform: none;
}

@media (max-width: 720px) {
  .ts-chrome-foot { margin-bottom: 0; }
}
