/* Cognaire marketing site — shared styles
 * Extends colors_and_type.css with marketing-specific primitives:
 * top nav, hero, sections, cards, footer, responsive grid.
 */

/* @@shared-components-start */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--surface-default);
  color: var(--fg-primary);
  font-size: 16px; /* marketing default, up from app's 14 */
  line-height: 1.55;
  text-wrap: pretty;
}

img, svg { max-width: 100%; display: block; }

/* =====================================================================
 * ACCENT / THEME KNOBS (driven by Tweaks)
 * ===================================================================== */
:root {
  --accent: var(--brand-navy);
  --accent-deep: var(--brand-navy-deep);
  --accent-soft: rgba(14, 48, 72, 0.06);
  --accent-rgb: 14, 48, 72;

  --marketing-max: 1200px;
  --marketing-gutter: clamp(20px, 4vw, 48px);

  --nav-height: 64px;
}
:root[data-accent="teal"] {
  --accent: var(--brand-teal);
  --accent-deep: var(--brand-teal-deep);
  --accent-soft: rgba(19, 92, 121, 0.06);
  --accent-rgb: 19, 92, 121;
}

/* =====================================================================
 * LAYOUT PRIMITIVES
 * ===================================================================== */
.container {
  max-width: var(--marketing-max);
  margin: 0 auto;
  padding-left: var(--marketing-gutter);
  padding-right: var(--marketing-gutter);
}

