/* Kexo hero animation — shared module. Edit here; landings + proto load this. */
#kexo-hero {
  --bg: #0e0e10;
  --surface: #19191a;
  --surface-raised: #212123;
  --text: #eeece9;
  --text-2: #9e9a95;
  --text-3: #807b76;
  --green: #17F28C;
  --blue: #0ea5e9;
  --negative: #f43f5e;
  --cream: #F5F3F0;
  /* Full lineup spans ~1240px (phones + side widgets). Scale to fit viewport.
     Denominator must be a length (px) so 100vw/1240px is unitless — min(1, …) stays valid. */
  --kh-scale: min(1, 100vw / 1240px);
  position: relative;
  width: 100%;
  max-width: none;
  margin-left: auto;
  margin-right: auto;
  /* Match .stage so the hero doesn't collapse before scene.html mounts */
  min-height: calc(640px * var(--kh-scale));
  font-family: Nunito, "Plus Jakarta Sans", system-ui, sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow: visible;
}
#kexo-hero *,
#kexo-hero *::before,
#kexo-hero *::after { box-sizing: border-box; }
#kexo-hero .kh-logo-slot {
  display: none; /* K no longer parks here — fade out after leaving the brackets */
}
/* Hidden until JS fails — avoids flashing the old 4-phone collage before the animation mounts */
#kexo-hero .kh-fallback {
  display: none;
  width: 100%;
  max-width: 64rem;
  margin-left: auto;
  margin-right: auto;
  padding: 0 1.25rem;
  border-radius: 1rem;
}
#kexo-hero.kh-static .stage { display: none; }
#kexo-hero.kh-static .kh-fallback { display: block; }
@media (max-width: 640px) {
  #kexo-hero {
    /* Side widgets hidden — phones-only composition is tighter */
    --kh-scale: min(1, 100vw / 900px);
  }
  #kexo-hero .widget.small,
  #kexo-hero .widget.weight { display: none; }
}

