/* attest — landing v2 additions. Loaded after styles.css; everything here is
   scoped under .ds2 (the v2 landing root, which also carries .mk .mk--landing
   .mk--home so the kit's tokens and is-dark theme rules keep applying). */

/* ===== Fixed background stack (behind everything) ===== */
.ds2-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.ds2-bg-layer { position: absolute; inset: 0; }

/* ===== Floating chrome: wordmark left, log in / start free right =====
   Shared by the landing (.ds2 root), the kit pages (markup injected by
   ds-marketing-page), and the public pages (floating-chrome.tsx) — all of
   which wrap it in a `.mk` element, so `.mk .ds2-*` selectors cover every
   host and `.mk.is-dark` follows each page's scroll theme. */
.ds2-chrome {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px max(24px, calc((100% - 1180px) / 2 + 24px));
  pointer-events: none;
}
.ds2-chrome > * { pointer-events: auto; }
/* Keeps in-flow content clear of the fixed chrome on pages that don't open
   with a full-viewport hero. */
.ds2-chrome-spacer { height: 84px; }

/* NB: link colors need .mk ancestry — the kit's `.mk a { color: inherit }`
   (0,1,1) would beat a bare class (0,1,0). Wordmark sized with the footer
   brand (52px desktop / 38px mobile) so top and bottom logos match. */