.section {
  padding: clamp(48px, 7vw, 96px) 0;
}
.section--tight { padding: clamp(32px, 4vw, 56px) 0; }
.section--tinted { background: var(--surface-background); }
.section--navy {
  background: var(--brand-navy);
  color: #e6eef3;
}
.section--navy h1,
.section--navy h2,
.section--navy h3,
.section--navy h4 { color: #ffffff; }

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.section--navy .eyebrow { color: #7db6cc; }

h1.display, .display-1 {
  font-size: clamp(40px, 5.2vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  font-weight: 700;
  margin: 0 0 20px;
  color: var(--fg-primary);
  text-wrap: balance;
}
h2.display, .display-2 {
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--fg-primary);
  text-wrap: balance;
}
.section--navy h1.display,
.section--navy h2.display,
.section--navy .display-1,
.section--navy .display-2 { color: #ffffff; }

.lede {
  font-size: clamp(17px, 1.3vw, 20px);
  line-height: 1.55;
  color: var(--fg-secondary);
  max-width: 64ch;
  margin: 0 0 24px;
}
.section--navy .lede { color: #b9c7d1; }

/* =====================================================================
 * BUTTONS (marketing scale)
 * ===================================================================== */
.btn-m {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  height: 44px;
  border-radius: 4px;
  border: 1px solid transparent;
  font: 500 15px/1 var(--font-sans);
  cursor: pointer;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .05s ease;
  white-space: nowrap;
}
.btn-m i { font-size: 13px; }
.btn-m:active { transform: translateY(1px); }

.btn-m--primary {
  background: var(--accent);
  color: #ffffff;
}
.btn-m--primary:hover { background: var(--accent-deep); color: #fff; text-decoration: none; }

.btn-m--outline {
  background: transparent;
  color: var(--fg-primary);
  border-color: rgba(0,0,0,0.15);
}
.btn-m--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.section--navy .btn-m--outline {
  color: #ffffff;
  border-color: rgba(255,255,255,0.35);
}
.section--navy .btn-m--outline:hover {
  border-color: #ffffff;
  background: rgba(255,255,255,0.06);
  color: #ffffff;
}

.btn-m--ghost {
  background: transparent;
  color: var(--fg-primary);
  padding: 10px 4px;
  height: auto;
}
.btn-m--ghost:hover { color: var(--accent); text-decoration: none; }

.btn-m--sm { height: 36px; padding: 8px 14px; font-size: 14px; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* =====================================================================
 * NAV style variants
 * ===================================================================== */
:root[data-nav="flat"] .topnav__link .chev { display: none; }
:root[data-nav="flat"] .topnav__item .topnav__menu { display: none !important; }

/* =====================================================================
 * NAV
 * ===================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border-subtle);
  height: var(--nav-height);
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--brand-navy);
  text-decoration: none;
  flex-shrink: 0;
}
.brand img { height: 28px; width: auto; }
.brand:hover { text-decoration: none; }

.topnav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  margin-left: 16px;
}
.topnav__item {
  position: relative;
}
.topnav__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  height: 36px;
  line-height: 1;
  border-radius: 4px;
  color: var(--fg-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  font-style: normal;
  letter-spacing: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-decoration: none;
  text-rendering: optimizeLegibility;
  cursor: pointer;
  background: transparent;
  border: none;
  box-sizing: border-box;
  vertical-align: middle;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}
a.topnav__link,
button.topnav__link {
  font-weight: 500 !important;
  font-family: var(--font-sans) !important;
  line-height: 1 !important;
}
.topnav__link:hover,
.topnav__link[aria-expanded="true"] {
  background: var(--accent-soft);
  color: var(--accent);
  text-decoration: none;
}
.topnav__link .chev {
  font-size: 10px;
  opacity: 0.6;
  transition: transform .15s ease;
}
.topnav__link[aria-expanded="true"] .chev { transform: rotate(180deg); }

.topnav__menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 320px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  box-shadow: var(--shadow-dropdown);
  padding: 8px;
  display: none;
  z-index: 60;
}
/* Bridge the 6px gap between trigger and menu so the mouse can move into the menu without leaving the hover region. */
.topnav__menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -10px;
  height: 10px;
  background: transparent;
}
.topnav__item.is-open .topnav__menu { display: block; }
.topnav__menu-item {
  display: block;
  padding: 10px 12px;
  border-radius: 4px;
  color: var(--fg-primary);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.4;
}
.topnav__menu-item:hover {
  background: var(--accent-soft);
  color: var(--accent);
  text-decoration: none;
}
.topnav__menu-item__title {
  font-weight: 600;
  margin-bottom: 2px;
}
.topnav__menu-item__desc {
  font-size: 12px;
  color: var(--fg-secondary);
}

.topbar__ctas {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.topbar__ctas .btn-m { height: 36px; padding: 0 14px; font-size: 14px; }

/* Mobile / responsive — see TIERED-RESPONSIVE block at end of file
   for the tier-2 rules. The burger button's base styling lives here. */
.topnav__burger { display: none; }
@media (max-width: 760px) {
  .topbar__ctas .btn-m--outline { display: none; }
  .topnav__burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border: none;
    background: transparent;
    color: var(--fg-primary);
    font-size: 18px;
    cursor: pointer;
    border-radius: 4px;
  }
  .topnav__burger:hover { background: var(--accent-soft); color: var(--accent); }
}

/* =====================================================================
 * CARDS
 * ===================================================================== */
.card {
  background: var(--surface-default);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 28px;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.card--link { color: inherit; text-decoration: none; display: block; }
.card--link:hover {
  border-color: rgba(var(--accent-rgb), 0.35);
  box-shadow: var(--shadow-card);
  color: inherit;
  text-decoration: none;
}
.card--padded { padding: 32px; }
.card--tinted { background: var(--surface-background); border-color: transparent; }

.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

/* =====================================================================
 * FEATURE LIST (icon + title + desc)
 * ===================================================================== */
.feature {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.feature__icon {
  flex: 0 0 36px;
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}
.feature__title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--fg-primary);
}
.feature__desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--fg-secondary);
  margin: 0;
}
.section--navy .feature__title { color: #fff; }
.section--navy .feature__desc { color: #b9c7d1; }
.section--navy .feature__icon {
  background: rgba(255,255,255,0.08);
  color: #7fbed4;
}

/* =====================================================================
 * TAG / PILL
 * ===================================================================== */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}
.tag--neutral {
  background: var(--surface-alt);
  color: var(--fg-secondary);
}
.tag--dot::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 999px;
  background: currentColor;
  display: inline-block;
}
/* @@shared-components-end */

/* =====================================================================
 * FOOTER
 * ===================================================================== */
.footer {
  background: #0a2334;
  color: #b9c7d1;
  padding: 64px 0 32px;
  font-size: 14px;
}
.footer a { color: #d2dce3; text-decoration: none; }
.footer a:hover { color: #ffffff; text-decoration: underline; }
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
@media (max-width: 800px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
.footer__brand { max-width: 320px; }
.footer__brand img { height: 24px; filter: brightness(0) invert(1); opacity: 0.9; margin-bottom: 12px; }
.footer__brand p { font-size: 13px; color: #8ea1ae; line-height: 1.55; margin: 0; }

.footer__col h4 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ffffff;
  margin: 0 0 16px;
}
.footer__col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer__col li a { font-size: 13px; }

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 12px;
  color: #7f94a3;
  flex-wrap: wrap;
  gap: 12px;
}
.footer__legal { display: flex; gap: 20px; }

/* =====================================================================
 * PAGE HERO (non-homepage section pages)
 * ===================================================================== */
.page-hero {
  padding: 80px 0 56px;
  border-bottom: 1px solid var(--border-subtle);
}
.page-hero__crumb {
  font-size: 13px;
  color: var(--fg-secondary);
  margin-bottom: 16px;
}
.page-hero__crumb a { color: var(--fg-secondary); }
.page-hero__crumb a:hover { color: var(--accent); }

/* =====================================================================
 * UI MOCK (shared visual language for product previews)
 * ===================================================================== */
.ui-mock {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  box-shadow: 0 20px 50px -20px rgba(14, 48, 72, 0.25), 0 2px 6px rgba(0,0,0,0.04);
  overflow: hidden;
  font-size: 13px;
  line-height: 1.45;
}
.ui-mock__chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #f5f7f9;
  border-bottom: 1px solid var(--border-subtle);
}
.ui-mock__chrome .dot { width: 10px; height: 10px; border-radius: 50%; background: #d5dde3; }
.ui-mock__chrome .title {
  margin-left: 8px;
  font-size: 12px;
  color: var(--fg-secondary);
  font-weight: 500;
}

/* =====================================================================
 * MODE-AWARE NAV (Apr 2026)
 * One nav, three weightings. Same DOM in every mode; we re-weight per mode
 * via [data-mode] on the .topbar so SEO/IA stays stable.
 * ===================================================================== */

/* Foreground item: bolder weight + thin teal underline */
.topnav__item.is-foreground > .topnav__link {
  font-weight: 600 !important;
  color: var(--brand-navy) !important;
  position: relative;
}
.topnav__item.is-foreground > .topnav__link::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -10px;
  height: 2px;
  background: var(--brand-teal);
  border-radius: 2px;
}

/* De-emphasised item: muted color, regular weight */
.topnav__item.is-deemph > .topnav__link {
  color: var(--fg-muted) !important;
  font-weight: 500 !important;
}
.topnav__item.is-deemph > .topnav__link .chev { opacity: 0.5; }
.topnav__item.is-deemph > .topnav__link:hover {
  color: var(--accent) !important;
}

/* Brand pip — subtle "viewing mode" cue. Lives next to the wordmark.
   Only rendered in non-generic mode and only until dismissed. */
.brand-pip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 4px 3px 8px;
  margin-left: -8px;
  border-radius: 999px;
  background: var(--brand-blue-100);
  color: var(--brand-teal);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid rgba(19, 92, 121, 0.18);
  line-height: 1;
  height: 22px;
  flex-shrink: 0;
}
.brand-pip > i { font-size: 7px; }
.brand-pip__label { padding-right: 2px; }
.brand-pip button {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--brand-teal);
  opacity: 0.55;
  cursor: pointer;
  padding: 0 4px;
  font-size: 13px;
  line-height: 1;
  height: 18px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
}
.brand-pip button:hover { opacity: 1; background: rgba(19,92,121,0.10); }
/* (Pip behaviour at narrow widths is handled in the TIERED-RESPONSIVE block.) */

/* =====================================================================
 * PLATFORM MEGA-MENU
 * Same DOM in every mode; CSS handles ordering of the workflow groups
 * (mode.js sorts the data, so we just style here).
 * ===================================================================== */
.topnav__menu--mega {
  /* Center under the trigger and let it grow wider than a flyout. */
  left: 50%;
  transform: translateX(-50%);
  min-width: 880px;
  max-width: 940px;
  padding: 0;
  overflow: hidden;
  background: #fff;
  border-radius: 10px;
}
@media (max-width: 1100px) {
  .topnav__menu--mega { min-width: 720px; max-width: 760px; }
}

.mega {
  display: grid;
  grid-template-columns: 1fr 1fr 280px;
}
.mega__col {
  padding: 18px 20px;
  border-right: 1px solid var(--border-subtle);
}
.mega__col:last-child { border-right: 0; }
.mega__col h5 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin: 0 0 10px;
}
.mega__group { margin-bottom: 12px; }
.mega__group:last-child { margin-bottom: 0; }
.mega__group-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--brand-navy);
  margin: 4px 0 4px;
}
.mega__row {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  padding: 7px 8px;
  margin: 0 -8px;
  border-radius: 6px;
  color: var(--fg-primary);
  text-decoration: none;
  align-items: start;
}
.mega__row:hover { background: var(--accent-soft); color: var(--accent); text-decoration: none; }
.mega__row .ico {
  width: 28px; height: 28px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  margin-top: 1px;
}
.mega__row .ico--alt { background: rgba(19,92,121,0.10); color: var(--brand-teal); }
.mega__row .t {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.2;
}
.mega__row .d {
  display: block;
  font-size: 12px;
  color: var(--fg-secondary);
  margin-top: 2px;
  line-height: 1.4;
}
.mega__row:hover .d { color: var(--accent); opacity: 0.85; }

