/* Cymetica company chrome — header + footer for templates extending base_company.html,
   plus the shared article layout of /forward-deployed-engineering and
   /biological-language-modeling.
   On the house tokens (static/css/tokens.css, TASK 119; ET-31156/ET-31157): every colour,
   face and spacing step below is a token, so the light theme comes from tokens.css's own
   light mapping and needs no re-paint here. Rule 1: the accent is the page's one primary
   action (the FDE form's Send button), so no chrome, focus ring or decoration carries it.
   The brand and headings stay on var(--font-display) = Archivo Black (header-font rule).
   The product header is fixed and the body is padded for it (critical.css: 60px desktop,
   90px <=768px). The company header is fixed too, at ONE height, so the offset is reset here. */

:root { --cy-header-h: 60px; }

body { padding-top: calc(var(--cy-header-h) + env(safe-area-inset-top, 0px)); background: var(--bg); color: var(--text); font-family: var(--sans); }
@media (max-width: 768px) {
  body { padding-top: calc(var(--cy-header-h) + env(safe-area-inset-top, 0px)); }
}

.cy-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: calc(var(--cy-header-h) + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  background: var(--bg);
  border-bottom: 1px solid var(--hairline);
}
.cy-header-inner {
  max-width: 1200px; margin: 0 auto; height: var(--cy-header-h);
  padding: 0 16px; display: flex; align-items: center; gap: 1.5rem;
}
.cy-brand {
  font-family: var(--font-display);
  font-size: 1.375rem; line-height: 1; letter-spacing: -0.01em;
  color: var(--text); text-decoration: none; white-space: nowrap;
}
.cy-brand:focus-visible { outline: 2px solid var(--text); outline-offset: 4px; border-radius: 2px; }
.cy-brand { flex: 0 0 auto; }
.cy-nav { margin-left: auto; min-width: 0; flex: 0 1 auto; display: flex; align-items: center; gap: 1.5rem; }
.cy-nav a {
  color: var(--text-2); text-decoration: none; font-size: 0.9375rem; font-family: var(--sans);
  line-height: 1; padding: 0.6rem 0; border-bottom: 2px solid transparent; white-space: nowrap;
}
.cy-nav a:hover, .cy-nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--hairline-strong); }
.cy-nav a:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 2px; }
.cy-contact-link { color: var(--text-2); text-decoration: none; font-size: 0.9375rem; font-family: var(--sans); white-space: nowrap; padding: 0.6rem 0; }
.cy-contact-link:hover { color: var(--text); text-decoration: underline; text-underline-offset: 4px; }
.cy-contact-link:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 2px; }
.cy-nav .cy-nav-short { display: none; }
/* ET-31020 item 1: Log in / Account sits in the header bar on every width. A secondary
   action: text on a hairline, not the accent (rule 1). */
.cy-login-link { flex: 0 0 auto; color: var(--text); text-decoration: none; font-size: 0.9375rem; font-family: var(--sans); white-space: nowrap;
  padding: 0.5rem 0.9rem; border: 1px solid var(--hairline-strong); border-radius: 8px; line-height: 1; }
.cy-login-link:hover { background: var(--surface-2); border-color: var(--text-3); }
.cy-login-link:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.cy-menu-auth { border-top: 1px solid var(--hairline); margin-top: 0.25rem; padding-top: 0.25rem; }

/* Hamburger menu (operator 2026-10-08): button in the header, slide-in panel from the right. */
.cy-menu-btn { flex: 0 0 auto; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--hairline); border-radius: 8px; color: var(--text); cursor: pointer; padding: 0; }
.cy-menu-btn:hover { border-color: var(--hairline-strong); color: var(--text); }
.cy-menu-btn:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.cy-menu-overlay { position: fixed; inset: 0; z-index: 1100; background: rgba(0, 0, 0, 0.6); opacity: 0; transition: opacity 0.2s ease; }
.cy-menu-overlay.open { opacity: 1; }
.cy-menu { position: fixed; top: 0; right: 0; bottom: 0; z-index: 1101; width: min(340px, 88vw);
  background: var(--surface); border-left: 1px solid var(--hairline); box-shadow: -8px 0 32px rgba(0, 0, 0, 0.45); font-family: var(--sans);
  padding: calc(env(safe-area-inset-top, 0px) + 8px) 12px 24px; overflow-y: auto; -webkit-overflow-scrolling: touch;
  transform: translateX(100%); transition: transform 0.22s ease; }
.cy-menu.open { transform: none; }
.cy-menu-head { display: flex; align-items: center; justify-content: space-between; height: 52px; padding: 0 4px 0 12px; }
.cy-menu-title { font-family: var(--font-display); font-size: 1.125rem; color: var(--text); }
.cy-menu-close { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 0;
  border-radius: 8px; color: var(--text-2); cursor: pointer; padding: 0; }
.cy-menu-close:hover { color: var(--text); }
.cy-menu-close:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.cy-menu-list { list-style: none; margin: 8px 0 0; padding: 0; }
.cy-menu-list a { display: flex; align-items: center; min-height: 48px; padding: 0 12px; border-radius: 8px;
  color: var(--text); text-decoration: none; font-size: 1rem; }