.mk .ds2-brand {
  font-family: var(--font-brand); font-weight: 500; font-size: 52px; line-height: 1;
  color: #1E3A8A; transition: color .35s ease;
}
/* Footer wordmark follows (kit default is 80px). */
.mk .mk-footer .mk-brand { font-size: 52px; }
@media (max-width: 860px) {
  .mk .mk-footer .mk-brand { font-size: 38px; }
}
.mk.is-dark .ds2-brand { color: #fff; }
/* App-token host (public pages outside the pinned-light kit theme): the
   wordmark follows the app's light/dark brand token, like the old header. */
.mk.ds2-chrome-host .ds2-brand { color: var(--brand-blue, #1E3A8A); }
.ds2-chrome-actions { display: inline-flex; align-items: center; gap: 9px; }
.mk .ds2-login {
  padding: 9px 16px; border-radius: 999px; font-size: 14px; font-weight: 500;
  color: var(--ink-2);
  background: color-mix(in srgb, #fff 72%, transparent);
  border: 1px solid color-mix(in srgb, var(--line) 92%, transparent);
  backdrop-filter: blur(10px) saturate(150%);
  -webkit-backdrop-filter: blur(10px) saturate(150%);
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.mk .ds2-login:hover { background: #fff; color: var(--ink); }
.mk.is-dark .ds2-login { color: rgba(255,255,255,.92); background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.22); }
.mk.is-dark .ds2-login:hover { background: rgba(255,255,255,.18); color: #fff; }
/* .mk ancestry so a later-loaded copy of the kit stylesheet (e.g. the shared
   footer's <link>) can't reclaim the button radius. */
.mk .ds2-chrome-cta { border-radius: 999px; }
.ds2-chrome a:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 10px; }
.mk.is-dark .ds2-chrome a:focus-visible { outline-color: #9FB4E8; }
@media (max-width: 860px) {
  .mk .ds2-brand { font-size: 38px; }
  .ds2-chrome-spacer { height: 62px; }
}
@media (max-width: 640px) {
  .ds2-chrome { padding: 12px 16px; }
  .mk .ds2-login { padding: 8px 12px; font-size: 13px; }
  .mk .ds2-chrome-cta { padding: 8px 13px; font-size: 13px; }
  .mk .ds2-chrome-cta [data-lucide] { display: none; }
}

/* ===== Hero ===== */
/* The kit's light radial "clouds" sit above the fixed gradient — fade them
   with the theme so the dark band stays clean. */
.ds2 .mk-hero::before { transition: opacity .5s ease; }
.ds2.is-dark .mk-hero::before { opacity: 0; }

.mk .ds2-hero-h {
  font-family: var(--font-brand); font-weight: 500;
  font-size: clamp(34px, 5vw, 60px); line-height: 1.1; letter-spacing: -0.01em;
  color: var(--ink); max-width: 900px; margin: 0 auto 34px; text-align: center;
  transition: color .5s ease;
}
.ds2.is-dark .ds2-hero-h { color: #fff; }
/* The slot is left-aligned so the word hugs the sentence (slack trails after
   it, invisible); the small translateX optically re-centers the line against
   that trailing slack. */
.ds2-hero-line { display: inline-flex; align-items: baseline; justify-content: center; gap: .24em; white-space: nowrap; transform: translateX(.3em); }
.ds2-cycle-slot { display: inline-block; width: 7ch; text-align: left; }
.ds2-cycle-word { font-style: italic; color: #1E3A8A; display: inline-block; transition: color .5s ease; }
.mk.is-dark .ds2-cycle-word { color: #9FB4E8; }
@media (max-width: 480px) {
  .mk .ds2-hero-h { font-size: clamp(25px, 7.4vw, 34px); margin-bottom: 26px; }
}

/* Auto-typing prompt is the native placeholder now. */
.ds2 .mk-search-box textarea::placeholder { color: var(--ink-4); opacity: 1; }

/* Rotating border shine — same conic mechanic as the premium CTA (kit
   @property --mkang + mk-cta-spin). Add `ds2-shine` to any rounded surface:
   soft brand glint in light mode, brighter/faster white shine in the dark
   zone. `ds2-shine--ink` keeps the brand glint even when dark (for surfaces
   that stay white, like the orbital card).
   NB: deliberately does NOT set `position` — that would override a host's
   own `absolute` (it broke the orbital popup's centering). Hosts must be
   positioned themselves so the ::before ring can anchor. */
.ds2-shine::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1.3px;
  background: conic-gradient(from var(--mkang),
    transparent 0deg, transparent 70deg,
    rgba(30, 58, 138, .55) 90deg, transparent 110deg,
    transparent 250deg, rgba(94, 58, 110, .4) 270deg, transparent 290deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: mk-cta-spin 7s linear infinite;
  pointer-events: none; z-index: 1;
}
.ds2.is-dark .ds2-shine:not(.ds2-shine--ink)::before {
  padding: 1.6px;
  background: conic-gradient(from var(--mkang),
    transparent 0deg, transparent 52deg,
    rgba(214, 226, 255, .95) 80deg, #ffffff 96deg, rgba(214, 226, 255, .95) 112deg, transparent 140deg,
    transparent 232deg, rgba(226, 234, 255, .8) 264deg, #ffffff 280deg, rgba(226, 234, 255, .8) 296deg, transparent 324deg);
  animation: mk-cta-spin 3.4s linear infinite;
}
.mk.is-dark .mk-search-box { box-shadow: 0 0 44px rgba(130, 150, 230, .35), var(--shadow-soft); }

/* Comet glint sweeping the orbit ring (rendered by the orbital component). */
.ds2-orbit-shine { pointer-events: none; }
.ds2-orbit-shine::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px;
  background: conic-gradient(from var(--mkang),
    transparent 0deg, transparent 75deg,
    rgba(255, 255, 255, .95) 100deg, transparent 135deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: mk-cta-spin 6s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .ds2-shine::before, .ds2-orbit-shine::before { animation: none; opacity: .5; }
}

/* ===== Dark zone wrapper ===== */
.ds2-darkzone { position: relative; z-index: 1; }

/* ===== Orbital section ===== */
.ds2-orbital-sec { padding: 96px 0 28px; }
.ds2-orbital-sec .mk-section-head { margin-bottom: 4px; }
/* Bare wordmark letterform at the orbit center — no tile behind it. */
.ds2-orb-mark {
  position: relative; z-index: 1;
  display: inline-block;
  color: #fff;
  font-family: var(--font-brand); font-weight: 500; font-size: 56px; line-height: 1;
  text-shadow: 0 0 36px rgba(159, 180, 232, .85), 0 0 90px rgba(159, 180, 232, .4);
}

/* ===== Orbit side cards — floating patient-context chips ===== */
.ds2-orbit-stage { position: relative; }
.ds2-orbit-side { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.ds2-orbit-pos { position: absolute; width: 236px; }
.ds2-orbit-pos--lt { left: 8px; top: 92px; }
.ds2-orbit-pos--lb { left: 40px; bottom: 116px; }
.ds2-orbit-pos--rt { right: 8px; top: 116px; }
.ds2-orbit-pos--rb { right: 40px; bottom: 92px; }
.ds2-orbit-card {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 13px 15px; border-radius: 16px;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(10px) saturate(140%); -webkit-backdrop-filter: blur(10px) saturate(140%);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .25);
  animation: ds2-orbit-float 7s ease-in-out infinite;
}
.ds2-orbit-pos--lb .ds2-orbit-card { animation-delay: -2.4s; }
.ds2-orbit-pos--rt .ds2-orbit-card { animation-delay: -1.2s; }
.ds2-orbit-pos--rb .ds2-orbit-card { animation-delay: -3.6s; }
.ds2-orbit-card .ic {
  width: 34px; height: 34px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; background: rgba(159, 180, 232, .18); color: #C9D6F6;
}
.ds2-orbit-card .ic [data-lucide] { width: 17px; height: 17px; }
.ds2-orbit-card b { display: block; font-size: 13px; font-weight: 600; color: #fff; }
.ds2-orbit-card .t { display: block; font-size: 11.5px; line-height: 1.5; color: rgba(255, 255, 255, .66); margin-top: 2px; }
@keyframes ds2-orbit-float {
  0%, 100% { transform: translateY(-5px); }
  50% { transform: translateY(6px); }
}
@media (max-width: 1080px) {
  .ds2-orbit-side { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ds2-orbit-card { animation: none; }
}

/* ===== Made-by statement (evidence → orbital bridge) ===== */
.ds2-madeby { text-align: center; padding: 64px 0 0; }
.mk .ds2-madeby-h {
  font-family: var(--font-brand); font-weight: 500;
  font-size: clamp(30px, 4.4vw, 54px); line-height: 1.18; letter-spacing: -0.01em;
  color: var(--ink); margin: 0; transition: color .5s ease;
}
.mk .ds2-madeby-h + .ds2-madeby-h { margin-top: 8px; }
.ds2.is-dark .ds2-madeby-h { color: #fff; }
.mk .ds2-madeby-h--accent { color: var(--brand); }
.ds2.is-dark .ds2-madeby-h--accent { color: #9FB4E8; }

/* ===== Serif (Fraunces) section headings ===== */
.mk .ds2-h-serif { font-family: var(--font-brand); font-weight: 500; letter-spacing: -0.01em; }

/* ===== Evidence ===== */
.mk .ds2-ev-h { margin: 14px 0; }
.ds2-ev-card {
  /* positioned so the .ds2-shine ::before ring anchors here */
  position: relative;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg); padding: 18px;
}
.ds2-ev-q {
  display: flex; align-items: center; gap: 9px;
  font-size: 13.5px; color: var(--ink-3);
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 14px;
}
.ds2-ev-q [data-lucide] { width: 15px; height: 15px; color: var(--brand); flex-shrink: 0; }
.mk .ds2-ev-a { font-size: 14px; line-height: 1.62; color: var(--ink-2); margin: 14px 2px 0; }
.ds2-ev-a sup, .ds2-ev-rec sup { color: var(--brand); font-weight: 600; }
.ds2-ev-rec {
  margin-top: 14px; padding: 12px 14px; border-radius: 12px;
  border: 1px solid #C9D4F2;
  background: linear-gradient(180deg, #F4F6FD, #FFFFFF);
}
.ds2-ev-rec-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 7px;
}
.ds2-ev-rec-label [data-lucide] { width: 13px; height: 13px; }
.mk .ds2-ev-rec p { font-size: 13.5px; line-height: 1.55; color: var(--ink); font-weight: 500; margin: 0 0 11px; }
/* References — vertical rows mirroring the app's ClinicalReferenceRow. */
.ds2-ev-refs { margin-top: 14px; padding-top: 8px; border-top: 1px dashed var(--line); }
.ds2 .ds2-ref { display: flex; gap: 11px; padding: 10px 10px; border-radius: 14px; transition: background-color .18s ease; }
.ds2 a.ds2-ref:hover { background: rgba(62, 85, 166, .08); }
.ds2-ref-num { flex-shrink: 0; padding-top: 1px; font-size: 12px; font-weight: 600; color: var(--ink-4); font-variant-numeric: tabular-nums; }
.ds2-ref-body { min-width: 0; flex: 1; display: block; }
.ds2 .ds2-ref-title { display: block; font-size: 13px; font-weight: 600; line-height: 1.45; color: var(--brand); }
.ds2 .ds2-ref-title [data-lucide] { display: inline-block; width: 11px; height: 11px; margin-left: 2px; vertical-align: -1px; opacity: .65; }
.ds2-ref-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 5px; }
.ds2-ref-meta--sub { gap: 5px; margin-top: 4px; font-size: 10.5px; color: var(--ink-3); }
.ds2-ref-favicon { width: 12px; height: 12px; border-radius: 3px; opacity: .9; flex-shrink: 0; }
.ds2-ref-journal { font-size: 11px; font-weight: 600; color: var(--brand); }
.ds2-ref-pill { font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: rgba(62, 85, 166, .14); color: var(--brand); white-space: nowrap; }
.ds2-ref-pill--grade { background: rgba(184, 119, 91, .14); color: #A05B3F; }
.ds2-ref-sep { color: var(--ink-4); }
.ds2-ref-conf { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: #047857; }
.ds2-ref-dot { width: 6px; height: 6px; border-radius: 999px; background: #10B981; flex-shrink: 0; }
/* Dark-zone variants */
.ds2.is-dark .ds2-ref-title { color: #C9D6F6; }
.ds2.is-dark a.ds2-ref:hover { background: rgba(255, 255, 255, .08); }
.ds2.is-dark .ds2-ref-num { color: rgba(255, 255, 255, .5); }
.ds2.is-dark .ds2-ref-journal { color: #9FB4E8; }
.ds2.is-dark .ds2-ref-meta--sub { color: rgba(255, 255, 255, .62); }
.ds2.is-dark .ds2-ref-sep { color: rgba(255, 255, 255, .4); }
.ds2.is-dark .ds2-ref-pill { background: rgba(159, 180, 232, .18); color: #C9D6F6; }
.ds2.is-dark .ds2-ref-pill--grade { background: rgba(240, 198, 166, .16); color: #F0C6A6; }
.ds2.is-dark .ds2-ref-conf { color: #7FD3A3; }

/* The evidence card follows the scroll theme: white paper in the light zone,
   translucent dark surface while the page is dark. */
.ds2 .ds2-ev-card, .ds2 .ds2-ev-q, .ds2 .ds2-ev-a, .ds2 .ds2-ev-rec, .ds2 .ds2-ev-rec p,
.ds2 .ds2-ev-rec-label, .ds2 .ds2-ev-refs { transition: background-color .5s ease, color .5s ease, border-color .5s ease; }
.ds2.is-dark .ds2-ev-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .04));
  border-color: rgba(255, 255, 255, .16);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .32);
}
.ds2.is-dark .ds2-ev-q { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .75); }
.ds2.is-dark .ds2-ev-q [data-lucide] { color: #9FB4E8; }
.ds2.is-dark .ds2-ev-a { color: rgba(255, 255, 255, .8); }
.ds2.is-dark .ds2-ev-a sup, .ds2.is-dark .ds2-ev-rec sup { color: #9FB4E8; }
.ds2.is-dark .ds2-ev-rec { background: rgba(159, 180, 232, .10); border-color: rgba(159, 180, 232, .28); }
.ds2.is-dark .ds2-ev-rec-label { color: #9FB4E8; }
.ds2.is-dark .ds2-ev-rec p { color: #fff; }
.ds2.is-dark .ds2-ev-refs { border-top-color: rgba(255, 255, 255, .18); }
/* Chip pops stay white tooltips in both themes. */
.ds2.is-dark .ds2-chip-pop b { color: var(--ink); }
.ds2.is-dark .ds2-chip-pop p { color: var(--ink-2); }
.ds2.is-dark .ds2-chip--class { background: rgba(127, 211, 163, .16); border-color: rgba(127, 211, 163, .42); color: #9FE0BC; }
.ds2.is-dark .ds2-chip--loe { background: rgba(159, 180, 232, .16); border-color: rgba(159, 180, 232, .42); color: #C9D6F6; }

/* Chips */
.ds2-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.ds2-chip-wrap { position: relative; display: inline-flex; }
.ds2-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff;
  font-size: 11px; font-weight: 600; letter-spacing: .02em; color: var(--ink-2);
  cursor: default; white-space: nowrap;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.ds2-chip:hover { transform: translateY(-1px); border-color: var(--line-strong); box-shadow: var(--shadow-soft); }
.ds2-chip:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.ds2-chip--class { background: #E6F2EB; border-color: #BFDCCB; color: #1F5E3C; animation: ds2-chip-glow 3.2s ease-in-out infinite; }
.ds2-chip--class:hover { border-color: #2D7A4F; }
.ds2-chip--loe { background: var(--brand-soft); border-color: #C9D4F2; color: var(--brand); }
.ds2-chip--loe:hover { border-color: var(--brand); }
.ds2-chip--ref:hover { border-color: var(--brand); color: var(--brand); }
@keyframes ds2-chip-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(45, 122, 79, 0); }
  50% { box-shadow: 0 0 0 4px rgba(45, 122, 79, .12); }
}

/* Journal preview popover (hover/focus) */
.ds2-chip-pop {
  position: absolute; bottom: calc(100% + 9px); left: 50%;
  width: 252px; max-width: 76vw;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-lg); padding: 12px 13px;
  z-index: 40; text-align: left; pointer-events: none;
}
.ds2-chip-pop b { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.ds2-chip-pop .meta { display: block; font-size: 11px; color: var(--brand); font-weight: 500; margin: 3px 0 6px; }
.mk .ds2-chip-pop p { font-size: 11.5px; line-height: 1.55; color: var(--ink-2); margin: 0; }

/* ===== Stats — count-up band ===== */
.ds2-stats .mk-statband-grid { margin-top: 8px; }
.mk .ds2-stats .mk-statband-note { margin-top: 30px; }

/* ===== Privacy statement ===== */
.ds2-trust { text-align: center; padding: 118px 0 96px; }
.ds2-trust-lines { margin-top: 26px; }
.mk .ds2-trust-h {
  font-family: var(--font-brand); font-weight: 500;
  font-size: clamp(30px, 4.4vw, 54px); line-height: 1.18; letter-spacing: -0.01em;
  color: var(--ink); margin: 0;
}
.mk .ds2-trust-h + .ds2-trust-h { margin-top: 8px; }
.mk .ds2-trust-h--accent { color: var(--brand); }
.ds2 .ds2-trust-link {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 32px;
  font-size: 15px; font-weight: 600; color: var(--brand);
}
.ds2-trust-link [data-lucide] { width: 16px; height: 16px; transition: transform .2s ease; }
.ds2-trust-link:hover [data-lucide] { transform: translateX(3px); }

/* ===== Closing CTA ===== */
.ds2-cta { text-align: center; padding: 10px 0 140px; }
.mk .ds2-cta-h {
  font-family: var(--font-brand); font-weight: 500;
  font-size: clamp(44px, 7vw, 84px); line-height: 1.05; letter-spacing: -0.015em;
  color: var(--ink); margin: 0 0 32px;
}
.ds2-cta a:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 12px; }

/* ===== Footer — light mode (the indigo footer stays on other pages). The
   .is-dark variants outrank the kit's dark-footer rules so the landing footer
   is light no matter what state the scroll theme is in. ===== */
.ds2 .mk-footer, .ds2.is-dark .mk-footer { background: #fff; color: var(--ink-3); border-top: 1px solid var(--line); }
.ds2 .mk-footer .mk-brand, .ds2.is-dark .mk-footer .mk-brand { color: #1E3A8A; }
.ds2 .mk-footer-brand p, .ds2.is-dark .mk-footer-brand p { color: var(--ink-3); }
.ds2 .mk-footer-section h2, .ds2.is-dark .mk-footer-section h2 { color: var(--ink-4); }
.ds2 .mk-footer-section a, .ds2.is-dark .mk-footer-nav a { color: var(--ink-3); }
.ds2 .mk-footer-section a:hover, .ds2.is-dark .mk-footer-nav a:hover { color: var(--ink); }
.ds2 .mk-footer-legal, .ds2.is-dark .mk-footer-legal { border-top-color: var(--line); color: var(--ink-4); }

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  .ds2-chip--class { animation: none; }
  .ds2-brand, .ds2-login, .ds2-cycle-word, .mk .ds2-hero-h { transition: none; }
}