.mega__col--aside-wrap {
  padding: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  border-right: 0;
}
.mega__build { padding: 18px 20px 4px; }
.mega__aside {
  background: linear-gradient(155deg, #0c2a40 0%, #0e3048 50%, #135c79 100%);
  color: #fff;
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
}
.mega__aside h6 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  margin: 0 0 6px;
}
.mega__aside .h-line {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 6px;
  color: #fff;
}
.mega__aside .p-line {
  font-size: 12.5px;
  line-height: 1.5;
  color: rgba(255,255,255,0.78);
  margin: 0 0 14px;
}
.mega__aside a {
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  border-bottom: 1px solid rgba(255,255,255,0.4);
  padding-bottom: 2px;
  align-self: flex-start;
}
.mega__aside a:hover { border-bottom-color: #fff; text-decoration: none; }

@media (max-width: 1100px) {
  .mega { grid-template-columns: 1fr 1fr; }
  .mega__col--aside-wrap { grid-column: 1 / -1; grid-template-rows: auto; }
  .mega__build { display: none; } /* still in foundation + workflows; build appears in footer / platform page */
  .mega__aside { padding: 16px 20px; }
}

/* =====================================================================
 * GENERIC-MODE BRANCHING SECTION
 * "What are you trying to automate?" — appears below hero on index in
 * generic mode only. Three peer cards.
 * ===================================================================== */
.branch {
  padding: clamp(56px, 8vw, 96px) 0;
  background: var(--surface-default);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}
.branch__head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 36px;
  padding: 0 var(--marketing-gutter);
}
.branch__eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-teal);
  margin-bottom: 10px;
}
.branch__title {
  font-size: clamp(28px, 3.4vw, 36px);
  line-height: 1.1;
  font-weight: 700;
  color: var(--brand-navy);
  letter-spacing: -0.015em;
  margin: 0 0 10px;
}
.branch__sub {
  font-size: 16px;
  color: var(--fg-secondary);
  line-height: 1.55;
  margin: 0;
}