.cy-menu-list a:hover { background: var(--surface-2); color: var(--text); }
.cy-menu-list a:focus-visible { outline: 2px solid var(--text); outline-offset: -2px; }
.cy-menu-lang { margin: 16px 0 0; padding: 16px 12px 0; border-top: 1px solid var(--hairline); }
.cy-menu-lang-label { display: block; color: var(--text-2); font-size: 0.875rem; margin-bottom: 8px; }
/* the shared selector (i18n.css) rendered inline: full-width button, dropdown expands in place */
.cy-lang-slot .language-selector { width: 100%; position: relative; }
.cy-lang-slot .language-btn { width: 100%; justify-content: space-between; min-height: 48px; padding: 0 14px;
  background: var(--surface-2); border: 1px solid var(--hairline); border-radius: 8px; }
.cy-lang-slot .lang-code { display: inline; margin-left: 8px; }
.cy-lang-slot .language-dropdown { position: relative; top: 8px; left: 0; right: 0; transform: none; max-height: 0; overflow: hidden;
  opacity: 0; visibility: hidden; border: 0; padding: 0; box-shadow: none; border-radius: 8px; transition: opacity 0.2s ease; }
.cy-lang-slot .language-dropdown.open { max-height: none; overflow-y: auto; opacity: 1; visibility: visible; padding: 8px 0;
  border: 1px solid var(--hairline); }
.cy-lang-slot .language-option { padding: 12px 14px; }
html.cy-menu-open, html.cy-menu-open body { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .cy-menu, .cy-menu-overlay { transition: none; } }

/* Phones: two rows — brand on top, nav on its own horizontally scrollable row.
   Header height becomes 88px (the product header's mobile offset is 90px). */
@media (max-width: 720px) {
  :root { --cy-header-h: 88px; }
  .cy-header-inner { flex-wrap: wrap; gap: 0; align-content: flex-start; }
  .cy-brand { height: 48px; display: inline-flex; align-items: center; }
  .cy-header .cy-contact-link { margin-left: auto; height: 48px; display: inline-flex; align-items: center; padding: 0; font-size: 0.875rem; }
  .cy-header .cy-nav { flex: 1 0 100%; order: 3; margin-left: 0; min-width: 0; height: 40px; gap: 0.9rem; justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .cy-header .cy-nav::-webkit-scrollbar { display: none; }
  .cy-header .cy-nav a { display: inline-flex; align-items: center; flex: 0 0 auto; height: 40px; font-size: 0.8125rem; padding: 0; white-space: nowrap; border-bottom-width: 2px; }
  .cy-nav .cy-nav-long { display: none; }
  .cy-nav .cy-nav-short { display: inline; }
  .cy-header .cy-contact-link { display: none; }
  .cy-header .cy-login-link { margin-left: auto; font-size: 0.875rem; padding: 0.45rem 0.75rem; }
  .cy-header .cy-menu-btn { margin-left: 0.6rem; }
}

.cy-footer {
  margin-top: 4rem; padding: 2rem 16px 2.5rem;
  border-top: 1px solid var(--hairline);
  color: var(--text-2); font-size: 0.9375rem; line-height: 1.6; font-family: var(--sans);
}
.cy-footer-inner { max-width: 1200px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; align-items: baseline; }
.cy-footer-brand { font-family: var(--font-display); color: var(--text); font-size: 1rem; text-decoration: none; }
.cy-footer a { color: var(--text-2); text-decoration: none; }
.cy-footer a:hover { color: var(--text); }
.cy-footer a:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 2px; }
.cy-footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.cy-footer-meta { width: 100%; margin-top: 0.5rem; }

/* Light theme: only the overlay scrim is not a token. */
[data-theme="light"] .cy-menu-overlay { background: rgba(15, 23, 42, 0.45); }
[data-theme="light"] .cy-menu { box-shadow: -4px 0 24px rgba(0, 0, 0, 0.08); }

/* ── Shared article (/forward-deployed-engineering, /biological-language-modeling) ──
   ET-31156 item 3 / ET-31157 item 4: one copy, on the tokens. The 68ch measure and the
   layout are unchanged; colour and type only. Article links keep the accent (the reviewer's
   carve-out: a link in an article is an action); numbers, markers and labels are text. */
.cy-article { max-width: 68ch; margin: 0 auto; padding: clamp(2rem, 7vh, 5rem) 16px 5rem; color: var(--text); font-family: var(--sans); }
.cy-article h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(2rem, 6vw, 3.25rem); line-height: 1.05; letter-spacing: -0.015em; color: var(--text); margin: 0 0 1rem; }
.cy-article h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.375rem, 3.2vw, 1.75rem); line-height: 1.2; color: var(--text); margin: 3rem 0 0.875rem; }
.cy-article p, .cy-article li { font-size: 1.0625rem; line-height: 1.65; }
.cy-article p { margin: 0 0 1.1rem; }
.cy-article code { font-family: var(--mono); font-size: 0.9375em; }
.cy-lede { font-size: clamp(1.125rem, 2vw, 1.3125rem); line-height: 1.5; color: var(--text-2); margin-bottom: 2rem; }
.cy-article a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.cy-article a:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 2px; }
.cy-crumb { display: inline-block; margin-bottom: 1.5rem; }
.cy-article a.cy-crumb { color: var(--text-2); text-decoration: none; }
.cy-article a.cy-crumb:hover { color: var(--text); text-decoration: underline; }
