/*
 * Site chrome shared by every public page: the navigation bar, the mobile menu,
 * the footer and the language picker. Loaded last in <head>; the :root prefix
 * outranks the older per-page stylesheets at equal specificity.
 */
@font-face {
  font-display: swap;
  font-family: "Geist";
  font-style: normal;
  font-weight: 400 700;
  src: url("/assets/fonts/geist-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --font-text: "Geist", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --chrome-max: 1200px;
  --chrome-pad: clamp(16px, 4vw, 40px);
  --chrome-height: 64px;
  --chrome-ink: #0f172a;
  --chrome-muted: #475569;
  --chrome-line: #e2e8f0;
  --chrome-blue: #2f5be4;
  --chrome-blue-dark: #2349c4;
  --ts-public-header-height: var(--chrome-height);
}

/* Header ------------------------------------------------------------------ */
/* Light bar by default. Over the dark hero it starts transparent with white
   text and turns into the light bar once the page scrolls. */
:root .ts-public-header {
  --chrome-fg: var(--chrome-ink);
  --chrome-fg-muted: var(--chrome-muted);
  --chrome-hover: rgba(15, 23, 42, .05);
  --chrome-border: var(--chrome-line);
  --chrome-cta: var(--chrome-blue);
  --chrome-cta-hover: var(--chrome-blue-dark);
  --chrome-cta-fg: #fff;
  -webkit-backdrop-filter: saturate(180%) blur(12px) !important;
  backdrop-filter: saturate(180%) blur(12px) !important;
  background: rgba(255, 255, 255, .94) !important;
  border: 0 !important;
  box-shadow: inset 0 -1px 0 var(--chrome-line) !important;
  color: var(--chrome-fg);
  font-family: var(--font-text);
  min-height: 0;
  padding: 0 max(var(--chrome-pad), env(safe-area-inset-right)) 0 max(var(--chrome-pad), env(safe-area-inset-left));
  position: sticky;
  top: 0;
  transition: background-color .2s ease, box-shadow .2s ease;
  z-index: 60;
}
:root .ts-public-header--overlay { left: 0; position: fixed; right: 0; top: 0; }
:root .ts-public-header--overlay:not(.ts-public-header--light):not(.is-scrolled):not(.is-open) {
  --chrome-fg: #fff;
  --chrome-fg-muted: rgba(255, 255, 255, .78);
  --chrome-hover: rgba(255, 255, 255, .1);
  --chrome-border: rgba(255, 255, 255, .22);
  --chrome-cta: #fff;
  --chrome-cta-hover: #e8eeff;
  --chrome-cta-fg: var(--chrome-ink);
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  background: transparent !important;
  box-shadow: none !important;
}
:root .ts-public-header--light:not(.is-scrolled) { box-shadow: none !important; }
:root .ts-public-header__inner {
  background: none;
  border: 0;
  gap: 4px;
  height: var(--chrome-height);
  justify-content: flex-start;
  margin: 0 auto;
  max-width: var(--chrome-max);
  min-height: 0;
  padding: 0;
  width: 100%;
}
:root .ts-public-brand, :root .ts-public-brand span { color: var(--chrome-fg) !important; }
:root .ts-public-brand { align-items: center; display: inline-flex; font-family: var(--font-text); font-size: 18px !important; font-weight: 650 !important; gap: 10px; letter-spacing: -.02em; margin-inline-end: 24px; text-decoration: none; }
:root .ts-public-brand > img { flex-basis: 32px !important; height: 32px !important; width: 32px !important; }

:root .ts-public-nav { align-items: center; display: flex; flex: 1; gap: 2px; margin: 0; min-width: 0; order: 1; }
:root .ts-public-header .ts-public-nav a {
  align-items: center;
  background: none;
  border: 0;
  border-radius: 8px;
  color: var(--chrome-fg-muted) !important;
  display: inline-flex;
  font-family: var(--font-text);
  font-size: 15px !important;
  font-weight: 500 !important;
  min-height: 38px;
  padding: 0 12px;
  text-decoration: none;
  transition: color .15s ease, background-color .15s ease;
}
:root .ts-public-header .ts-public-nav a:hover, :root .ts-public-header .ts-public-nav a:focus-visible { background: var(--chrome-hover); color: var(--chrome-fg) !important; }
:root .ts-public-header .ts-public-nav a[aria-current="page"] { color: var(--chrome-fg) !important; }
:root .ts-public-header :is(a, button):focus-visible { outline: 2px solid #6d8ff5; outline-offset: 2px; }
/* Sign in and the workspace button sit at the far end. */
:root .ts-public-nav [data-public-sign-in] { margin-inline-start: auto; }
:root .ts-public-nav [data-public-sign-in][hidden] + .ts-public-nav__manager { margin-inline-start: auto; }
:root .ts-public-header .ts-public-nav .ts-public-nav__manager {
  background: var(--chrome-cta) !important;
  border: 0 !important;
  border-radius: 10px;
  box-shadow: none !important;
  color: var(--chrome-cta-fg) !important;
  font-weight: 600 !important;
  margin-inline-start: 8px;
  min-height: 40px;
  padding: 0 16px;
  transform: none !important;
}
:root .ts-public-header .ts-public-nav .ts-public-nav__manager:hover { background: var(--chrome-cta-hover) !important; color: var(--chrome-cta-fg) !important; }
:root .ts-public-header__inner > .ts-language-control { margin-inline-start: 4px; order: 2; }

/* Two lines that fold into a cross. Absolute sizes keep older rules from skewing it. */
:root .ts-public-header .ts-public-nav-toggle { background: transparent; border: 0; border-radius: 10px; color: var(--chrome-fg); cursor: pointer; display: none; height: 44px; margin-inline-start: auto; order: 3; padding: 0; position: relative; width: 44px; }
:root .ts-public-header .ts-public-nav-toggle span { background: var(--chrome-fg) !important; border-radius: 1px; height: 1.5px; left: 12px; margin: 0; position: absolute; top: 17px; transition: transform .25s ease; width: 20px; }
:root .ts-public-header .ts-public-nav-toggle span:nth-child(2) { display: none; }
:root .ts-public-header .ts-public-nav-toggle span:nth-child(3) { top: 25px; }
:root .ts-public-header .ts-public-nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
:root .ts-public-header .ts-public-nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-4px) rotate(-45deg); }