.branch__grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--marketing-gutter);
}
@media (max-width: 900px) {
  .branch__grid { grid-template-columns: 1fr; gap: 14px; }
}

.branch__card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px 26px 24px;
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
  min-height: 260px;
}
.branch__card:hover {
  border-color: rgba(19,92,121,0.5);
  box-shadow: 0 18px 40px -16px rgba(14,48,72,0.25);
  transform: translateY(-2px);
  text-decoration: none;
  color: inherit;
}
.branch__card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(380px 200px at 100% 0%, rgba(19,92,121,0.06), transparent 60%);
  pointer-events: none;
}
.branch__card .ico {
  width: 40px; height: 40px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-bottom: 16px;
}
.branch__card--alt .ico { background: rgba(19,92,121,0.10); color: var(--brand-teal); }
.branch__card .lab {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--brand-teal);
  margin-bottom: 6px;
}
.branch__card .t {
  font-size: 20px;
  font-weight: 700;
  color: var(--brand-navy);
  line-height: 1.2;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.branch__card .d {
  font-size: 13.5px;
  color: var(--fg-secondary);
  line-height: 1.5;
  margin: 0 0 14px;
}
.branch__card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  font-size: 13px;
  color: var(--fg-secondary);
  line-height: 1.6;
  display: grid;
  gap: 4px;
}
.branch__card ul li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.branch__card ul li::before {
  content: "";
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--brand-teal);
  flex-shrink: 0;
}
.branch__card .cta {
  margin-top: auto;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--brand-teal);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.branch__card .cta i { transition: transform .2s ease; font-size: 11px; }
