/* ╦ ╦╔═╗╔╦╗╔═╗
   ╠═╣║ ║║║║║╣
   ╩ ╩╚═╝╩ ╩╚═╝   live home (home.html). Prefix: hm-  */

.hm {
  --hm-dot: color-mix(in srgb, var(--text-3) 20%, transparent);
  --hm-bar-h: 54px;
  position: relative;
  min-height: calc(100vh - 190px);   /* header + tab bar + the site's own footer */
  display: flex;
  flex-direction: column;
  align-items: center;
  isolation: isolate;
  overflow-x: clip;                  /* the title canvas bleeds wider than the column */
}

/* ░░ Dots: static, never follow the mouse ░░ */
.hm::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(var(--hm-dot) 1px, transparent 1.5px);
  background-size: 22px 22px;
  background-position: center;
}

/* ░░ Layout: the title is pinned near the top, everything else hangs below it ░░ */
.hm-main {
  position: relative;
  flex: 1;
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  padding: 9vh 0 24px;
  text-align: center;
}
.hm [hidden] { display: none !important; }

/* `.rvt-proto-canvas a` (accent) and `a:hover` (underline) in proto_common.css outrank one-class link rules:
   links here that set a color use two classes, and none underline. */
.rvt-proto-canvas :is(.hm, .hm-pop) a:hover { text-decoration: none; }

/* Title: the canvas reaches 160px past the wrap (data-bleed), so everything below sits on top of it */
.hm-title { position: relative; z-index: 1; width: 100%; text-align: center; }
.hm-title .rvt-pt-domain { width: 100%; text-align: center; }
.hm .rvt-pt-canvas-wrap { width: min(620px, 100%); height: clamp(76px, 9.2vw, 124px); }

/* ░░ Eyebrow: floats over the padding above the title, opens the MCP pop-up ░░ */
.hm .hm-brow { position: absolute; top: calc(9vh - 40px); left: 50%; transform: translateX(-50%); white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-1); color: var(--text-2); font: 500 12px var(--font-mono); text-decoration: none; z-index: 2; }
.hm .hm-brow:hover { color: var(--text-0); border-color: var(--border-strong); }
.hm-brow-ic { color: var(--text-3); flex: none; }
.hm-brow-mcp { font: 700 9.5px var(--font-mono); font-style: normal; letter-spacing: .08em; color: var(--text-1); background: var(--bg-3); padding: 2px 6px; border-radius: 4px; }

/* ░░ Search block ░░ */
.hm-box { position: relative; z-index: 3; width: 100%; max-width: 580px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.hm-field { position: relative; width: 100%; min-height: var(--hm-bar-h); }

.hm-bar {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px 0 16px;
  height: var(--hm-bar-h);
  border-radius: 14px;
  background: var(--bg-1);
  border: 1px solid var(--border-strong);
  transition: border-color .15s;
}
/* Border on hover / focus: just lighter than at rest, never orange, never a glow */
.hm-bar:hover { border-color: color-mix(in srgb, var(--border-strong) 75%, var(--text-3)); }
.hm-bar:focus-within { border-color: color-mix(in srgb, var(--border-strong) 50%, var(--text-3)); }
.hm-ico { color: var(--text-3); flex: none; }
.hm-input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--text-0); font: 15.5px var(--font-sans); }
.hm-input::placeholder { color: var(--text-3); }
.hm-kbd { display: flex; gap: 3px; flex: none; padding: 0; border: 0; background: none; cursor: pointer; }
.hm-kbd kbd { font: 11px var(--font-mono); padding: 1px 5px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 4px; color: var(--text-2); background: transparent; }
.hm-kbd:hover kbd { color: var(--text-0); }
.hm[data-mode="whatsnew"] .hm-bar { display: none; }

/* ░░ Mode toggles: Search / Compare / What's new ░░ */
.hm-modes { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--bg-1); border: 1px solid var(--border); }
.hm-modes button { display: inline-flex; align-items: center; gap: 7px; padding: 6px 14px; border-radius: 7px; font: 500 13px var(--font-sans); color: var(--text-2); background: none; border: 0; cursor: pointer; white-space: nowrap; }
.hm-modes button:hover, .hm-modes button.is-on { color: var(--text-0); }
.hm-modes button.is-on { background: var(--bg-3); }
.hm-modes svg { flex: none; opacity: .8; }
.hm-modes button.is-on svg { opacity: 1; }