/* Mobile menu: a white sheet under the bar with a plain list of links. */
@media (max-width: 1024px) {
  :root .ts-public-header__inner { flex-wrap: nowrap; height: 60px; }
  :root .ts-public-brand { margin-inline-end: auto; }
  :root .ts-public-header .ts-public-nav-toggle { display: block; flex: 0 0 44px; margin-inline-end: -8px; }
  /* A backdrop filter would make the fixed sheet position against the bar. */
  :root .ts-public-header.is-open { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; background: #fff !important; }
  :root .ts-public-nav {
    align-items: stretch;
    background: #fff;
    border-top: 1px solid var(--chrome-line);
    display: none;
    flex-direction: column;
    gap: 0;
    inset: 60px 0 0 0;
    max-height: none !important;
    overflow-y: auto;
    padding: 8px max(20px, env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
    position: fixed;
  }
  :root .ts-public-nav.is-open { display: flex; }
  :root .ts-public-header .ts-public-nav a:not(.ts-public-nav__manager):not([data-public-sign-in]) {
    border-bottom: 1px solid var(--chrome-line);
    border-radius: 0;
    color: var(--chrome-ink) !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    justify-content: space-between;
    min-height: 56px;
    padding: 0 4px;
  }
  :root .ts-public-header .ts-public-nav a:not(.ts-public-nav__manager):not([data-public-sign-in])::after {
    border-right: 1.5px solid #94a3b8;
    border-top: 1.5px solid #94a3b8;
    content: "";
    height: 7px;
    transform: rotate(45deg);
    width: 7px;
  }
  :root .ts-public-header .ts-public-nav a:hover, :root .ts-public-header .ts-public-nav a:focus-visible { background: none; }
  :root .ts-public-header .ts-public-nav [data-public-sign-in], :root .ts-public-header .ts-public-nav .ts-public-nav__manager {
    border-radius: 10px !important;
    font-size: 16px !important;
    justify-content: center;
    margin: 0 !important;
    min-height: 48px;
    width: 100%;
  }
  :root .ts-public-header .ts-public-nav [data-public-sign-in] { border: 1px solid #cbd5e1 !important; color: var(--chrome-ink) !important; margin-top: 24px !important; }
  :root .ts-public-header .ts-public-nav .ts-public-nav__manager { background: var(--chrome-blue) !important; color: #fff !important; margin-top: 10px !important; }
  :root .ts-public-nav > .ts-language-control { margin-top: 10px; order: 10; }
  :root .ts-public-nav > .ts-language-control .ts-language-choice { --lang-fg: var(--chrome-ink); --lang-border: #cbd5e1; justify-content: center; min-height: 48px; width: 100%; }
  html.ts-nav-open, html.ts-nav-open body { overflow: hidden; }
}

/* The skip link waits well above the page; its shadow would otherwise show
   through the bar's blur. */
:root .ts-skip-link:not(:focus) { box-shadow: none !important; top: -200px !important; }

/* Footer ------------------------------------------------------------------ */
.ts-footer {
  background: #f8fafc;
  border-top: 1px solid var(--chrome-line);
  color: var(--chrome-muted);
  font-family: var(--font-text);
  padding: 64px var(--chrome-pad) calc(28px + env(safe-area-inset-bottom));
}
.ts-footer__inner { display: grid; gap: 48px; grid-template-columns: minmax(220px, 1fr) minmax(0, 2.8fr); margin: 0 auto; max-width: var(--chrome-max); padding: 0; }
.ts-footer__lead { align-content: start; display: grid; gap: 14px; justify-items: start; }
.ts-footer__lead .ts-brand, .ts-footer__lead .ts-brand span { color: var(--chrome-ink) !important; font-family: var(--font-text); font-size: 18px !important; font-weight: 650 !important; letter-spacing: -.02em; text-decoration: none; }
.ts-footer__lead .ts-brand { align-items: center; display: inline-flex; gap: 10px; }
.ts-footer__lead .ts-brand > img { flex-basis: 32px !important; height: 32px !important; width: 32px !important; }
.ts-footer__lead p { color: var(--chrome-muted); font-size: 14px; line-height: 1.6; margin: 0; max-width: 32ch; }
.ts-footer__plan { align-items: center; background: #fff; border: 1px solid #cbd5e1; border-radius: 10px; color: var(--chrome-ink) !important; display: inline-flex; font-size: 14px; font-weight: 600; gap: 6px; min-height: 38px; padding: 0 14px; text-decoration: none !important; }
.ts-footer__plan:hover { border-color: #94a3b8; }
.ts-footer__grid { display: grid; gap: 32px 24px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.ts-footer__grid section { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ts-footer__grid h2 { color: var(--chrome-ink); font-size: 14px; font-weight: 600; letter-spacing: 0; line-height: 20px; margin: 0 0 8px; text-transform: none; }
.ts-footer__grid a { color: var(--chrome-muted) !important; font-size: 14px; line-height: 20px; padding: 5px 0; text-decoration: none !important; }
.ts-footer__grid a:hover, .ts-footer__grid a:focus-visible { color: var(--chrome-ink) !important; }
.ts-footer__bottom {
  align-items: center;
  border-top: 1px solid var(--chrome-line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  grid-column: 1 / -1;
  margin: 0;
  padding: 24px 0 0;
}
.ts-footer__bottom p { color: var(--chrome-muted); font-size: 13px; margin: 0; }
.ts-footer__bottom nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.ts-footer__bottom a { color: var(--chrome-muted) !important; font-size: 13px; text-decoration: none !important; }
.ts-footer__bottom a:hover, .ts-footer__bottom a:focus-visible { color: var(--chrome-ink) !important; }
.ts-footer__bottom > .ts-language-control { margin-inline-start: auto; }
.ts-footer a:focus-visible { border-radius: 4px; outline: 2px solid #6d8ff5; outline-offset: 2px; }
@media (max-width: 860px) {
  .ts-footer { padding-top: 48px; }
  .ts-footer__inner { gap: 36px; grid-template-columns: 1fr; }
  .ts-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ts-footer__bottom { align-items: flex-start; flex-direction: column; }
  .ts-footer__bottom > .ts-language-control { margin-inline-start: 0; order: -1; }
}

/* Language picker ---------------------------------------------------------- */
/* A button with globe, language and chevron. With a mouse it opens a searchable
   menu; on touch screens a native select covers the button instead. */
:root .ts-language-control { color: inherit; flex: 0 0 auto; font-family: var(--font-text); position: relative; }
:root .ts-language-control label { display: block; min-height: 0; position: relative; }
:root .ts-language-control .ts-language-choice {
  align-items: center;
  background: transparent;
  border: 1px solid var(--lang-border, color-mix(in srgb, currentColor 22%, transparent));
  border-radius: 8px;
  color: var(--lang-fg, currentColor);
  cursor: pointer;
  display: inline-flex !important;
  font-family: var(--font-text);
  font-size: 14px !important;
  font-weight: 500 !important;
  gap: 8px;
  inset: auto !important;
  justify-content: flex-start;
  min-height: 36px;
  padding: 0 10px;
  position: relative !important;
  transition: background-color .15s ease, border-color .15s ease;
  white-space: nowrap;
}
:root .ts-language-control label .ts-language-choice { pointer-events: none; }
/* i18n.css made the old face click-through; the button must take the click. */
:root .ts-language-control button.ts-language-choice { pointer-events: auto !important; }
:root .ts-language-control .ts-language-choice::after { content: none !important; }
:root .ts-language-control .ts-language-choice:hover, :root .ts-language-control label:hover .ts-language-choice { background: color-mix(in srgb, currentColor 7%, transparent); }
:root .ts-language-control button.ts-language-choice:focus-visible, :root .ts-language-control:focus-within label .ts-language-choice { outline: 2px solid #6d8ff5; outline-offset: 2px; }
.ts-language-choice__globe, .ts-language-choice__chevron { flex: none; height: 16px; opacity: .75; width: 16px; }
.ts-language-choice__chevron { height: 14px; width: 14px; }
.ts-language-choice__code { display: none; font-size: 13px; font-weight: 600; }
:root .ts-language-control--icon .ts-language-choice__name { display: none; }
:root .ts-language-control--icon .ts-language-choice__code { display: inline; }
:root .ts-language-control--icon .ts-language-choice { border-color: transparent; }
:root .ts-language-control select {
  appearance: none !important;
  border: 0 !important;
  color: transparent !important;
  cursor: pointer;
  font-size: 16px;
  height: 100% !important;
  inset: 0;
  min-height: 0 !important;
  opacity: 0;
  padding: 0 !important;
  position: absolute;
  width: 100% !important;
}
:root .ts-language-control option { color: var(--chrome-ink); }
.ts-public-header .ts-language-control { --lang-fg: var(--chrome-fg); --lang-border: var(--chrome-border); }
.ts-footer .ts-language-control { --lang-fg: var(--chrome-ink); --lang-border: #cbd5e1; }
:root .ts-footer .ts-language-control .ts-language-choice { background: #fff; min-height: 38px; padding: 0 12px; }

.ts-language-menu {
  animation: chrome-menu .12s ease;
  background: #fff;
  border: 1px solid var(--chrome-line);
  border-radius: 12px;
  box-shadow: 0 16px 40px -12px rgba(15, 23, 42, .22), 0 2px 6px rgba(15, 23, 42, .06);
  color: var(--chrome-ink);
  display: flex;
  flex-direction: column;
  font-family: var(--font-text);
  overflow: hidden;
  position: fixed;
  z-index: 1000;
}
@keyframes chrome-menu { from { opacity: 0; transform: translateY(-4px); } }
.ts-language-menu__search { border-bottom: 1px solid var(--chrome-line); padding: 8px; position: relative; }
.ts-language-menu__search svg { color: #64748b; height: 16px; left: 20px; pointer-events: none; position: absolute; top: 50%; translate: 0 -50%; width: 16px; }
.ts-language-menu__search input {
  appearance: none;
  background: #f8fafc;
  border: 1px solid var(--chrome-line);
  border-radius: 8px;
  color: var(--chrome-ink);
  font: 500 14px/1 var(--font-text);
  height: 38px;
  outline: none;
  padding: 0 12px 0 36px;
  width: 100%;
}
.ts-language-menu__search input::placeholder { color: #94a3b8; }
.ts-language-menu__search input:focus { background: #fff; border-color: var(--chrome-blue); box-shadow: 0 0 0 3px rgba(47, 91, 228, .15); }
.ts-language-menu__list { flex: 1; list-style: none; margin: 0; overflow-y: auto; overscroll-behavior: contain; padding: 6px; scrollbar-width: thin; }
.ts-language-menu__list li { align-items: center; border-radius: 6px; cursor: pointer; display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr) auto 16px; min-height: 38px; padding: 0 10px; }
.ts-language-menu__list li[hidden] { display: none; }
.ts-language-menu__list li span { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-language-menu__list li small { color: #64748b; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-language-menu__list li svg { color: var(--chrome-blue); grid-column: 3; height: 16px; width: 16px; }
.ts-language-menu__list li.is-active { background: #f1f5f9; }
.ts-language-menu__list li[aria-selected="true"] span { color: var(--chrome-blue); font-weight: 600; }
.ts-language-menu__empty { color: #64748b; font-size: 14px; margin: 0; padding: 16px; }

@media (prefers-reduced-motion: reduce) {
  :root .ts-public-header, :root .ts-public-header .ts-public-nav a, :root .ts-public-header .ts-public-nav-toggle span { transition: none; }
  .ts-language-menu { animation: none; }
}