.branch__card:hover .cta i { transform: translateX(3px); }

.branch__skip {
  text-align: center;
  margin-top: 28px;
  font-size: 13px;
  color: var(--fg-muted);
}
.branch__skip a {
  color: var(--fg-secondary);
  border-bottom: 1px dashed var(--border-strong);
}
.branch__skip a:hover {
  color: var(--brand-teal);
  border-bottom-color: var(--brand-teal);
  text-decoration: none;
}

/* Hide branching section in non-generic modes (kept in DOM for SEO). */
:root[data-mode="recruitment"] .branch,
:root[data-mode="questionnaires"] .branch { display: none; }

/* =====================================================================
 * CROSS-LINK CTA CARDS
 * Reusable component placed once per page near the end of a section.
 * Two variants:
 *   .xlinks (paired)   — used on Recruitment-mode pages
 *   .xlink-inline      — used on Questionnaires-mode pages (lower weight)
 * ===================================================================== */
.xlinks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 760px) { .xlinks { grid-template-columns: 1fr; } }

.xlink {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.xlink:hover {
  border-color: rgba(19,92,121,0.4);
  box-shadow: 0 6px 18px rgba(14,48,72,0.08);
  transform: translateY(-1px);
  text-decoration: none;
  color: inherit;
}
.xlink__ico {
  width: 44px; height: 44px;
  border-radius: 8px;
  background: var(--brand-blue-50);
  color: var(--brand-teal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
}
.xlink__lab {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-teal);
  margin-bottom: 2px;
}
.xlink__t {
  font-size: 15px;
  font-weight: 600;
  color: var(--brand-navy);
  line-height: 1.3;
}
.xlink__d {
  font-size: 13px;
  color: var(--fg-secondary);
  margin-top: 4px;
  line-height: 1.45;
}
.xlink__arrow {
  color: var(--brand-teal);
  font-size: 13px;
  transition: transform .2s ease;
}
.xlink:hover .xlink__arrow { transform: translateX(3px); }

.xlink-inline {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 18px;
  background: var(--surface-background);
  border-left: 3px solid var(--brand-teal);
  border-radius: 0 6px 6px 0;
  font-size: 13.5px;
  color: var(--fg-secondary);
  line-height: 1.55;
}
.xlink-inline strong { color: var(--brand-navy); font-weight: 600; }
.xlink-inline a {
  font-weight: 600;
  color: var(--brand-teal);
}
.xlink-inline a:hover { color: var(--brand-navy); text-decoration: none; }
.xlink-inline > i {
  color: var(--brand-teal);
  font-size: 14px;
  padding-top: 3px;
  flex-shrink: 0;
}

/* Utility */
.hstack { display: flex; align-items: center; gap: 8px; }
.vstack { display: flex; flex-direction: column; gap: 8px; }
.mt-0 { margin-top: 0; } .mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 8px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; } .mb-8 { margin-bottom: 32px; }
.text-center { text-align: center; }
.max-800 { max-width: 800px; margin-left: auto; margin-right: auto; }

/* =====================================================================
 * TIERED-RESPONSIVE TOP BAR
 *
 * Three tiers of visibility, controlled by .is-tier-keep / .is-tier-fold
 * classes set per-item by chrome.js based on the current mode.
 *
 * Tier 1 (>= 1100px) — full nav, no burger.
 * Tier 2 (760–1099px) — only .is-tier-keep items show in the bar;
 *                       .is-tier-fold items collapse into the burger.
 *                       Burger button appears alongside the visible items.
 *                       Pip stays in its normal position.
 * Tier 3 (< 760px)   — entire .topnav hides; only burger remains.
 *                       Pip moves left, next to the logo.
 * ===================================================================== */