/* ░░ Results: float over the page, scroll inside ░░ */
.hm-drop, .hm-years {
  position: absolute; left: 0; right: 0; z-index: 30;
  border: 1px solid var(--border-strong); border-radius: 12px; background: var(--bg-1);
  box-shadow: 0 14px 40px rgba(0,0,0,.28);
}
.hm-drop {
  top: calc(100% + 6px);
  max-height: min(440px, 52vh); overflow-y: auto; overscroll-behavior: contain;
  padding: 4px; text-align: left; scrollbar-width: thin;
}
.hm-drop a { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text-1); text-decoration: none; }
.hm-drop a:hover, .hm-drop a.is-sel { background: var(--bg-2); color: var(--text-0); }
.hm-drop a * { text-decoration: none; }
.hm-drop b { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 400 13px var(--font-mono); color: var(--text-2); }
.hm-drop mark { color: var(--text-0); font-weight: 700; background: none; }   /* typed keyword bold, the rest dimmed */
.hm-drop em { flex: none; max-width: 38%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-style: normal; font-size: 11.5px; line-height: 18px; color: var(--text-3); }
.hm-drop .type-icon { flex: none; margin-top: 1px; }
.hm-drop p { margin: 0; padding: 9px 10px; font-size: 12.5px; color: var(--text-3); }
.hm-r { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.hm-r small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; color: var(--text-3); }

/* Type chips with counts at the top of the results */
.hm-chips { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 6px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
.hm-chips button { font: 500 11.5px var(--font-sans); color: var(--text-2); padding: 3px 9px; border-radius: 7px; border: 1px solid var(--border); background: none; cursor: pointer; }
.hm-chips button span { color: var(--text-3); font: 10.5px var(--font-mono); }
.hm-chips button:hover { color: var(--text-0); border-color: var(--text-3); }
.hm-chips button.is-on { color: var(--text-0); background: var(--bg-3); border-color: var(--border-strong); }

/* ░░ What's new: a tile per year where the bar was; the timeline steps aside ░░ */
/* rtl fills each row from the right: newest row on top, years rise left to right (2024 … 2027 / 2020 … 2023) */
.hm-years { top: 0; padding: 8px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; direction: rtl; }
.hm .hm-years a { direction: ltr; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 14px; border-radius: 9px; border: 1px solid var(--border); background: var(--bg-0); color: var(--text-1); text-decoration: none; }
.hm-years b { font: 500 18px var(--font-mono); color: var(--text-0); }
.hm-years span { font-size: 11.5px; color: var(--text-3); }
.hm .hm-years a:hover { border-color: var(--text-3); background: var(--bg-2); }
.hm-years a:hover span { color: var(--text-1); }
.hm .hm-years a.is-on { border-color: var(--accent); }
.hm-years a.is-on b { color: var(--accent); }
.hm[data-mode="whatsnew"] .hm-tl { visibility: hidden; }

/* ░░ Timeline: picks the year ░░ */
.hm-tl { position: relative; z-index: 2; width: 100%; max-width: 540px; display: flex; justify-content: space-between; }
.hm-tl::before { content: ''; position: absolute; left: 6px; right: 6px; top: 6px; height: 1px; background: var(--border-strong); }
.hm .hm-tl a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; font: 11.5px var(--font-mono); color: var(--text-3); text-decoration: none; }
.hm-tl a i { width: 13px; height: 13px; border-radius: 50%; background: var(--bg-0); border: 2px solid var(--border-strong); transition: transform .15s, border-color .15s, background .15s; }
.hm .hm-tl a:hover { color: var(--text-0); }
.hm-tl a:hover i { border-color: var(--text-1); transform: scale(1.2); }
.hm .hm-tl a.is-on { color: var(--accent); }
.hm-tl a.is-on i { background: var(--accent); border-color: var(--accent); }
@media (max-width: 720px) {
  .hm-tl a span { font-size: 0; } .hm-tl a span::after { content: attr(data-s); font-size: 10.5px; }
  .hm-years { grid-template-columns: repeat(2, 1fr); }
}