/* ---------- scene ---------- */
  #kexo-hero .stage {
    position: relative;
    width: 100%;
    height: calc(640px * var(--kh-scale));
    overflow: hidden; /* clips only the padded void after scale — content fits via --kh-scale */
  }
  #kexo-hero .scene {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 1100px;
    height: 640px;
    margin: -320px 0 0 -550px; /* center in stage; scale from center */
    transform: scale(var(--kh-scale));
    transform-origin: center center;
  }
  #kexo-hero .center-anchor {
    position: absolute; left: 50%; top: 38%;
    width: 0; height: 0;
  }
  #kexo-hero .stage-glow {
    width: 1200px; height: 780px; border-radius: 50%;
    background: radial-gradient(closest-side,
      rgba(23,242,140,0.09), rgba(23,242,140,0.03) 45%, transparent 72%);
    opacity: 0; z-index: 0; pointer-events: none;
  }
  /* .c elements are centered on the anchor via gsap xPercent/yPercent -50 */
  #kexo-hero .c { position: absolute; }

  /* ---------- K mark (Figma vector master — soft-3D clay pills) ---------- */
  #kexo-hero #kmark {
    width: 210px; height: 210px; overflow: visible; z-index: 5;
  }
  #kexo-hero #kmark svg { display: block; width: 100%; height: 100%; }

  /* ---------- viewfinder arcs ---------- */
  #kexo-hero #arcs { width: 300px; height: 300px; overflow: visible; }
  #kexo-hero #arcs path {
    fill: none; stroke: var(--text); stroke-width: 6;
    stroke-linecap: round; opacity: 0.85;
  }

  /* ---------- input bar ---------- */
  #kexo-hero .input-bar {
    width: 440px; height: 60px; border-radius: 20px;
    background: var(--surface); border: 1px solid #232325;
    display: flex; align-items: center; gap: 14px; padding: 0 18px;
    opacity: 0;
  }
  #kexo-hero .input-bar .icons { display: flex; gap: 12px; color: var(--text-3); flex-shrink: 0; }
  #kexo-hero .input-bar .icons svg { width: 20px; height: 20px; }
  #kexo-hero .input-bar .typed-wrap {
    flex: 1; font-size: 16px; font-weight: 600; color: var(--text);
    white-space: nowrap; overflow: hidden; display: flex; align-items: center;
    position: relative;
  }
  #kexo-hero .input-bar .placeholder { color: var(--text-3); position: absolute; }
  #kexo-hero .input-bar .caret {
    width: 2px; height: 20px; background: var(--green);
    margin-left: 2px; flex-shrink: 0; opacity: 0;
  }
  #kexo-hero .input-bar .send {
    width: 36px; height: 36px; border-radius: 50%; background: var(--surface-raised);
    display: flex; align-items: center; justify-content: center; color: var(--text-2);
    flex-shrink: 0;
  }

  /* ---------- photo moment: native 9:16 portrait, uncropped, back layer ---------- */
  #kexo-hero .photo-moment {
    width: 330px; height: 587px; /* 9:16 — 720x1280 native, no crop */
    border-radius: 24px; overflow: hidden;
    opacity: 0; box-shadow: 0 30px 90px rgba(0,0,0,0.65);
    z-index: 1;
  }
  #kexo-hero .photo-moment video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
  /* scrim: keeps the fixed headline/badge readable over the bright counter */
  #kexo-hero .photo-moment::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(to bottom, rgba(10,10,11,0.9) 0%, rgba(10,10,11,0.45) 16%, transparent 38%);
  }
  /* layering: video sits in the back; arcs and UI elements above it */
  #kexo-hero #arcs { z-index: 3; }
  #kexo-hero .input-bar,
  #kexo-hero .coach-line,
  #kexo-hero .meal-card,
  #kexo-hero .hero-num,
  #kexo-hero .deficit-bar,
  #kexo-hero .rings-card,
  #kexo-hero .bars-card { z-index: 4; }

  /* ---------- coach line ---------- */
  #kexo-hero .coach-line {
    font-size: 16px; font-weight: 600; color: var(--text);
    opacity: 0; white-space: nowrap; width: max-content;
  }

  /* ---------- logged-meal card (chat style) ---------- */
  #kexo-hero .meal-card {
    width: 460px; padding: 14px; border-radius: 20px;
    background: var(--surface); border: 1px solid #232325;
    display: flex; align-items: center; gap: 14px;
    opacity: 0;
  }
  #kexo-hero .meal-card .thumb {
    width: 72px; height: 72px; border-radius: 14px; overflow: hidden; flex-shrink: 0;
  }
  #kexo-hero .meal-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
  #kexo-hero .meal-card .mt { flex: 1; min-width: 0; }
  #kexo-hero .meal-card .lbl {
    font-size: 10px; font-weight: 800; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--text-3);
    display: flex; align-items: center; gap: 6px;
  }
  #kexo-hero .meal-card .lbl .check {
    width: 14px; height: 14px; border-radius: 50%; background: var(--green);
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--bg); font-size: 9px; font-weight: 900;
  }
  #kexo-hero .meal-card .mt b { display: block; font-size: 16px; font-weight: 800; margin-top: 3px; }
  #kexo-hero .meal-card .mt .meta { font-size: 13px; color: var(--text-2); font-weight: 700; margin-top: 3px; }

  /* ---------- hero number ---------- */
  #kexo-hero .hero-num {
    font-size: 64px; font-weight: 1000; letter-spacing: -0.02em;
    opacity: 0; display: flex; align-items: baseline; gap: 10px;
    width: max-content; white-space: nowrap;
  }
  #kexo-hero .hero-num .unit { font-size: 16px; font-weight: 700; color: var(--text-2); }

  /* ---------- deficit bar ---------- */
  #kexo-hero .deficit-bar {
    width: 320px; height: 12px; border-radius: 999px; background: var(--surface-raised);
    opacity: 0; overflow: hidden;
  }
  #kexo-hero .deficit-bar .fill {
    height: 100%; width: 100%; border-radius: 999px; background: var(--green);
    transform: scaleX(0); transform-origin: left center;
  }

  /* ---------- rings card ---------- */
  #kexo-hero .rings-card {
    width: 300px; padding: 20px; border-radius: 24px; background: var(--cream);
    display: flex; justify-content: space-between; opacity: 0;
    border: 0 !important; box-shadow: none !important; outline: none;
    --tw-ring-shadow: 0 0 #0000;
    --tw-ring-offset-shadow: 0 0 #0000;
  }
  #kexo-hero .rings-card .kh-ring { text-align: center; color: #1a1a1a; }
  #kexo-hero .rings-card .kh-ring svg { width: 44px; height: 44px; transform: rotate(-90deg); }
  #kexo-hero .rings-card .kh-ring circle.track { fill: none; stroke: #e4e0db; stroke-width: 5; }
  #kexo-hero .rings-card .kh-ring circle.prog { fill: none; stroke-width: 5; stroke-linecap: round; }
  #kexo-hero .rings-card .kh-ring b { display: block; font-size: 18px; font-weight: 900; margin-top: 4px; }
  #kexo-hero .rings-card .kh-ring span { font-size: 10px; font-weight: 700; color: #757575; }

  /* ---------- bars card ---------- */
  #kexo-hero .bars-card {
    width: 300px; padding: 20px 20px 14px; border-radius: 24px; background: var(--cream);
    opacity: 0; color: #1a1a1a;
    border: 0 !important; box-shadow: none !important; outline: none;
    --tw-ring-shadow: 0 0 #0000;
    --tw-ring-offset-shadow: 0 0 #0000;
  }
  #kexo-hero .bars-card .label { font-size: 11px; font-weight: 900; letter-spacing: 0.08em; color: #757575; }
  #kexo-hero .bars-card .row { display: flex; align-items: flex-end; gap: 12px; height: 90px; margin-top: 12px; }
  #kexo-hero .bars-card .bar-w { flex: 1; height: 100%; display: flex; align-items: flex-end; }
  #kexo-hero .bars-card .bar {
    width: 100%; border-radius: 6px 6px 3px 3px; background: #d9d5d0;
    transform: scaleY(0); transform-origin: bottom center;
  }
  #kexo-hero .bars-card .bar.ok { background: #22c55e; }
  #kexo-hero .bars-card .bar.over { background: var(--negative); }
  #kexo-hero .bars-card .bar.today { background: var(--blue); }

  /* ---------- lineup: phones ---------- */
  #kexo-hero .lineup { position: absolute; inset: 0; pointer-events: none; }
  #kexo-hero .phone {
    position: absolute; border-radius: 34px; overflow: hidden;
    border: 1px solid #2a2a2c; background: #000; opacity: 0;
    box-shadow: 0 30px 80px rgba(0,0,0,0.55);
  }
  #kexo-hero .phone img { display: block; width: 100%; }
  /* lineup x: equal 32px gaps, group centered
     widths 150 + 205 + 240 + 205 + 270 = 1070; + 4×32 = 1198 → start −599 */
  #kexo-hero .phone.day { width: 240px; height: 490px; left: 50%; top: 44%; margin: -185px 0 0 -180px; z-index: 3; }
  #kexo-hero .phone.chat { width: 205px; height: 420px; left: 50%; top: 46%; margin: -150px 0 0 -417px; z-index: 2; }
  #kexo-hero .phone.week { width: 205px; height: 420px; left: 50%; top: 46%; margin: -150px 0 0 92px; z-index: 2; }

  /* ---------- coded phone screens (390pt design, scaled into each phone) ---------- */
  #kexo-hero .screen {
    width: 390px; background: #0e0e10; display: flex; flex-direction: column;
    font-family: -apple-system, "SF Pro Text", system-ui, sans-serif;
    color: #eeece9; transform-origin: top left;
  }
  #kexo-hero .screen.chat-screen { height: 800px; transform: scale(0.5256); }
  #kexo-hero .screen.week-screen { height: 800px; transform: scale(0.5256); }
  #kexo-hero .screen.day-screen { height: 797px; transform: scale(0.6154); }
  #kexo-hero .screen .sb {
    display: flex; justify-content: space-between; align-items: center;
    padding: 18px 28px 6px 32px; font-size: 15px; font-weight: 600; flex-shrink: 0;
  }
  #kexo-hero .screen .sb-icons { display: flex; align-items: center; gap: 6px; }
  #kexo-hero .chat-screen .navbar {
    display: flex; align-items: center; padding: 6px 16px 10px;
    font-size: 17px; font-weight: 600;
  }
  #kexo-hero .chat-screen .navbar span { flex: 1; text-align: center; }
  #kexo-hero .chat-screen .navbar i { width: 16px; }
  #kexo-hero .chat-screen .msgs {
    flex: 1; display: flex; flex-direction: column; gap: 14px;
    padding: 24px 20px 16px; overflow: hidden;
  }
  #kexo-hero .chat-screen .cm-wrap { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; margin-left: 24px; }
  #kexo-hero .chat-screen .cm-card {
    background: #212123; border-radius: 18px; padding: 12px;
    display: flex; gap: 12px; width: 100%;
  }
  #kexo-hero .chat-screen .cm-card .ph { width: 88px; height: 88px; border-radius: 14px; object-fit: cover; flex-shrink: 0; }
  #kexo-hero .chat-screen .cm-card .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  #kexo-hero .chat-screen .cm-card .head {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 12px; font-weight: 600; color: #9e9a95;
  }
  #kexo-hero .chat-screen .cm-card b { font-size: 15px; font-weight: 500; line-height: 1.25; }
  #kexo-hero .chat-screen .cm-card i { font-size: 11px; line-height: 14px; color: #807a75; font-style: italic; }
  #kexo-hero .chat-screen .cm-card .macros { font-size: 12px; font-weight: 600; margin-top: 2px; }
  #kexo-hero .chat-screen .undo { display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; color: #807b76; }
  #kexo-hero .chat-screen .coach-msg { font-size: 15px; line-height: 22px; margin: 0 40px 0 0; }
  #kexo-hero .screen .ibar {
    margin: 8px 20px 6px; padding: 10px 10px 10px 16px; flex-shrink: 0;
    background: #19191a; border: 1px solid #807b76; border-radius: 26px;
    display: flex; align-items: center; gap: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  }
  #kexo-hero .screen .ibar .ph-text { flex: 1; font-size: 15px; color: #807b76; }
  #kexo-hero .screen .ibar .send-b {
    width: 32px; height: 32px; border-radius: 16px; background: #0ea5e9;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  }
  #kexo-hero .screen .homebar { display: flex; justify-content: center; padding: 10px 0 8px; flex-shrink: 0; }
  #kexo-hero .screen .homebar i { width: 134px; height: 5px; border-radius: 100px; background: #eeece9; }

  /* ---------- day/week shared segmented nav ---------- */
  #kexo-hero .screen .seg-nav { display: flex; align-items: center; gap: 8px; padding: 6px 16px 10px; flex-shrink: 0; }
  #kexo-hero .screen .date-pill {
    display: flex; align-items: center; gap: 7px; background: #19191a;
    border-radius: 999px; padding: 9px 14px; font-size: 14px; font-weight: 600;
  }
  #kexo-hero .screen .dw-toggle {
    margin-left: auto; display: flex; background: #19191a; border-radius: 999px;
    padding: 4px; font-size: 13px; font-weight: 600; color: #9e9a95;
  }
  #kexo-hero .screen .dw-toggle span { padding: 6px 16px; border-radius: 999px; }
  #kexo-hero .screen .dw-toggle .on { background: var(--green); color: #0e0e10; font-weight: 700; }
  #kexo-hero .screen .gear-b {
    width: 36px; height: 36px; border-radius: 50%; background: #19191a;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  }

  /* ---------- day screen (green good-day state) ---------- */
  #kexo-hero .day-screen .day-head { padding: 8px 20px 4px; }
  #kexo-hero .day-screen .row1 { display: flex; align-items: baseline; gap: 8px; }
  #kexo-hero .day-screen .big { font-size: 54px; font-weight: 900; color: var(--green); letter-spacing: -0.02em; line-height: 1; }
  #kexo-hero .day-screen .big-u { font-size: 15px; color: #9e9a95; font-weight: 600; }
  #kexo-hero .day-screen .row1 .flame {
    margin-left: auto; align-self: center; display: flex; align-items: center; gap: 4px;
    font-size: 13px; font-weight: 700; color: #f97316;
    background: rgba(249,115,22,0.14); padding: 5px 10px; border-radius: 999px;
  }
  #kexo-hero .day-screen .day-prog { height: 8px; border-radius: 999px; background: #2a2a2c; margin-top: 14px; overflow: hidden; }
  #kexo-hero .day-screen .day-prog i {
    display: block; height: 100%; border-radius: 999px; background: var(--green);
    transform: scaleX(0.862); transform-origin: left center;
  }
  #kexo-hero .day-screen .row2 { display: flex; justify-content: space-between; font-size: 13px; color: #9e9a95; margin-top: 8px; font-weight: 500; }
  #kexo-hero .day-screen .macro-card {
    margin: 12px 16px 0; background: #f4f1ec; border-radius: 20px; padding: 14px 18px;
    display: flex; justify-content: space-between;
    border: 0 !important; box-shadow: none !important; outline: none;
    --tw-ring-shadow: 0 0 #0000;
    --tw-ring-offset-shadow: 0 0 #0000;
  }
  /* Neutralize Tailwind's `.ring` utility if any leftover class collisions occur */
  #kexo-hero .kh-ring {
    --tw-ring-shadow: 0 0 #0000 !important;
    --tw-ring-offset-shadow: 0 0 #0000 !important;
    box-shadow: none !important;
    border: 0 !important;
  }
  #kexo-hero .day-screen .macro-card .kh-ring { text-align: center; color: #1a1a1a; }
  #kexo-hero .day-screen .macro-card svg { width: 44px; height: 44px; transform: rotate(-90deg); }
  #kexo-hero .day-screen .macro-card circle.track { fill: none; stroke: #e4e0db; stroke-width: 5; }
  #kexo-hero .day-screen .macro-card circle.prog { fill: none; stroke-width: 5; stroke-linecap: round; }
  #kexo-hero .day-screen .macro-card b { display: block; font-size: 16px; font-weight: 900; margin-top: 2px; line-height: 1.1; }
  #kexo-hero .day-screen .macro-card span { font-size: 9.5px; color: #757575; font-weight: 600; display: block; }
  #kexo-hero .day-screen .macro-card em { font-size: 10px; color: #757575; font-weight: 700; font-style: normal; }
  #kexo-hero .day-screen .meals { margin: 12px 16px 0; background: #161617; border-radius: 20px; padding: 4px 14px; }
  #kexo-hero .day-screen .mrow { display: flex; align-items: center; gap: 12px; padding: 11px 2px; border-bottom: 1px solid #212123; }
  #kexo-hero .day-screen .mrow:last-child { border-bottom: 0; }
  #kexo-hero .day-screen .mic {
    width: 40px; height: 40px; border-radius: 12px; background: #232325;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    overflow: hidden;
  }
  #kexo-hero .day-screen .mic img { width: 100%; height: 100%; object-fit: cover; display: block; }
  #kexo-hero .day-screen .mrow .mt { flex: 1; min-width: 0; }
  #kexo-hero .day-screen .mrow .mt b { display: block; font-size: 14px; font-weight: 700; }
  #kexo-hero .day-screen .mrow .mt span { display: block; font-size: 11.5px; color: #807b76; margin-top: 1px; }
  #kexo-hero .day-screen .mrow em { font-style: normal; font-size: 12.5px; font-weight: 600; }
  #kexo-hero .day-screen .chips { display: flex; gap: 10px; margin: 12px 16px 0; }
  #kexo-hero .day-screen .chip {
    flex: 1; background: #161617; border-radius: 14px; padding: 9px 12px;
    display: flex; align-items: center; justify-content: space-between;
  }
  #kexo-hero .day-screen .chip em {
    font-style: normal; font-size: 11px; color: #9e9a95; background: #232325;
    border-radius: 999px; padding: 2px 8px; font-weight: 700; min-width: 14px; text-align: center;
  }
  #kexo-hero .day-screen .ibar { margin-top: auto; }

  /* ---------- week screen ---------- */
  #kexo-hero .week-screen .wk-scroll { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 4px 16px 0; overflow: hidden; }
  #kexo-hero .week-screen .wk-cal { background: #f4f1ec; border-radius: 20px; padding: 14px 18px 10px; color: #1a1a1a; }
  #kexo-hero .week-screen .wk-label {
    display: flex; align-items: center; gap: 6px;
    font-size: 11px; font-weight: 800; letter-spacing: 0.08em; color: #757575;
  }
  #kexo-hero .week-screen .wk-label .right { margin-left: auto; letter-spacing: 0; font-weight: 600; font-size: 11.5px; }
  #kexo-hero .week-screen .wk-label .right i, #kexo-hero .week-screen .wk-big em i { font-style: normal; color: #17b877; font-weight: 800; }
  #kexo-hero .week-screen .wk-big { display: flex; align-items: baseline; gap: 8px; margin-top: 7px; }
  #kexo-hero .week-screen .wk-big b { font-size: 29px; font-weight: 900; letter-spacing: -0.01em; }
  #kexo-hero .week-screen .wk-big span { font-size: 13px; color: #757575; font-weight: 600; }
  #kexo-hero .week-screen .wk-big em { margin-left: auto; font-style: normal; font-size: 12.5px; font-weight: 600; color: #757575; }
  #kexo-hero .week-screen .wk-sub { font-size: 11.5px; color: #757575; margin-top: 4px; font-weight: 500; }
  #kexo-hero .week-screen .wk-sub b { font-weight: 700; }
  #kexo-hero .week-screen .wk-chart { display: flex; gap: 8px; margin-top: 10px; height: 108px; }
  #kexo-hero .week-screen .wk-chart.short { height: 64px; }
  #kexo-hero .week-screen .axis {
    display: flex; flex-direction: column; justify-content: space-between;
    font-size: 9px; color: #a09c96; text-align: right; padding-bottom: 15px; font-weight: 600;
  }
  #kexo-hero .week-screen .wk-dark .axis { color: #5a5a5d; }
  #kexo-hero .week-screen .plot { flex: 1; display: flex; gap: 10px; position: relative; }
  #kexo-hero .week-screen .target-line {
    position: absolute; left: 0; right: 0; top: 23%;
    border-top: 1.5px dashed #b9b5ae; pointer-events: none;
  }
  #kexo-hero .week-screen .col {
    flex: 1; display: flex; flex-direction: column; justify-content: flex-end;
    align-items: center; gap: 4px; height: 100%;
  }
  #kexo-hero .week-screen .col em { font-size: 9px; color: #a09c96; font-style: normal; font-weight: 600; height: 11px; }
  #kexo-hero .week-screen .wk-dark .col em { color: #5a5a5d; }
  #kexo-hero .week-screen .wbar {
    width: 13px; border-radius: 99px;
    transform: scaleY(1); transform-origin: bottom center;
  }
  #kexo-hero .week-screen .wbar.ok { background: #22c55e; }
  #kexo-hero .week-screen .wbar.over { background: var(--negative); }
  #kexo-hero .week-screen .wbar.today { background: var(--blue); }
  #kexo-hero .week-screen .wbar.ghost { background: #dcd8d2; }
  #kexo-hero .week-screen .wbar.wo { background: var(--green); }
  #kexo-hero .week-screen .wbar.ghost-d { background: #232325; }
  #kexo-hero .week-screen .wk-dark { background: #161617; border-radius: 20px; padding: 13px 18px; }
  #kexo-hero .week-screen .wk-dark .wk-label { color: #807b76; }
  #kexo-hero .week-screen .wk-dark .wk-label .right { color: #9e9a95; }
  #kexo-hero .week-screen .wk-dark .wk-label .right i { color: var(--green); }
  #kexo-hero .week-screen .wk-dark .wk-sub { color: #9e9a95; }
  #kexo-hero .week-screen .wk-dark .wk-sub b { color: #cfccc7; }
  #kexo-hero .week-screen .wk-legend {
    display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px;
    margin-top: 8px; font-size: 10.5px; color: #9e9a95; font-weight: 500;
  }
  #kexo-hero .week-screen .wk-legend span { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
  #kexo-hero .week-screen .wk-legend i { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
  #kexo-hero .week-screen .wk-legend b.g { color: var(--green); font-weight: 700; }
  #kexo-hero .week-screen .wk-lines { width: 100%; height: 52px; margin-top: 8px; overflow: visible; }
  #kexo-hero .week-screen .wk-lines .goal { stroke: #3a3a3d; stroke-width: 1.2; stroke-dasharray: 3 5; }
  #kexo-hero .week-screen .m-line { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  #kexo-hero .week-screen .wk-hint { text-align: center; font-size: 10.5px; color: #a09c96; margin-top: 6px; font-weight: 500; }

  /* ---------- widgets (coded) ---------- */
  #kexo-hero .widget {
    position: absolute; border-radius: 24px; overflow: hidden; opacity: 0; z-index: 1;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  }
  #kexo-hero .widget.small { left: 50%; top: 45%; margin: -75px 0 0 -599px; }
  #kexo-hero .widget.weight { left: 50%; top: 45%; margin: -65px 0 0 329px; }
  #kexo-hero .w-card {
    background: #1b1b1d; border: 1px solid #262628; border-radius: 24px;
    font-family: -apple-system, "SF Pro Text", system-ui, sans-serif; color: #eeece9;
  }
  #kexo-hero .w-small { width: 150px; height: 150px; padding: 16px; display: flex; flex-direction: column; }
  #kexo-hero .w-small .sw-top { display: flex; align-items: flex-start; justify-content: space-between; }
  #kexo-hero .w-small .sw-top b { font-size: 30px; font-weight: 800; letter-spacing: -0.01em; line-height: 1; }
  #kexo-hero .w-small .flame {
    display: flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; color: #f97316;
    background: rgba(249,115,22,0.14); padding: 3px 7px; border-radius: 999px;
  }
  #kexo-hero .w-small .sw-sub { font-size: 12px; color: #9e9a95; font-weight: 600; margin-top: 3px; }
  #kexo-hero .w-small .sw-bar {
    height: 7px; border-radius: 999px; background: #2a2a2c; overflow: hidden; margin-top: auto;
  }
  #kexo-hero .w-small .sw-bar i {
    display: block; height: 100%; width: 100%; border-radius: 999px; background: var(--green);
    transform: scaleX(0.862); transform-origin: left center;
  }
  #kexo-hero .w-small .sw-cap { font-size: 10px; color: #807b76; font-weight: 600; margin-top: 8px; }
  #kexo-hero .w-weight { width: 270px; padding: 16px 16px 12px; }
  #kexo-hero .w-weight .ww-top { display: flex; align-items: baseline; justify-content: space-between; }
  #kexo-hero .w-weight .ww-top b { font-size: 20px; font-weight: 800; }
  #kexo-hero .w-weight .ww-top span { font-size: 11px; font-weight: 600; color: var(--green); }
  #kexo-hero .w-weight .ww-chart { display: block; width: 100%; height: 64px; margin-top: 10px; overflow: visible; }
  #kexo-hero .w-weight .ww-chart .goal { stroke: #4a4a4d; stroke-width: 1.5; stroke-dasharray: 3 5; stroke-linecap: round; }
  #kexo-hero .w-weight .ww-chart #w-line { fill: none; stroke: #38bdf8; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
  #kexo-hero .w-weight .ww-chart #w-dot { fill: #38bdf8; }
  #kexo-hero .w-weight .ww-goal { font-size: 10px; color: #807b76; font-weight: 600; display: block; margin-top: 6px; }

  