/* Tier 2: medium screens — fold "other" items, show burger */
@media (max-width: 1099px) and (min-width: 761px) {
  .topnav__item.is-tier-fold { display: none !important; }
  /* Burger appears next to the CTA at this tier too */
  .topnav__burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border: none;
    background: transparent;
    color: var(--fg-primary);
    font-size: 18px;
    cursor: pointer;
    border-radius: 4px;
  }
  .topnav__burger:hover { background: var(--accent-soft); color: var(--accent); }
  /* Note: .topbar__inner gap stays at the base 24px for visual continuity
     across the Tier 2 → Tier 3 boundary. */
}

/* Tier 3: narrow — hide whole nav, only burger + brand + pip */
@media (max-width: 760px) {
  .topnav { display: none; }
  /* Inner gap stays at base 24px so the brand+pip pair doesn't shift
     horizontally as we cross the Tier 2 → Tier 3 boundary. */
  /* Push CTAs to the far right; pip stays with brand on the left, with breathing room */
  .topbar__inner > .brand-pip {
    margin-right: auto;
    margin-left: 6px;
  }
  .topbar__ctas {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .brand-pip {
    /* Slightly tighter at this size, but still readable */
    padding: 4px 8px 4px 8px;
    font-size: 11px;
  }
  /* Hide the demo CTA on very narrow screens — it lives inside the drawer */
  @media (max-width: 480px) {
    .topbar__ctas .btn-m--primary { display: none; }
  }
}

/* =====================================================================
 * BURGER PANEL (drawer)
 * Slide-in sheet from the right; covers the viewport with a scrim.
 * Used at Tier 2 (folded items only) and Tier 3 (full nav).
 * ===================================================================== */
.burger-panel {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
}
.burger-panel.is-open { pointer-events: auto; }
.burger-panel__scrim {
  position: absolute;
  inset: 0;
  background: rgba(8, 22, 35, 0);
  transition: background 200ms ease;
}
.burger-panel.is-open .burger-panel__scrim {
  background: rgba(8, 22, 35, 0.42);
}
.burger-panel__sheet {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(420px, 100%);
  background: #fff;
  box-shadow: -20px 0 60px rgba(8,22,35,0.18);
  transform: translateX(100%);
  transition: transform 220ms cubic-bezier(.2,.7,.3,1);
  display: flex;
  flex-direction: column;
}
.burger-panel.is-open .burger-panel__sheet { transform: translateX(0); }

.burger-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}
.burger-panel__head .brand img { height: 24px; }
.burger-panel__close {
  width: 36px; height: 36px;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: var(--fg-primary);
  font-size: 18px;
  cursor: pointer;
}
.burger-panel__close:hover { background: var(--accent-soft); color: var(--accent); }

.burger-panel__nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0 12px;
}
.burger-panel__cta {
  padding: 14px 18px 18px;
  border-top: 1px solid var(--border-subtle);
  background: #fff;
}

html.burger-locked { overflow: hidden; }

/* Burger nav sections */
.bm__sec { border-bottom: 1px solid var(--border-subtle); }
.bm__sec:last-child { border-bottom: none; }

.bm__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 20px;
  background: transparent;
  border: none;
  text-align: left;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  color: var(--brand-navy);
  cursor: pointer;
}
.bm__head--link {
  text-decoration: none;
  color: var(--brand-navy);
}
.bm__head--link:hover { background: var(--accent-soft); text-decoration: none; }
.bm__head--link.is-active { color: var(--accent); }
.bm__head:hover { background: var(--accent-soft); }
.bm__chev {
  font-size: 11px;
  color: var(--fg-muted);
  transition: transform 180ms ease;
}
.bm__sec.is-open .bm__chev { transform: rotate(180deg); }

.bm__body {
  display: none;
  padding: 4px 0 14px;
  background: rgba(0,0,0,0.015);
}
.bm__sec.is-open .bm__body { display: block; }

.bm__group-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--fg-muted);
  padding: 14px 20px 6px;
}
.bm__sublabel {
  font-size: 11px;
  font-weight: 600;
  color: var(--brand-navy);
  padding: 10px 20px 4px;
}
.bm__body a {
  display: block;
  padding: 10px 20px;
  text-decoration: none;
  color: var(--fg-primary);
}
.bm__body a:hover { background: rgba(19,92,121,0.06); text-decoration: none; }
.bm__t {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--brand-navy);
}
.bm__d {
  display: block;
  font-size: 12px;
  color: var(--fg-muted);
  margin-top: 2px;
  line-height: 1.4;
}
.bm__solo .bm__t { font-weight: 600; }