/* ░░ AI-Lab card (42px under the search: the column gap is 26px) ░░ */
.hm .hm-card { position: relative; z-index: 2; margin-top: 16px; width: 100%; max-width: 460px; display: inline-flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-1); color: var(--text-1); font-size: 13px; text-align: left; text-decoration: none; }
.hm .hm-card:hover { color: var(--text-0); border-color: var(--border-strong); }
.hm-card-txt { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hm-card-txt b { color: var(--text-0); font-weight: 600; }
.hm-card-txt span { font-size: 12.5px; color: var(--text-3); }

/* Striped orange tool buttons: the card's Join + the pop-up's Join */
.hm-btn, .hm-pop .hm-pop-join {
  font: 700 13px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: #141414;
  border: 1px solid transparent;
  background: repeating-linear-gradient(-45deg, #eba03f 0 6px, #df9436 6px 12px);
}
.hm-btn { flex: none; font-size: 11px; padding: 6px 14px; border-radius: 8px; }
.hm-card:hover .hm-btn, .hm-pop .hm-pop-join:hover { filter: brightness(1.08); }

/* The AI-Lab robot (from EF_LRA-PLATFORM app_courses ticons.css): orange eyes that blink and follow the pointer */
.hm-bot { flex: none; overflow: visible; color: var(--text-2); fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.hm-bot * { vector-effect: non-scaling-stroke; }
.hm-bot-body { fill: currentColor; fill-opacity: .12; }
.hm-bot-ey { fill: var(--accent); stroke: none; transform-box: fill-box; transform-origin: center; }
.hm-bot-eyes { transition: transform .18s ease-out; }
.hm-card:hover .hm-bot { color: var(--text-1); }
@media (prefers-reduced-motion: no-preference) { .hm-bot-ey { animation: hm-blink 5.2s infinite; } }
@keyframes hm-blink { 0%, 95%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.12); } }

/* ░░ RVTDocs MCP pop-up: the look of the LRA resources pop-up ░░ */
.hm-pop { width: min(560px, calc(100vw - 32px)); padding: 28px 30px 24px; border: 1px solid var(--border-strong); border-radius: 18px; background: #121212; color: var(--text-1); box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.hm-pop::backdrop { background: rgba(0,0,0,.6); backdrop-filter: blur(2px); }
.hm-pop-img { display: block; width: 100%; height: auto; aspect-ratio: 1672 / 941; object-fit: cover; border-radius: 14px; border: 1px solid var(--border); background: var(--bg-2); }
.hm-pop-k { margin: 22px 0 0; font: 700 12.5px var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); }
.hm-pop-t { margin: 12px 0 0; font: 700 22px var(--font-sans); color: var(--text-0); }
.hm-pop-d { margin: 10px 0 0; font-size: 15px; line-height: 1.6; color: var(--text-2); }
.hm-pop-l { margin: 18px 0 0; padding: 18px 0 0; border-top: 1px solid var(--border); list-style: none; display: grid; gap: 10px; font-size: 15px; color: var(--text-1); }
.hm-pop-l li::before { content: '✓'; color: var(--accent); margin-right: 12px; }
.hm-pop-l li.is-later, .hm-pop-l li.is-later::before { color: var(--text-3); }   /* not shipped yet: grayed out */
.hm-pop-b { margin-top: 26px; display: flex; align-items: center; gap: 10px; }
.hm-pop .hm-pop-member { margin-right: auto; font-size: 12.5px; color: var(--text-3); text-decoration: none; }
.hm-pop .hm-pop-member:hover { color: var(--text-1); }
.hm-pop-close, .hm-pop .hm-pop-join { padding: 11px 22px; border-radius: 12px; cursor: pointer; text-decoration: none; }
.hm-pop-close { font: 500 15px var(--font-sans); background: transparent; color: var(--text-1); border: 1px solid var(--border-strong); }
.hm-pop-close:hover { color: var(--text-0); border-color: var(--text-3); }
@media (max-width: 520px) { .hm-pop { padding: 18px; } .hm-pop .hm-pop-member { display: none; } }
