/* ============================================================
   KADARA GLOBAL SHELL — Slice 1 (announcement · navbar · mega ·
   mobile · theme · global CTA · sticky). Isolated `ks-` namespace;
   consumes theme.css tokens. Does NOT touch the live site nav.
   ============================================================ */

/* ---------- SKIP TO CONTENT (keyboard a11y) ---------- */
.ks-skip { position: absolute; left: -9999px; top: 0; z-index: 200; background: var(--brand-verdigris); color: #fff; padding: 10px 18px; border-radius: 0 0 10px 0; font: 600 14px/1 var(--ff-body); text-decoration: none; }
.ks-skip:focus { left: 0; }

/* ---------- ANNOUNCEMENT BAR (above navbar, NOT sticky) ---------- */
.ks-announce { background: #0B1613; color: #EAF3EE; }
.ks-announce[hidden] { display: none !important; }
.ks-announce[data-tone="neutral"] { background: var(--bg-tint); color: var(--ink); }
.ks-announce[data-tone="notice"] { background: var(--brand-brass-soft); color: var(--brand-brass-text); }
.ks-announce-inner { max-width: 1160px; margin: 0 auto; padding: 10px 24px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 14px; line-height: 1.4; }
.ks-announce-badge { flex: 0 0 auto; font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; background: var(--brand-verdigris); color: #fff; padding: 3px 9px; border-radius: 6px; }
.ks-announce[data-tone="neutral"] .ks-announce-badge,
.ks-announce[data-tone="notice"] .ks-announce-badge { background: var(--ink); color: var(--paper); }
.ks-announce-msg { flex: 1 1 auto; min-width: 0; }
.ks-announce-cta { flex: 0 0 auto; color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.ks-announce-cta:hover { opacity: 0.85; }
.ks-announce-close { flex: 0 0 auto; margin-left: auto; background: none; border: none; color: currentColor; opacity: 0.7; font-size: 20px; line-height: 1; cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.ks-announce-close:hover { opacity: 1; }
.ks-announce-close:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
@media (max-width: 640px) { .ks-announce-cta { order: 3; flex-basis: 100%; } .ks-announce-close { position: absolute; } .ks-announce-inner { position: relative; padding-right: 40px; } }

/* ---------- STICKY NAVBAR ---------- */
.ks-nav { position: sticky; top: 0; z-index: 100; background: var(--paper); border-bottom: 1px solid var(--line); }
.ks-nav-inner { max-width: 1160px; margin: 0 auto; padding: 0 24px; height: 68px; display: flex; align-items: center; gap: 6px; }
.ks-logo { display: inline-flex; align-items: center; margin-right: 18px; text-decoration: none; }
.ks-logo img { display: block; height: 28px; width: auto; }
.ks-logo .ks-logo-dm { display: none; }
:root[data-theme="dark"] .ks-logo .ks-logo-lm { display: none; }
:root[data-theme="dark"] .ks-logo .ks-logo-dm { display: block; }
.ks-logo:focus-visible { outline: 2px solid var(--brand-verdigris); outline-offset: 3px; border-radius: 4px; }
.ks-navlinks { display: flex; align-items: center; gap: 2px; }
.ks-navitem { position: relative; }
.ks-navitem > a, .ks-navitem > button { position: relative; font-family: inherit; font-size: 15px; font-weight: 500; color: var(--sub); background: none; border: none; padding: 10px 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; transition: color .14s ease; }
.ks-navitem > a:hover, .ks-navitem > button:hover { color: var(--ink); }
/* current-page + open: a clean centred underline indicator, never a filled box */
.ks-navitem > a[aria-current="page"], .ks-navitem.is-current > a, .ks-navitem.is-current > button { color: var(--ink); font-weight: 600; }
.ks-navitem > a[aria-current="page"]::after, .ks-navitem.is-current > a::after, .ks-navitem.is-current > button::after { content: ""; position: absolute; left: 13px; right: 13px; bottom: 3px; height: 2px; border-radius: 2px; background: var(--brand-verdigris); }
.ks-navitem.is-open > button::after { content: ""; position: absolute; left: 13px; right: 13px; bottom: 3px; height: 2px; border-radius: 2px; background: var(--brand-verdigris); opacity: .55; }
.ks-navitem > a:focus-visible, .ks-navitem > button:focus-visible { outline: 2px solid var(--brand-verdigris); outline-offset: 2px; }
.ks-navitem.is-open > button { color: var(--ink); }
.ks-chev { width: 11px; height: 11px; transition: transform 0.18s ease; opacity: 0.7; }
.ks-navitem.is-open .ks-chev { transform: rotate(180deg); }
.ks-nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.ks-theme { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); color: var(--sub); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.ks-theme:hover { color: var(--ink); border-color: var(--brand-verdigris-line); }
.ks-theme:focus-visible { outline: 2px solid var(--brand-verdigris); outline-offset: 2px; }
.ks-theme .ks-icon-moon { display: none; }
:root[data-theme="dark"] .ks-theme .ks-icon-sun { display: none; }
:root[data-theme="dark"] .ks-theme .ks-icon-moon { display: inline; }
.ks-cta { display: inline-flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600; padding: 10px 18px; border-radius: var(--r-pill, 999px); background: var(--brand-verdigris); color: var(--on-brand-verdigris, #fff); text-decoration: none; white-space: nowrap; }
.ks-cta:hover { filter: brightness(0.96); }
.ks-cta:focus-visible { outline: 2px solid var(--brand-verdigris); outline-offset: 2px; }
.ks-burger { display: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); cursor: pointer; align-items: center; justify-content: center; flex-direction: column; gap: 4px; }
.ks-burger span { width: 18px; height: 2px; background: var(--ink); border-radius: 2px; }
.ks-burger:focus-visible { outline: 2px solid var(--brand-verdigris); outline-offset: 2px; }

/* ---------- MEGA MENUS (anchored to trigger, not full-bleed) ---------- */
.ks-mega { position: absolute; top: calc(100% + 8px); left: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 34px 68px -34px rgba(11,22,19,0.35); padding: 14px; z-index: 120; opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s; }
.ks-navitem.is-open .ks-mega { opacity: 1; visibility: visible; transform: none; }
.ks-mega--right { left: auto; right: 0; }
.ks-mega-item { display: block; padding: 12px 14px; border-radius: 10px; text-decoration: none; transition: background .12s ease; }
.ks-mega-item:hover { background: var(--brand-brass-soft); }
.ks-mega-item:focus-visible { background: var(--brand-brass-soft); outline: 2px solid var(--brand-brass-text); outline-offset: -2px; }
.ks-mega-item:hover .mi-title, .ks-mega-item:focus-visible .mi-title { color: var(--brand-brass-text); }
.ks-mega-item[aria-current="page"], .ks-mega-item.is-current { background: var(--brand-verdigris-soft); box-shadow: inset 0 0 0 1px var(--brand-verdigris-line); }
.ks-mega-item[aria-current="page"] .mi-title, .ks-mega-item.is-current .mi-title { color: var(--brand-verdigris-text); font-weight: 700; }
.ks-mega-item .mi-title { display: block; font-family: var(--ff-heading); font-size: 15px; font-weight: 600; color: var(--ink); }
.ks-mega-item .mi-desc { display: block; font-size: 13px; line-height: 1.45; color: var(--sub); margin-top: 3px; max-width: 30ch; }
.ks-mega-item.mi-patient .mi-title { color: var(--brand-verdigris-text); }
.ks-mega-item .mi-tag { display: inline-block; font-family: var(--ff-mono); font-size: 9.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--brand-brass-text); border: 1px solid var(--brand-brass-line, rgba(150,120,40,.35)); border-radius: 5px; padding: 1px 5px; margin-left: 6px; vertical-align: middle; }
/* Solutions: single column, ~440px */
.ks-mega--solutions { width: 440px; }
/* Use cases: grouped 2 columns, ~600px */
.ks-mega--usecases { width: 600px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; }
.ks-mega-group { padding: 8px 6px 4px; }
.ks-mega-group-label { font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); padding: 4px 8px; }
.ks-mega-line { display: block; padding: 8px 8px; border-radius: 8px; text-decoration: none; font-size: 14px; color: var(--ink); transition: background .12s ease, color .12s ease; }
.ks-mega-line:hover { background: var(--brand-brass-soft); color: var(--brand-brass-text); }
.ks-mega-line:focus-visible { background: var(--brand-brass-soft); color: var(--brand-brass-text); outline: 2px solid var(--brand-brass-text); outline-offset: -2px; }
.ks-mega-line[aria-current="page"], .ks-mega-line.is-current { background: var(--brand-verdigris-soft); color: var(--brand-verdigris-text); font-weight: 600; }
.ks-mega-line.is-soft { color: var(--sub); }
.ks-mega-foot { grid-column: 1 / -1; border-top: 1px solid var(--line); margin-top: 6px; padding: 12px 14px 4px; }
.ks-mega-foot a { font-family: var(--ff-mono); font-size: 12px; font-weight: 600; color: var(--brand-verdigris-text); text-decoration: none; }
.ks-mega-foot a:hover { color: var(--brand-verdigris); }
/* Who we serve: 2 columns, ~500px */
.ks-mega--audience { width: 500px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
/* Resources: 4 columns, ~640px */
.ks-mega--resources { width: 640px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.ks-mega--resources .ks-mega-col { padding: 6px; }
.ks-mega--resources .ks-mega-group-label { padding: 4px 8px 6px; }

/* ---------- MOBILE DRAWER ---------- */
.ks-drawer { position: fixed; inset: 0; z-index: 200; background: var(--paper); transform: translateX(100%); transition: transform 0.25s ease; overflow-y: auto; visibility: hidden; }
.ks-drawer.is-open { transform: none; visibility: visible; }
.ks-drawer-head { display: flex; align-items: center; height: 68px; padding: 0 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--paper); }
.ks-drawer-head .ks-logo { margin: 0; }
.ks-drawer-close { margin-left: auto; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer; }
.ks-drawer-close:focus-visible { outline: 2px solid var(--brand-verdigris); outline-offset: 2px; }
.ks-drawer-body { padding: 8px 20px 28px; }
.ks-acc { border-bottom: 1px solid var(--line); }
.ks-acc-toggle { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 16px 4px; background: none; border: none; font-family: inherit; font-size: 17px; font-weight: 600; color: var(--ink); cursor: pointer; }
.ks-acc-toggle:focus-visible { outline: 2px solid var(--brand-verdigris); outline-offset: 2px; }
.ks-acc-toggle .ks-chev { width: 14px; height: 14px; }
.ks-acc-panel { display: none; padding: 0 4px 14px; }
.ks-acc.is-open .ks-acc-panel { display: block; }
.ks-acc.is-open .ks-acc-toggle .ks-chev { transform: rotate(180deg); }
.ks-acc-panel a { display: block; padding: 11px 12px; font-size: 15px; color: var(--sub); text-decoration: none; border-radius: 10px; transition: background .12s ease, color .12s ease; }
.ks-acc-panel a:hover { background: var(--brand-brass-soft); color: var(--brand-brass-text); }
.ks-acc-panel a:focus-visible { background: var(--brand-brass-soft); color: var(--brand-brass-text); outline: 2px solid var(--brand-brass-text); outline-offset: -2px; }
.ks-acc-panel a[aria-current="page"], .ks-acc-panel a.is-current { background: var(--brand-verdigris-soft); color: var(--brand-verdigris-text); font-weight: 600; }
.ks-acc-panel .ks-acc-label { font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); padding: 10px 8px 2px; }
.ks-drawer-link { display: block; padding: 14px 12px; font-size: 17px; font-weight: 600; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); border-radius: 10px; transition: background .12s ease, color .12s ease; }
.ks-drawer-link:hover { background: var(--brand-brass-soft); color: var(--brand-brass-text); outline: none; }
.ks-drawer-link:focus-visible { background: var(--brand-brass-soft); color: var(--brand-brass-text); outline: 2px solid var(--brand-brass-text); outline-offset: -2px; }
.ks-drawer-link[aria-current="page"] { background: var(--brand-verdigris-soft); color: var(--brand-verdigris-text); }
.ks-drawer-cta { display: block; text-align: center; margin-top: 22px; padding: 14px; border-radius: var(--r-pill, 999px); background: var(--brand-verdigris); color: var(--on-brand-verdigris, #fff); font-weight: 600; text-decoration: none; }
.ks-drawer-utility { display: flex; align-items: center; gap: 12px; margin-top: 20px; }
.ks-drawer-utility .ks-theme { width: 44px; height: 44px; }
.ks-scrim { position: fixed; inset: 0; z-index: 190; background: rgba(7,17,14,0.4); opacity: 0; visibility: hidden; transition: opacity 0.2s; }
.ks-scrim.is-open { opacity: 1; visibility: visible; }

/* ---------- RESPONSIVE SWITCH ---------- */
@media (max-width: 940px) {
  .ks-navlinks { display: none; }
  .ks-nav-right .ks-theme { display: none; }
  .ks-burger { display: inline-flex; }
}
@media (min-width: 941px) { .ks-drawer, .ks-scrim { display: none; } }

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  .ks-mega, .ks-drawer, .ks-scrim, .ks-chev { transition: none; }
}

/* 7-star pass: selectable rows/cards are NOT hyperlinks — no underline on hover/focus.
   (overrides the global a:hover underline; inline prose links keep their underline) */
/* SELECTABLE SURFACE INVARIANT: substantial clickable cards/rows/menu destinations
   use full-surface interaction and NEVER show inline hyperlink decoration. Applies to
   the surface and its descendants across every state. Inline prose links are unaffected. */
.ks-mega-item, .ks-mega-line, .ks-acc-panel a, .ks-drawer-link,
.rp-erow, .rs-row, .sol-spine a, .sol-cross,
.hp-jobcard, .hp-hjc, .hp-spine-card, .hp-op-card, .ws-card,
.ks-mega-item:hover, .ks-mega-item:focus-visible, .ks-mega-item:active, .ks-mega-item[aria-current="page"],
.ks-mega-line:hover, .ks-mega-line:focus-visible, .ks-mega-line:active, .ks-mega-line[aria-current="page"],
.ks-acc-panel a:hover, .ks-acc-panel a:focus-visible, .ks-acc-panel a:active, .ks-acc-panel a[aria-current="page"],
.ks-drawer-link:hover, .ks-drawer-link:focus-visible, .ks-drawer-link:active, .ks-drawer-link[aria-current="page"],
.rp-erow:hover, .rp-erow:focus-visible, .rp-erow:active,
.rs-row:hover, .rs-row:focus-visible, .rs-row:active,
.sol-spine a:hover, .sol-spine a:focus-visible, .sol-spine a:active,
.sol-cross:hover, .sol-cross:focus-visible, .sol-cross:active,
.hp-jobcard:hover, .hp-jobcard:focus-visible, .hp-jobcard:active,
.hp-hjc:hover, .hp-hjc:focus-visible, .hp-hjc:active,
.hp-spine-card:hover, .hp-spine-card:focus-visible, .hp-spine-card:active,
.hp-op-card:hover, .hp-op-card:focus-visible, .hp-op-card:active,
.ws-card:hover, .ws-card:focus-visible, .ws-card:active,
.hp-jobcard:hover *, .hp-hjc:hover *, .hp-spine-card:hover *, .hp-op-card:hover *, .rp-erow:hover *, .rs-row:hover *, .sol-cross:hover *, .ws-card:hover * {
  text-decoration: none;
}
