/* LL Dashboard Grid v2 — YouTube-faithful */

/* Top-of-page loading bar, scaled from the left. Activated by dashboard-grid.js
   nprogress helper. Sits above Divi header so it's always visible. */
.ll-dg-nprogress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #ff8a3d 0%, #ffb073 100%);
  transform-origin: 0 50%;
  transform: scaleX(0);
  opacity: 0;
  z-index: 100000;
  pointer-events: none;
  box-shadow: 0 0 10px rgba(255, 138, 61, 0.6);
}


/* Hide Divi header + page title when our dashboard is on the page.
 * Page 5044 uses the Dashboard Lightweight template which skips get_header()/get_footer(),
 * but we still belt-and-suspenders hide everything in case the template changes. */
body:has(#ll-dashboard-grid-root) #main-header,
body:has(#ll-dashboard-grid-root) #top-header,
body:has(#ll-dashboard-grid-root) .et-l--header,
body:has(#ll-dashboard-grid-root) .et_header_style_centered,
body:has(#ll-dashboard-grid-root) .et_fixed_nav #main-header,
body:has(#ll-dashboard-grid-root) #et-secondary-nav,
body:has(#ll-dashboard-grid-root) .main_title,
body:has(#ll-dashboard-grid-root) .entry-title,
body:has(#ll-dashboard-grid-root) .et_post_meta_wrapper h1,
body:has(#ll-dashboard-grid-root) #breadcrumbs,
body:has(#ll-dashboard-grid-root) .et_builder_inner_content > .et_pb_title { display: none !important; }

/* Kill the Dashboard Lightweight template's light body + padding. */
body.dashboard-lightweight:has(#ll-dashboard-grid-root),
body:has(#ll-dashboard-grid-root) {
  background: #0f0f0f !important;
  padding: 0 !important;
  margin: 0 !important;
}
/* Light-theme body bg — only when the root has data-theme="light" */
body:has(#ll-dashboard-grid-root[data-theme="light"]) {
  background: #f9f9f9 !important;
}
body:has(#ll-dashboard-grid-root) #dashboard-wrapper {
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
body:has(#ll-dashboard-grid-root) #page-container { padding-top: 0 !important; margin-top: 0 !important; }
body:has(#ll-dashboard-grid-root) #main-content { padding-top: 0 !important; }
/* Kill WP admin bar gap if logged-in admin is viewing */
body.admin-bar:has(#ll-dashboard-grid-root) { padding-top: 0 !important; }
html:has(#ll-dashboard-grid-root) { margin-top: 0 !important; }

/* Windows classic-scrollbars fix: 100vw on #ll-dashboard-grid-root INCLUDES the
   vertical scrollbar gutter (~15-17px on Win, 0 on Mac/Linux overlay-scrollbars).
   When a vertical scrollbar is present, the wrapper extends past viewport width.
   overflow-x:clip on the wrapper itself doesn't shrink its OWN box (clip contains
   children only). Adding overflow-x:clip on the body catches the overhang at the
   page level. Scoped via :has() so non-dashboard pages are untouched. */
body:has(#ll-dashboard-grid-root) { overflow-x: clip; }

#ll-dashboard-grid-root {
  /* Single source of truth for sidebar column width. Collapsed / overlay
     states rewrite this variable on ancestor classes rather than fighting
     the base .ll-dg-sidebar rule — prevents 240px drift across media
     queries and keeps main-column width predictable. */
  --ll-dg-sidebar-width: 240px;
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  /* 100vw includes the vertical scrollbar gutter, so on /hub the root
     extends past the visible viewport and the page shows a horizontal
     scrollbar. `overflow-x: clip` kills the leak without establishing
     a new containing block (so fixed-position children like the sidebar
     backdrop still anchor to the viewport). */
  overflow-x: clip;
  font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f1f1f1;
  background: #0f0f0f;
  min-height: 100vh;
  box-sizing: border-box;
}
#ll-dashboard-grid-root *,
#ll-dashboard-grid-root *::before,
#ll-dashboard-grid-root *::after { box-sizing: border-box; }
#ll-dashboard-grid-root a { text-decoration: none; color: inherit; }
#ll-dashboard-grid-root button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  padding: 0;
}

/* === Top bar === */
.ll-dg-topbar {
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  background: #0f0f0f;
}
.ll-dg-topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  /* Slightly wider than the 240px sidebar so "Lucrative Landscaping" fits
     alongside the hamburger + logo mark without ellipsis. Both bg colors match. */
  width: 260px;
}
.ll-dg-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s ease;
}
.ll-dg-icon-btn:hover { background: #272727; }

.ll-dg-hamburger {
  display: block;
  position: relative;
  width: 18px;
  height: 12px;
}
.ll-dg-hamburger::before,
.ll-dg-hamburger::after,
.ll-dg-hamburger {
  background-image: linear-gradient(#fff, #fff);
  background-size: 18px 2px;
  background-repeat: no-repeat;
}
.ll-dg-hamburger { background-position: center; }
.ll-dg-hamburger::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 18px; height: 2px;
  background: #fff;
}
.ll-dg-hamburger::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0;
  width: 18px; height: 2px;
  background: #fff;
}

.ll-dg-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.2px;
  color: #fff;
  min-width: 0;
}
.ll-dg-brand-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ll-dg-brand-mark {
  width: 32px;
  height: 32px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.ll-dg-topbar-center {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  padding: 0 40px;
}
.ll-dg-search-wrap {
  display: flex;
  width: 100%;
  max-width: 640px;
  height: 40px;
}
/* #id prefix so these win against the #ll-dashboard-grid-root button reset */
#ll-dashboard-grid-root .ll-dg-search {
  flex: 1 1 auto;
  background: #121212;
  border: 1px solid #3f3f3f;
  color: #fff;
  padding: 0 16px;
  font-size: 14px;
  outline: none;
  border-radius: 20px 0 0 20px;
  border-right: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
#ll-dashboard-grid-root .ll-dg-search::placeholder { color: #9a9a9a; }
#ll-dashboard-grid-root .ll-dg-search:focus {
  border-color: #ff8c42;
  box-shadow: inset 0 0 0 1px #ff8c42;
  background: #181818;
}
#ll-dashboard-grid-root .ll-dg-search-btn {
  width: 64px;
  background: #222;
  border: 1px solid #3f3f3f;
  border-left: 1px solid #3f3f3f;
  border-radius: 0 20px 20px 0;
  font-size: 18px;
  color: #fff;
  transition: background 0.12s ease;
}
#ll-dashboard-grid-root .ll-dg-search-btn:hover { background: #303030; }
#ll-dashboard-grid-root .ll-dg-search-btn svg {
  width: 22px;
  height: 22px;
  display: block;
  margin: 0 auto;
}

.ll-dg-topbar-right {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}
.ll-dg-admin-badge {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #ff8c42;
  border: 1px solid rgba(255,140,66,0.35);
  padding: 5px 10px;
  border-radius: 12px;
  font-weight: 600;
}

/* === App shell === */
.ll-dg-app {
  display: flex;
  align-items: flex-start;
  min-height: calc(100vh - 56px);
}

/* === Sidebar === */
.ll-dg-sidebar {
  width: var(--ll-dg-sidebar-width);
  flex-shrink: 0;
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  overflow-y: auto;
  background: #0f0f0f;
  padding: 12px 0;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
  scrollbar-gutter: stable;
}
.ll-dg-sidebar::-webkit-scrollbar { width: 8px; }
.ll-dg-sidebar::-webkit-scrollbar-thumb { background: transparent; border-radius: 4px; transition: background 150ms; }
.ll-dg-sidebar:hover { scrollbar-color: #303030 transparent; }
.ll-dg-sidebar:hover::-webkit-scrollbar-thumb { background: #303030; }
.ll-dg-sidebar-collapsed { display: none; }

.ll-dg-sidebar-backdrop {
  position: fixed;
  left: 0;
  right: 0;
  top: 56px;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 85;
  animation: ll-dg-fade-in 0.15s ease;
}
@keyframes ll-dg-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.ll-dg-nav { display: flex; flex-direction: column; }
.ll-dg-nav-section {
  display: flex;
  flex-direction: column;
  padding: 0 12px;
}
.ll-dg-nav-divider {
  height: 1px;
  background: #272727;
  margin: 12px 12px;
}
.ll-dg-nav-heading {
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  padding: 12px 12px 4px;
}
#ll-dashboard-grid-root .ll-dg-nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 16px;
  height: 40px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 400;
  color: #f1f1f1;
  text-align: left;
  width: 100%;
  transition: background 0.1s ease;
}
#ll-dashboard-grid-root .ll-dg-nav-item:hover { background: #272727; }
#ll-dashboard-grid-root .ll-dg-nav-active {
  background: #383838;
  font-weight: 600;
}
.ll-dg-nav-icon {
  width: 24px;
  height: 24px;
  color: #aaa;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ll-dg-nav-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}
#ll-dashboard-grid-root .ll-dg-nav-active .ll-dg-nav-icon { color: #ff8c42; }
.ll-dg-nav-label {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ll-dg-nav-footer {
  margin-top: 24px;
  padding: 16px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ll-dg-nav-fineprint {
  font-size: 12px;
  color: #9a9a9a;
  line-height: 1.45;
  letter-spacing: 0.1px;
}
.ll-dg-nav-footlinks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  line-height: 1.35;
}
.ll-dg-nav-footlink {
  font-size: 11.5px;
  color: #9a9a9a;
  text-decoration: none;
  letter-spacing: 0.1px;
  transition: color 0.12s ease;
}
.ll-dg-nav-footlink:hover {
  color: #d8d8d8;
  text-decoration: underline;
}
.ll-dg-nav-copyright {
  font-size: 11.5px;
  color: #6b6b6b;
  letter-spacing: 0.1px;
  margin-top: 6px;
}

/* === Main === */
.ll-dg-main {
  flex: 1 1 auto;
  min-width: 0;
}
/* YT caps content column at ~1800px on ultra-wide; full-width backgrounds
   still span the viewport because they live on outer wrappers. */
.ll-dg-main-inner {
  padding: 0 16px 96px;
  max-width: 1800px;
  margin: 0 auto;
}

/* === Sticky chip strip === */
.ll-dg-chip-strip-wrap {
  position: sticky;
  top: 56px;
  z-index: 50;
  background: #0f0f0f;
  padding: 12px 16px;
  border-bottom: 1px solid #1f1f1f;
}
/* Right-edge fade so chips that scroll off don't hard-cut */
.ll-dg-chip-strip-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 1px; /* sit above the border */
  width: 64px;
  pointer-events: none;
  background: linear-gradient(to right, rgba(15,15,15,0), #0f0f0f 85%);
}
.ll-dg-chip-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  align-items: center;
  max-width: 1800px;
  margin: 0 auto;
}
.ll-dg-chip-strip::-webkit-scrollbar { display: none; }
/* Specificity bumped to #id .class to beat the #id button reset above */
#ll-dashboard-grid-root .ll-dg-chip {
  flex-shrink: 0;
  background: #272727;
  color: #f1f1f1;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.12s ease, color 0.12s ease, transform 0.12s ease;
}
#ll-dashboard-grid-root .ll-dg-chip:hover { background: #3a3a3a; }
#ll-dashboard-grid-root .ll-dg-chip-active {
  background: #fff;
  color: #0f0f0f;
}
#ll-dashboard-grid-root .ll-dg-chip-active:hover { background: #fff; }
.ll-dg-chip-divider {
  flex-shrink: 0;
  width: 1px;
  height: 20px;
  background: #3a3a3a;
  margin: 0 6px;
}

/* === Sections === */
.ll-dg-section {
  padding: 24px 0 8px;
}
.ll-dg-section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
}
.ll-dg-section-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  color: #fff;
  letter-spacing: -0.2px;
}
.ll-dg-section-count {
  font-size: 12px;
  color: #717171;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ll-dg-empty {
  padding: 80px 24px;
  text-align: center;
  color: #717171;
  font-size: 14px;
}

/* === Shelves (used for Continue Learning) === */
.ll-dg-row {
  margin: 24px 0 16px;
  position: relative;
  scroll-margin-top: 130px;
}
.ll-dg-row-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}
.ll-dg-row-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  color: #fff;
}
.ll-dg-shelf {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  padding: 4px 0 16px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #303030 transparent;
}
.ll-dg-shelf::-webkit-scrollbar { height: 8px; }
.ll-dg-shelf::-webkit-scrollbar-thumb { background: #303030; border-radius: 4px; }
.ll-dg-shelf .ll-dg-mcard--tile {
  flex: 0 0 calc((100% - 24px) / 3);
  scroll-snap-align: start;
}
@media (max-width: 900px) {
  .ll-dg-shelf .ll-dg-mcard--tile { flex: 0 0 calc((100% - 12px) / 2); }
}
@media (max-width: 560px) {
  .ll-dg-shelf .ll-dg-mcard--tile { flex: 0 0 85%; }
}

/* === Grid (main content view) === */
/* YT caps at 4 cols. 4 ≥1500, 3 below, 2 ≤900, 1 ≤560. */
.ll-dg-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px 16px;
}
@media (min-width: 1500px) {
  .ll-dg-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
  .ll-dg-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .ll-dg-grid { grid-template-columns: 1fr; }
}

/* === Tile + thumb surface rules now owned by .ll-dg-mcard primitive
   (see end of file). Removed: .ll-dg-tile, .ll-dg-tile:hover (+ descendants),
   .ll-dg-thumb-wrap, .ll-dg-thumb-overlay. */

/* WS #6B — video preview overlay on sustained tile hover. Fades in via the
   ll-dg-thumb-preview-ready class added in JS after DOM append. Lives inside
   .ll-dg-mcard__media; primitive's relative+overflow-hidden makes inset:0
   work without extra positioning context. Desktop only — touch devices don't
   fire mouseenter so this is a natural no-op on mobile. */
.ll-dg-thumb-preview {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.ll-dg-thumb-preview.ll-dg-thumb-preview-ready {
  opacity: 1;
}
.ll-dg-thumb-preview iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

.ll-dg-progress-bar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: rgba(255,255,255,0.18);
}
.ll-dg-progress-bar > span {
  display: block;
  height: 100%;
  background: #ff0033;
}
.ll-dg-progress-bar.ll-dg-complete > span { background: #4caf83; }

.ll-dg-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,0.85);
  color: #fff;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
}
.ll-dg-badge.ll-dg-complete { background: #4caf83; }
.ll-dg-badge.ll-dg-in-progress { background: #ff8c42; }

/* .ll-dg-tile-body / .ll-dg-tile-title / .ll-dg-tile-excerpt / .ll-dg-tile-meta
   removed — primitive owns __body/__title/__excerpt/__meta. Tile-specific
   __body padding + __excerpt slot defined inside primitive's --tile variant. */

/* === Mobile === */
@media (max-width: 1100px) {
  .ll-dg-topbar-left { width: auto; }

  /* Sidebar becomes a slide-in overlay. JS default-collapses it below this width.
     Zero the reserved column on the root so main naturally fills the viewport;
     sidebar keeps its 240px visual width via a direct override since it's now
     out of the flex flow. */
  #ll-dashboard-grid-root { --ll-dg-sidebar-width: 0px; }
  .ll-dg-sidebar {
    width: 240px;
    position: fixed;
    left: 0;
    top: 56px;
    height: calc(100vh - 56px);
    z-index: 90;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.4);
  }

  /* 44px touch targets below 1100. */
  #ll-dashboard-grid-root .ll-dg-nav-item { min-height: 44px; height: auto; padding: 0 16px; }
  #ll-dashboard-grid-root .ll-dg-chip { min-height: 44px; padding: 0 16px; display: inline-flex; align-items: center; }
  .ll-dg-search-wrap { height: 44px; }
  #ll-dashboard-grid-root .ll-dg-search-btn { width: 56px; }
  #ll-dashboard-grid-root .ll-dg-proj-back { min-height: 44px; padding: 10px 14px; }
}
/* (mobile .ll-dg-proj-hero img cap removed — primitive's --bare media slot
   enforces aspect-ratio + object-fit on every viewport.) */
@media (max-width: 720px) {
  .ll-dg-brand-text { display: none; }
  /* Give the solo brand mark a little breathing room so it doesn't cramp the hamburger. */
  .ll-dg-brand { margin-left: 4px; }
}
@media (max-width: 600px) {
  .ll-dg-main-inner { padding-left: 16px; padding-right: 16px; }
  .ll-dg-chip-strip-wrap { padding-left: 16px; padding-right: 16px; }
  .ll-dg-topbar { padding: 0 8px; }
  .ll-dg-topbar-center { padding: 0 8px; }
  .ll-dg-admin-badge { display: none; }
}

/* When sidebar is in overlay mode at any width (narrow always, plus project
   route at all widths), hoist it into a fixed-position slide-in like mobile.
   Zero the reserved column on the .ll-dg-app ancestor so the main flex child
   auto-fills — no need for an explicit width:100% fight against the base rule. */
.ll-dg-app-overlay-sidebar { --ll-dg-sidebar-width: 0px; }
.ll-dg-app-overlay-sidebar .ll-dg-sidebar {
  width: 240px;
  position: fixed;
  left: 0;
  top: 56px;
  height: calc(100vh - 56px);
  z-index: 90;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.4);
}

/* === SPA project view === */
.ll-dg-main-project .ll-dg-main-inner {
  max-width: 2000px;
  margin: 0 auto;
  padding: 16px 20px 80px;
}
/* Two-column layout: main content + right rail. Rail collapses below the
   content on narrow viewports. */
.ll-dg-proj-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.ll-dg-proj-layout.ll-dg-has-rail {
  grid-template-columns: minmax(0, 1fr) 340px;
}
.ll-dg-proj-main { min-width: 0; }
@media (max-width: 1200px) {
  .ll-dg-proj-layout.ll-dg-has-rail { grid-template-columns: minmax(0, 1fr); }
}

/* === Right rail (Up next) ===
   Rail scrolls with the page (no sticky / no inner scroll container) per Chris
   May 2 — entire project page should scroll as one unit, YouTube watch-page style. */
.ll-dg-rightrail {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ll-dg-rail-heading {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 4px;
}
.ll-dg-rail-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
/* .ll-dg-rail-tile / .ll-dg-rail-thumb / .ll-dg-rail-body / .ll-dg-rail-title /
   .ll-dg-rail-meta removed — primitive's --rail variant owns layout (grid 168/
   140/stacked), surface (radius/transition/hover bg), title + meta typography.
   Rail badge positioning moved into primitive's --rail block.
   .ll-dg-rail-list (container) stays — that's rail-list layout, not card surface. */
@media (max-width: 1200px) {
  /* Rail collapses below main content; add a little breathing room from the
     stacked main column. */
  .ll-dg-rightrail { margin-top: 8px; }
  .ll-dg-rail-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}
@media (max-width: 600px) {
  .ll-dg-rail-list { grid-template-columns: minmax(0, 1fr); }
}

/* === Sidebar Pipeline card (partner clients only — opens /hub?embed=1 inline) === */
.ll-dg-nav-pipeline { padding: 12px 12px 0; }
.ll-dg-pipeline-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 10px;
  background: linear-gradient(150deg, rgba(82,156,255,0.14), rgba(82,156,255,0.04));
  border: 1px solid rgba(82,156,255,0.32);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}
.ll-dg-pipeline-card:hover {
  background: linear-gradient(150deg, rgba(82,156,255,0.22), rgba(82,156,255,0.06));
  border-color: rgba(82,156,255,0.55);
  transform: translateY(-1px);
}
.ll-dg-pipeline-card-active {
  background: linear-gradient(150deg, rgba(82,156,255,0.28), rgba(82,156,255,0.08));
  border-color: rgba(82,156,255,0.7);
  box-shadow: 0 0 0 1px rgba(82,156,255,0.4) inset;
}
.ll-dg-pipeline-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.ll-dg-pipeline-card-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
}
.ll-dg-pipeline-card-ext {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  color: #7eb3ff;
  opacity: 0.8;
}
.ll-dg-pipeline-card-ext svg { width: 14px; height: 14px; }
.ll-dg-pipeline-card:hover .ll-dg-pipeline-card-ext { opacity: 1; }
.ll-dg-pipeline-card-desc {
  font-size: 12px;
  line-height: 1.4;
  color: #b8c5d8;
  margin: 0;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-pipeline-card {
  background: linear-gradient(150deg, rgba(40,120,220,0.10), rgba(40,120,220,0.02));
  border-color: rgba(40,120,220,0.35);
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-pipeline-card:hover {
  background: linear-gradient(150deg, rgba(40,120,220,0.16), rgba(40,120,220,0.04));
  border-color: rgba(40,120,220,0.55);
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-pipeline-card-active {
  background: linear-gradient(150deg, rgba(40,120,220,0.20), rgba(40,120,220,0.05));
  border-color: rgba(40,120,220,0.7);
  box-shadow: 0 0 0 1px rgba(40,120,220,0.45) inset;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-pipeline-card-title { color: #0f0f0f; }
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-pipeline-card-desc { color: #505050; }
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-pipeline-card-ext { color: #1859b3; }

/* === Hub (pipeline) iframe view === */
/* Problem being solved: iframe was rendering at ~100px tall because the parent
   chain (main-inner → main → app) uses align-items:flex-start and doesn't
   cascade a definite height to the iframe. min-height on the wrap forces the
   WRAP big, but iframe's height:100% resolves against parent HEIGHT (not
   min-height), so it falls back to the iframe default (~150px). Fix: give
   .ll-dg-main-hub an explicit viewport-based height so the whole subtree has
   a definite height to resolve against. */
.ll-dg-main-hub {
  height: calc(100dvh - 56px);
  overflow: hidden;
}
.ll-dg-main-hub .ll-dg-main-inner {
  padding: 0;
  max-width: none;
  height: 100%;
}
.ll-dg-hub-wrap {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.ll-dg-hub-wrap .ll-dg-proj-header {
  /* Compact so the iframe gets maximum vertical space. */
  padding: 6px 20px 4px;
  flex: 0 0 auto;
}
.ll-dg-hub-frame-wrap {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
}
.ll-dg-hub-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  display: block;
}
@media (max-width: 900px) {
  .ll-dg-hub-wrap .ll-dg-proj-header { padding: 4px 14px 2px; }
}

/* === Chat (Ask) view — mirrors Hub layout for a full-height embedded panel === */
.ll-dg-main-chat {
  height: calc(100dvh - 56px);
  overflow: hidden;
}
.ll-dg-main-chat .ll-dg-main-inner {
  padding: 0;
  max-width: none;
  height: 100%;
}
.ll-dg-chat-wrap {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.ll-dg-chat-wrap .ll-dg-proj-header {
  padding: 6px 20px 4px;
  flex: 0 0 auto;
}
.ll-dg-chat-frame-wrap {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
}
.ll-dg-chat-slot {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.ll-dg-chat-container {
  width: 100%;
  height: 100%;
}
@media (max-width: 900px) {
  .ll-dg-chat-wrap .ll-dg-proj-header { padding: 4px 14px 2px; }
}

/* === Sidebar "Ask" nav entry — matches pipeline-card destination styling === */
.ll-dg-nav-chat { padding: 8px 12px 0; }
.ll-dg-nav-chat-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: background-color .15s ease;
}
.ll-dg-nav-chat-link:hover { background: rgba(255,255,255,0.06); }
.ll-dg-nav-chat-link .ll-dg-nav-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.ll-dg-nav-chat-link .ll-dg-nav-icon svg {
  width: 20px;
  height: 20px;
}
.ll-dg-nav-chat-active {
  background: rgba(255,255,255,0.08);
  font-weight: 600;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-nav-chat-link:hover {
  background: rgba(0,0,0,0.05);
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-nav-chat-active {
  background: rgba(0,0,0,0.07);
}

/* === Sidebar "Tools" section (Market Demand, Economics) — same pattern as Ask === */
.ll-dg-nav-tools { padding: 8px 12px 0; }
.ll-dg-nav-tool-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: background-color .15s ease;
}
.ll-dg-nav-tool-link:hover { background: rgba(255,255,255,0.06); }
.ll-dg-nav-tool-link .ll-dg-nav-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.ll-dg-nav-tool-link .ll-dg-nav-icon svg { width: 20px; height: 20px; }
.ll-dg-nav-tool-active {
  background: rgba(255,255,255,0.08);
  font-weight: 600;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-nav-tool-link:hover {
  background: rgba(0,0,0,0.05);
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-nav-tool-active {
  background: rgba(0,0,0,0.07);
}

/* === Tool iframe views (Market Demand, Economics Calculator) ===
   Mirrors .ll-dg-main-hub / .ll-dg-hub-frame — parent chain needs a definite
   height for the iframe's height:100% to resolve. */
.ll-dg-main-tool {
  height: calc(100dvh - 56px);
  overflow: hidden;
}
.ll-dg-main-tool .ll-dg-main-inner {
  padding: 0;
  max-width: none;
  height: 100%;
}
.ll-dg-tool-wrap {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.ll-dg-tool-wrap .ll-dg-proj-header {
  padding: 6px 20px 4px;
  flex: 0 0 auto;
}
.ll-dg-tool-frame-wrap {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
}
.ll-dg-tool-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  display: block;
}
@media (max-width: 900px) {
  .ll-dg-tool-wrap .ll-dg-proj-header { padding: 4px 14px 2px; }
}

/* === Sidebar Offers section === */
.ll-dg-nav-offers { padding: 0 12px; }
.ll-dg-offers-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 4px 8px;
}
.ll-dg-offer-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border-radius: 10px;
  background: linear-gradient(150deg, rgba(255,140,66,0.10), rgba(255,140,66,0.02));
  border: 1px solid rgba(255,140,66,0.22);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}
.ll-dg-offer-card:hover {
  background: linear-gradient(150deg, rgba(255,140,66,0.18), rgba(255,140,66,0.05));
  border-color: rgba(255,140,66,0.45);
  transform: translateY(-1px);
}
.ll-dg-offer-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.ll-dg-offer-card-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ll-dg-offer-card-price {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  color: #ff8c42;
  background: rgba(255,140,66,0.14);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  letter-spacing: 0.2px;
}
.ll-dg-offer-card-excerpt {
  font-size: 12px;
  line-height: 1.45;
  color: #ccc;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ll-dg-offer-card-cta {
  font-size: 11px;
  font-weight: 600;
  color: #ff8c42;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* === Offer project view === */
.ll-dg-proj-title-wrap {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 14px;
}
.ll-dg-offer-price-badge {
  font-size: 14px;
  font-weight: 700;
  color: #ff8c42;
  background: rgba(255,140,66,0.14);
  border: 1px solid rgba(255,140,66,0.32);
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.2px;
}
.ll-dg-offer-cta-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 20px 22px;
  margin: 24px 0 20px;
  background: linear-gradient(130deg, rgba(255,140,66,0.10), rgba(255,140,66,0.02));
  border: 1px solid rgba(255,140,66,0.28);
  border-radius: 12px;
}
.ll-dg-offer-cta-pricerow {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.ll-dg-offer-cta-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #bbb;
  font-weight: 600;
}
.ll-dg-offer-cta-price {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
}
#ll-dashboard-grid-root .ll-dg-offer-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  padding: 12px 26px;
  border-radius: 999px;
  background: #ff8c42;
  color: #0f0f0f;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.2px;
  transition: background 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
  box-shadow: 0 6px 16px rgba(255,140,66,0.24);
}
#ll-dashboard-grid-root .ll-dg-offer-cta-btn:hover {
  background: #ffa365;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(255,140,66,0.32);
}
#ll-dashboard-grid-root .ll-dg-offer-cta-btn.ll-dg-offer-cta-clicked {
  background: #4caf83;
  color: #fff;
  box-shadow: none;
}
.ll-dg-offer-cta-note {
  font-size: 12px;
  color: #888;
  margin: 0;
}
/* Tone down any [button class="ll-offer-buy-now"] / [class="ll-offer-apply"]
   Divi buttons rendered inside the offer body — the prominent CTA block already
   handles checkout. Scoped to buy-variant only; apply-variant lets the body
   content carry the visual CTA (e.g. Partnership form shortcode).
   Hide wpcomplete shortcode outputs defensively (shouldn't exist on offers,
   but if a160 leaves one we don't render a Mark Complete on sales pages). */
.ll-dg-proj-offer:not(.ll-dg-proj-offer-apply) .ll-offer-buy-now,
.ll-dg-proj-offer:not(.ll-dg-proj-offer-apply) a.ll-offer-buy-now,
.ll-dg-proj-offer:not(.ll-dg-proj-offer-apply) .ll-offer-apply,
.ll-dg-proj-offer:not(.ll-dg-proj-offer-apply) a.ll-offer-apply { display: none; }
.ll-dg-proj-offer .wpc-button,
.ll-dg-proj-offer .wpc-content,
.ll-dg-proj-offer .wpc-nav,
.ll-dg-proj-offer .wpcomplete-checkbox-container { display: none !important; }
.ll-dg-proj-offer .ll-dg-proj-description,
.ll-dg-proj-offer .ll-dg-proj-offer-body {
  max-width: none;
}
.ll-dg-proj-offer .ll-dg-proj-offer-body h3 {
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #cfcfcf;
  margin: 24px 0 8px;
}
.ll-dg-proj-offer .ll-dg-proj-offer-body ul {
  padding-left: 20px;
  margin: 0 0 16px;
}
.ll-dg-proj-offer .ll-dg-proj-offer-body li { margin: 0 0 6px; }
@media (max-width: 700px) {
  .ll-dg-offer-cta-price { font-size: 22px; }
  #ll-dashboard-grid-root .ll-dg-offer-cta-btn { width: 100%; min-width: 0; }
}

/* Light theme overrides for offers */
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-offer-card {
  background: linear-gradient(150deg, rgba(255,140,66,0.08), rgba(255,140,66,0.02));
  border-color: rgba(249,110,47,0.35);
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-offer-card:hover {
  background: linear-gradient(150deg, rgba(255,140,66,0.14), rgba(255,140,66,0.04));
  border-color: rgba(249,110,47,0.55);
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-offer-card-title { color: #0f0f0f; }
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-offer-card-excerpt { color: #505050; }
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-offer-card-price,
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-offer-card-cta,
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-offer-price-badge { color: #c94800; }
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-offer-price-badge {
  background: rgba(249,110,47,0.12);
  border-color: rgba(249,110,47,0.45);
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-offer-cta-block {
  background: linear-gradient(130deg, rgba(249,110,47,0.08), rgba(249,110,47,0.02));
  border-color: rgba(249,110,47,0.38);
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-offer-cta-price { color: #0f0f0f; }
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-offer-cta-eyebrow { color: #505050; }
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-offer-cta-note { color: #606060; }
/* (.ll-dg-rail-tile / -title / -meta light-theme overrides moved into
   primitive's --rail light-theme block. .ll-dg-rail-heading stays — it's
   the rail-list container heading, not a card slot.) */
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-rail-heading { color: #0f0f0f; }

.ll-dg-project-loading {
  padding: 80px 0;
  text-align: center;
  color: #888;
  font-size: 15px;
}
.ll-dg-proj-header {
  margin-bottom: 24px;
}
#ll-dashboard-grid-root .ll-dg-proj-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #bbb;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 18px;
  transition: background 0.15s ease, color 0.15s ease;
}
#ll-dashboard-grid-root .ll-dg-proj-back:hover {
  background: #272727;
  color: #fff;
}
.ll-dg-proj-title-row {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ll-dg-proj-title {
  font-size: 28px;
  font-weight: 700;
  color: #f1f1f1;
  line-height: 1.2;
  margin: 0;
}
.ll-dg-proj-catchips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ll-dg-proj-catchip {
  display: inline-block;
  font-size: 13px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: #ccc;
}
/* .ll-dg-proj-hero kept on the wrapper for layout/spacing only — surface
   (radius/bg/overflow + img sizing/object-fit) owned by .ll-dg-mcard--bare. */
.ll-dg-proj-hero {
  margin: 0 0 24px;
}

/* YT-style layout: hero comes first, title+meta below the hero. The minimal
   backstrip above the hero replaces the old header block's back button; the
   titleblock replaces the old title-row+chips area. Offer variants keep the
   classic title-first header. */
.ll-dg-proj-yt .ll-dg-proj-backstrip {
  margin: 0 0 12px;
}
.ll-dg-proj-yt .ll-dg-proj-hero {
  margin-bottom: 18px;
}
/* (.ll-dg-proj-yt .ll-dg-proj-hero img removed — primitive's __media + img
   slot enforces aspect-ratio + object-fit:cover for all surfaces.) */
/* .ll-dg-proj-titleblock rules removed — JS no longer emits this element
   (May 2 proj-hero migration: title moved into hero overlay slot, chips
   moved to .ll-dg-proj-chipstrip). .ll-dg-proj-title generic rule still
   used by .ll-dg-proj-titlefallback h1 + hub/tool/chat headers. */

/* === proj-hero title overlay (Option A — May 2 ship) ===
   Title moved from titleBlock h1 INTO the hero overlay. Hero now renders
   like a giant --tile (gradient + title-on-image), but bottom-anchored
   left-aligned at page-hero scale rather than centered tile-style. The
   "connected" feel was Chris's ask; the bottom-left treatment keeps it
   reading as "page hero with title stamp" rather than oversized tile.
   Below-hero slot collapses from titleBlock (h1+chips) to chipstrip
   (chips + optional price-badge inline-right). */
.ll-dg-proj-hero {
  --ll-mcard-title-size: 32px;
  --ll-mcard-title-weight: 800;
  --ll-mcard-title-lines: 3;
  --ll-mcard-overlay-pad: 24px;
}
@media (max-width: 640px) {
  .ll-dg-proj-hero {
    --ll-mcard-title-size: 24px;
    --ll-mcard-overlay-pad: 16px;
  }
}

/* Chip strip — replaces titleBlock below the hero. Chips left, price-badge
   (offer variants only) right. Wraps on narrow widths. */
.ll-dg-proj-chipstrip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 24px;
  flex-wrap: wrap;
}

/* No-thumb fallback — when a project has no hero image, render h1 as a
   page heading directly (matches old titleBlock h1 sizing). Also used by
   the normalization-error path so error pages still have a clean h1. */
.ll-dg-proj-titlefallback {
  margin: 0 0 24px;
}
.ll-dg-proj-titlefallback .ll-dg-proj-title {
  font-size: 30px;
  font-weight: 700;
  color: #f1f1f1;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
}
@media (max-width: 640px) {
  .ll-dg-proj-titlefallback .ll-dg-proj-title { font-size: 24px; }
}
/* Cap the reading column for prose (summary + description) and center it.
   Hero, iframes, downloads stay full-width on the outer column. */
.ll-dg-proj-summary {
  font-size: 17px;
  line-height: 1.55;
  color: #e6e6e6;
  margin: 0 auto 28px;
  max-width: 760px;
}
.ll-dg-proj-description {
  font-size: 15px;
  line-height: 1.7;
  color: #e6e6e6;
  margin: 0 auto 32px;
  max-width: 760px;
}
.ll-dg-proj-description p { margin: 0 0 18px; }
.ll-dg-proj-description p:last-child { margin-bottom: 0; }
.ll-dg-proj-description h1,
.ll-dg-proj-description h2,
.ll-dg-proj-description h3,
.ll-dg-proj-description h4 {
  font-weight: 600;
  color: #f1f1f1;
  line-height: 1.3;
  letter-spacing: 0.2px;
  margin: 28px 0 12px;
}
.ll-dg-proj-description h1 { font-size: 22px; }
.ll-dg-proj-description h2 { font-size: 20px; }
.ll-dg-proj-description h3 { font-size: 18px; }
.ll-dg-proj-description h4 { font-size: 16px; text-transform: uppercase; letter-spacing: 0.5px; color: #cfcfcf; }
.ll-dg-proj-description > :first-child { margin-top: 0; }
.ll-dg-proj-description ul,
.ll-dg-proj-description ol {
  margin: 0 0 18px;
  padding-left: 22px;
}
.ll-dg-proj-description li { margin: 0 0 6px; }
.ll-dg-proj-description li:last-child { margin-bottom: 0; }
.ll-dg-proj-description blockquote {
  margin: 0 0 18px;
  padding: 10px 16px;
  border-left: 3px solid #ff8c42;
  background: rgba(255,255,255,0.04);
  color: #e0e0e0;
  font-style: italic;
  border-radius: 0 6px 6px 0;
}
.ll-dg-proj-description blockquote p:last-child { margin-bottom: 0; }
.ll-dg-proj-description strong { color: #fff; font-weight: 600; }
.ll-dg-proj-description em { color: #e6e6e6; }
.ll-dg-proj-description a {
  color: #ff8c42;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}
.ll-dg-proj-description a:hover { color: #ffb073; }
.ll-dg-proj-description img { max-width: 100%; height: auto; border-radius: 8px; margin: 8px 0; }
.ll-dg-proj-section {
  margin: 32px 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.ll-dg-proj-section h3 {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 16px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.ll-dg-proj-video,
.ll-dg-proj-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  margin-bottom: 12px;
}
.ll-dg-proj-video iframe,
.ll-dg-proj-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.ll-dg-proj-embed-label {
  font-size: 14px;
  color: #bbb;
  margin: 16px 0 8px;
}
.ll-dg-proj-audio {
  padding: 12px 16px;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  color: #ccc;
  font-size: 14px;
  margin-bottom: 8px;
}
.ll-dg-proj-resource {
  display: flex;
  gap: 16px;
  padding: 14px;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  margin-bottom: 10px;
}
.ll-dg-proj-resource img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}
.ll-dg-proj-res-text h4 {
  font-size: 15px;
  color: #fff;
  margin: 0 0 6px;
}
.ll-dg-proj-res-body {
  font-size: 14px;
  color: #bbb;
  line-height: 1.5;
}
.ll-dg-proj-res-link {
  display: inline-block;
  color: #61b5ff;
  margin-top: 8px;
  font-size: 14px;
}
.ll-dg-proj-downloads {
  list-style: none;
  padding: 0;
  margin: 0;
}
.ll-dg-proj-downloads li {
  padding: 10px 14px;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  margin-bottom: 6px;
  font-size: 14px;
}
.ll-dg-proj-downloads a { color: #61b5ff; }
.ll-dg-proj-gated { color: #999; font-size: 12px; }
.ll-dg-proj-faq {
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 6px;
}
.ll-dg-proj-faq summary {
  cursor: pointer;
  font-weight: 500;
  color: #fff;
  font-size: 14px;
}
.ll-dg-proj-faq div {
  margin-top: 10px;
  color: #ccc;
  font-size: 14px;
  line-height: 1.55;
}
/* Missing-normalization error panel. Should never render post-April-2026. */
.ll-dg-proj-error {
  padding: 16px 18px;
  background: rgba(255,80,80,0.10);
  border: 1px solid rgba(255,80,80,0.35);
  color: #ff8a8a;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 16px;
}
.ll-dg-proj-error strong { display: block; margin-bottom: 4px; }
@media (max-width: 700px) {
  .ll-dg-main-project .ll-dg-main-inner { padding: 16px 16px 60px; }
  .ll-dg-proj-title { font-size: 22px; }
  .ll-dg-proj-resource { flex-direction: column; }
  .ll-dg-proj-resource img { width: 100%; height: auto; }
}

/* ===========================================================
 * LIGHT THEME — activated when root has data-theme="light".
 * Targets the main surfaces only. Leaves brand orange alone.
 * =========================================================== */
#ll-dashboard-grid-root[data-theme="light"] {
  color: #0f0f0f;
  background: #f9f9f9;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-topbar {
  background: #ffffff;
  border-bottom: 1px solid #e5e5e5;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-brand-text {
  color: #0f0f0f;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-search {
  background: #fff;
  border: 1px solid #b5b5b5;
  color: #0f0f0f;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-search::placeholder {
  color: #717171;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-search:focus {
  border-color: #ff8c42;
  box-shadow: inset 0 0 0 1px #ff8c42;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-search-btn {
  background: #f4f4f4;
  border: 1px solid #b5b5b5;
  border-left: 1px solid #b5b5b5;
  color: #606060;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-admin-badge {
  background: rgba(249,110,47,0.12);
  color: #c94800;
  border: 1px solid rgba(249,110,47,0.35);
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-hamburger {
  /* Re-declare gradient so we don't clobber background-image with `background:` */
  background-image: linear-gradient(#0f0f0f, #0f0f0f);
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-hamburger::before,
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-hamburger::after {
  background: #0f0f0f;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-icon-btn:hover {
  background: rgba(0,0,0,0.06);
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-sidebar {
  background: #f9f9f9;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-nav-item {
  color: #0f0f0f;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-nav-item:hover {
  background: rgba(0,0,0,0.06);
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-nav-active {
  background: #e5e5e5;
  color: #0f0f0f;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-nav-heading {
  color: #606060;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-nav-divider {
  background: #e5e5e5;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-nav-fineprint {
  color: #505050;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-nav-footlink {
  color: #606060;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-nav-footlink:hover {
  color: #0f0f0f;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-nav-copyright {
  color: #808080;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-nav-icon {
  color: #606060;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-nav-active .ll-dg-nav-icon {
  color: #ff8c42;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-chip-strip-wrap {
  background: #f9f9f9;
  border-bottom: 1px solid #e5e5e5;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-chip-strip-wrap::after {
  background: linear-gradient(to right, rgba(249,249,249,0), #f9f9f9 85%);
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-chip {
  background: #f2f2f2;
  color: #0f0f0f;
  border: 1px solid transparent;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-chip:hover {
  background: #e5e5e5;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-chip-active {
  background: #0f0f0f;
  color: #fff;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-chip-divider {
  background: #d0d0d0;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-row-title,
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-section-title {
  color: #0f0f0f;
}
/* .ll-dg-mcard__title stays white in both themes — it sits on the gradient
 * overlay over the image, not under it. .ll-dg-tile-meta / -excerpt / .ll-dg-
 * thumb-wrap light-theme overrides moved into primitive's --tile light theme. */
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-section-count {
  color: #606060;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-empty {
  color: #606060;
}
/* Project view overrides */
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-proj-title,
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-proj-section h3,
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-proj-faq summary,
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-proj-res-text h4 {
  color: #0f0f0f;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-proj-summary {
  color: #191919;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-proj-description {
  color: #303030;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-proj-description h1,
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-proj-description h2,
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-proj-description h3 {
  color: #0f0f0f;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-proj-description h4 {
  color: #3a3a3a;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-proj-description strong {
  color: #0f0f0f;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-proj-description blockquote {
  background: rgba(0,0,0,0.04);
  color: #1f1f1f;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-proj-description a {
  color: #c24d00;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-proj-description a:hover {
  color: #8a3400;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-proj-section {
  border-top-color: #e5e5e5;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-proj-catchip {
  background: #f2f2f2;
  color: #0f0f0f;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-proj-back {
  color: #606060;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-proj-back:hover {
  background: rgba(0,0,0,0.06);
  color: #0f0f0f;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-proj-resource,
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-proj-downloads li,
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-proj-faq,
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-proj-audio {
  background: #f2f2f2;
  color: #0f0f0f;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-proj-res-body,
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-proj-faq div {
  color: #303030;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-proj-downloads a,
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-proj-res-link {
  color: #1663d1;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-proj-gated {
  color: #717171;
}
/* (.ll-dg-proj-hero light-theme bg moved into primitive's --bare light theme.) */
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-proj-error {
  background: rgba(200,30,30,0.08);
  border-color: rgba(200,30,30,0.3);
  color: #a02020;
}

/* Theme toggle button */
.ll-dg-theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #f1f1f1;
  transition: background 0.15s;
}
.ll-dg-theme-toggle:hover { background: rgba(255,255,255,0.1); }
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-theme-toggle { color: #0f0f0f; }
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-theme-toggle:hover { background: rgba(0,0,0,0.06); }

/* === Admin POV dropdown (topbar) === */
/* Matches search-bar aesthetic: pill shape, dark bg, accent focus.
   Admin-only; rendered inline between search and theme toggle. */
#ll-dashboard-grid-root .ll-dg-pov {
  height: 40px;
  background: #121212;
  border: 1px solid #3f3f3f;
  color: #fff;
  padding: 0 36px 0 14px;
  font-size: 13px;
  border-radius: 20px;
  cursor: pointer;
  max-width: 200px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  /* Native caret (replaces default arrow) to stay consistent with pill shape */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none' stroke='%23bbb' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='1 1 5 5 9 1'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
#ll-dashboard-grid-root .ll-dg-pov:hover { background-color: #181818; }
#ll-dashboard-grid-root .ll-dg-pov:focus {
  border-color: #ff8c42;
  box-shadow: inset 0 0 0 1px #ff8c42;
  background-color: #181818;
}
#ll-dashboard-grid-root .ll-dg-pov option {
  background: #1a1a1a;
  color: #fff;
}
#ll-dashboard-grid-root .ll-dg-pov option:disabled {
  color: #777;
  font-style: italic;
}
#ll-dashboard-grid-root .ll-dg-pov optgroup {
  background: #121212;
  color: #9a9a9a;
  font-style: normal;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
/* Light-theme variant */
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-pov {
  background-color: #f5f5f5;
  border-color: #d0d0d0;
  color: #0f0f0f;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none' stroke='%23666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='1 1 5 5 9 1'/%3E%3C/svg%3E");
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-pov:hover { background-color: #eaeaea; }
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-pov:focus {
  border-color: #ff8c42;
  box-shadow: inset 0 0 0 1px #ff8c42;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-pov option {
  background: #fff;
  color: #0f0f0f;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-pov optgroup {
  background: #f5f5f5;
  color: #555;
}
@media (max-width: 900px) {
  #ll-dashboard-grid-root .ll-dg-pov { max-width: 150px; font-size: 12px; }
}
@media (max-width: 640px) {
  #ll-dashboard-grid-root .ll-dg-pov { display: none; }
}

/* === Chat launcher CTA (Timeline Jumping, Vision Clarity, etc.) ===
   Lives inside _ll_normalized.description for project pages whose primary
   tool is a chatbot. Click routes to #chat?bot=<type> — full-viewport chat
   view. No inline iframe = no p-wrap / normalizer class of bugs. */
.ll-chat-launcher {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 24px;
  margin: 24px 0;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(0,113,64,0.10), rgba(0,113,64,0.04));
  border: 1px solid rgba(0,113,64,0.25);
}
.ll-chat-launcher__title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: inherit;
  line-height: 1.3;
}
.ll-chat-launcher__blurb {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: inherit;
  opacity: 0.85;
}
.ll-chat-launcher__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  background: #007140;
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
  box-shadow: 0 4px 12px rgba(0,113,64,0.25);
}
.ll-chat-launcher__btn:hover {
  background: #008a4e;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,113,64,0.32);
  color: #fff;
  text-decoration: none;
}
.ll-chat-launcher__btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0,113,64,0.25);
}
.ll-chat-launcher__btn::after {
  content: "→";
  font-weight: 700;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-chat-launcher {
  background: linear-gradient(135deg, rgba(0,113,64,0.08), rgba(0,113,64,0.02));
}

/* ============================================================================
   === Card primitive (.ll-dg-mcard) — ADDITIVE, no markup uses this yet ===
   ============================================================================
   Phase 0 of card-unification (a215 May 2). Defines a shared media-card
   primitive so future migrations (Phase 1+) can collapse .ll-dg-tile,
   .ll-dg-hero-card, .ll-dg-rail-tile, .ll-dg-proj-hero into one source of
   truth. Defaults seeded from a149's just-shipped tile-title pass
   (22px/800/centered + gradient 0.6/0.65/0.25 + double-drop text-shadow).

   Variants:
     .ll-dg-mcard--tile          grid tiles (defaults are tuned for this)
     .ll-dg-mcard--hero          landing featured (bigger title, less lift)
     .ll-dg-mcard--hero-secondary  secondary hero cells
     .ll-dg-mcard--rail          up-next rail (image LEFT, title beside)
     .ll-dg-mcard--bare          framed image only (no overlay, no hover)

   To rename "card" globally: change one variable in this block.
   To make all card titles bigger: edit --ll-mcard-title-size.
   To slow hover lift: edit one transition duration line. */
.ll-dg-mcard {
  --ll-mcard-radius: 12px;
  --ll-mcard-ratio: 16/9;
  --ll-mcard-bg: #181818;
  --ll-mcard-lift: -6px;
  --ll-mcard-title-size: 22px;
  --ll-mcard-title-weight: 800;
  --ll-mcard-title-lines: 2;
  --ll-mcard-title-track: -0.015em;
  --ll-mcard-overlay-pad: 16px 18px;
  --ll-mcard-overlay-justify: center;
  --ll-mcard-overlay-grad-bottom: 0.20;
  --ll-mcard-overlay-grad-mid: 0.25;
  --ll-mcard-overlay-grad-top: 0.05;
  position: relative;
  display: block;
  cursor: pointer;
  /* radius/overflow/bg moved to __media (May 3 Step 3).
     transition + will-change removed Step 5 — Chris wants zero motion on hover.
     Hover affordance lives in .not(--bare) block below as bg-color crossfade only. */
}
.ll-dg-mcard__media {
  position: relative;
  aspect-ratio: var(--ll-mcard-ratio);
  overflow: hidden;
  background: var(--ll-mcard-bg);
  border-radius: var(--ll-mcard-radius);
  transition: box-shadow 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
  container-type: inline-size;
}
.ll-dg-mcard__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ll-dg-mcard__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0, var(--ll-mcard-overlay-grad-bottom)) 0%,
    rgba(0,0,0, var(--ll-mcard-overlay-grad-mid)) 50%,
    rgba(0,0,0, var(--ll-mcard-overlay-grad-top)) 100%
  );
  padding: clamp(8px, 4cqi, 28px) clamp(10px, 5cqi, 32px);
  display: flex;
  flex-direction: column;
  justify-content: var(--ll-mcard-overlay-justify);
  pointer-events: none;
}
.ll-dg-mcard__title {
  font-size: clamp(11px, 6cqi, 36px);
  font-weight: var(--ll-mcard-title-weight);
  letter-spacing: var(--ll-mcard-title-track);
  line-height: 1.2;
  color: #fff;
  text-align: center;
  text-wrap: balance;
  text-shadow: 0 1px 3px rgba(0,0,0,0.55), 0 0 12px rgba(0,0,0,0.3);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: var(--ll-mcard-title-lines);
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ll-dg-mcard__eyebrow {
  font-size: 11px;
  color: #ff8c42;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
  font-weight: 600;
}
.ll-dg-mcard__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ll-dg-mcard__meta {
  font-size: 12px;
  color: #aaa;
  font-weight: 400;
}

/* Shared hover affordance — applies to clickable variants only.
   --bare opts out (it's a static framed image). */
.ll-dg-mcard:not(.ll-dg-mcard--bare) {
  /* Step 5 (May 3 PM) — Chris bounced Step 4: "cards are still animated".
     ALL motion killed: no lift, no scale, no soft halo. Hover affordance is a
     per-tile accent-color crossfade on the card surface PLUS a 5px solid accent
     outset (Step 6, Chris in-pane) — frame extends past image edge YT-style. */
  border-radius: var(--ll-mcard-radius);
  transition:
    background-color 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
    box-shadow 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.ll-dg-mcard:not(.ll-dg-mcard--bare) .ll-dg-mcard__overlay {
  transition: background 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.ll-dg-mcard:not(.ll-dg-mcard--bare):hover {
  background-color: color-mix(in srgb, var(--ll-mcard-accent, #ff8c42) 42%, transparent);
  box-shadow: 0 0 0 10px color-mix(in srgb, var(--ll-mcard-accent, #ff8c42) 42%, transparent);
  z-index: 1;
}
.ll-dg-mcard:not(.ll-dg-mcard--bare):hover .ll-dg-mcard__overlay {
  background: linear-gradient(
    to top,
    rgba(0,0,0, calc(var(--ll-mcard-overlay-grad-bottom) + 0.1)) 0%,
    rgba(0,0,0, calc(var(--ll-mcard-overlay-grad-mid) + 0.1)) 50%,
    rgba(0,0,0, calc(var(--ll-mcard-overlay-grad-top) + 0.05)) 100%
  );
}


/* === Variants === */

/* Tile — defaults are the variant. Empty block kept for discoverability. */
.ll-dg-mcard--tile { /* see :root defaults */ }

/* Hero — landing featured. Bigger title, gentler lift, eyebrow at bottom. */
.ll-dg-mcard--hero {
  --ll-mcard-title-size: 28px;
  --ll-mcard-overlay-pad: 24px;
  --ll-mcard-overlay-justify: flex-end;
  --ll-mcard-lift: -2px;
}
.ll-dg-mcard--hero .ll-dg-mcard__title {
  text-align: left;
}

/* Hero secondary — smaller cells in the split. */
.ll-dg-mcard--hero-secondary {
  --ll-mcard-title-size: 16px;
  --ll-mcard-title-weight: 600;
  --ll-mcard-overlay-pad: 16px;
  --ll-mcard-overlay-justify: flex-end;
  --ll-mcard-lift: -2px;
}
.ll-dg-mcard--hero-secondary .ll-dg-mcard__title {
  text-align: left;
}

/* Rail — small vertical tile with title-on-image overlay (matches --tile
   look, compact sizing). Was image-LEFT grid; redesigned May 2 for
   "connected" feel across all card surfaces — Chris flagged inconsistency
   between main-grid tiles (title-on-image) and rail tiles (title-beside).
   Container .ll-dg-rail-list already stacks vertical / 2-col / 1-col at
   breakpoints, so internal grid is no longer needed. */
.ll-dg-mcard--rail {
  --ll-mcard-radius: 8px;
  --ll-mcard-title-size: 14px;
  --ll-mcard-title-weight: 800;
  --ll-mcard-title-lines: 2;
  --ll-mcard-overlay-pad: 10px 12px;
  --ll-mcard-lift: -2px;
}
.ll-dg-mcard--rail .ll-dg-mcard__body {
  padding: 6px 4px 0;
}
.ll-dg-mcard--rail .ll-dg-mcard__meta {
  font-size: 11px;
}

/* Bare — framed image only (subpage hero). No overlay, no hover, not
   clickable. Inherits the radius + bg + ratio. */
.ll-dg-mcard--bare {
  cursor: default;
}

/* Light theme — rail title is now white-on-gradient (overlay carries
   contrast in both themes). Only meta needs a flip since it sits below
   the image on solid bg. */
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-mcard--rail .ll-dg-mcard__meta {
  color: #606060;
}

/* === Phase 2 (May 2) — additions absorbed during legacy CSS cleanup ===
   These slots/overrides moved INTO the primitive when their old per-class
   homes (.ll-dg-tile-*, .ll-dg-rail-tile, .ll-dg-proj-hero) were deleted.
   Keeping them inside the primitive block so the "edit one place" promise
   still holds. */

/* __excerpt slot — used by --tile (a149's tileHtml emits it under __body). */
.ll-dg-mcard__excerpt {
  font-size: 14px;
  line-height: 1.45;
  color: #fff;
  margin: 2px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --tile body padding (lifted from old .ll-dg-tile-body). Other variants
   don't need this — rail body is grid-laid, hero/bare don't render __body. */
.ll-dg-mcard--tile .ll-dg-mcard__body {
  padding: 10px 4px 4px;
}

/* --rail badge positioning (lifted from old .ll-dg-rail-tile .ll-dg-badge).
   Rail thumb is smaller, so the badge needs a tighter inset + smaller type. */
.ll-dg-mcard--rail .ll-dg-badge {
  top: 4px;
  right: 4px;
  font-size: 9px;
  padding: 2px 6px;
}

/* Light theme — slots that didn't exist in Phase 0 + --bare (proj-hero) bg. */
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-mcard__meta {
  color: #606060;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-mcard__excerpt {
  color: #0f0f0f;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-mcard--tile .ll-dg-mcard__media,
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-mcard--bare .ll-dg-mcard__media {
  background: #e5e5e5;
}

/* End card primitive (.ll-dg-mcard) — Phase 0 + Phase 2 cleanup absorptions */
/* === User dropdown (avatar trigger + menu panel) === */
/* Owner: a231. Composes with topbar; lives outside .ll-dg-mcard primitive (a215).
   Selector hooks emitted by a149's dashboard-grid.js buildAvatarTrigger() +
   buildUserDropdown() — DO NOT diverge from those names without coord. */

/* --- Avatar trigger --- */
.ll-dg-avatar-trigger {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  padding: 0;
  border: 1px solid transparent;
  background: #2a2a2a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.ll-dg-avatar-trigger:hover { background: #383838; }
.ll-dg-avatar-trigger:focus-visible {
  outline: none;
  border-color: #ff8c42;
  box-shadow: 0 0 0 2px rgba(255,140,66,0.25);
}
.ll-dg-avatar-trigger.is-open {
  border-color: rgba(255,140,66,0.55);
  background: #383838;
}
.ll-dg-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
}
.ll-dg-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ll-dg-avatar-fallback {
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
}

/* --- Menu panel --- */
.ll-dg-user-menu {
  position: absolute;
  top: 56px;
  right: 16px;
  width: 300px;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  background: #1a1a1a;
  border: 1px solid #3f3f3f;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.03);
  color: #f1f1f1;
  z-index: 200;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.12s ease, transform 0.12s ease;
}
.ll-dg-user-menu.is-open,
.ll-dg-user-menu[data-open="1"] {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* --- Identity block --- */
.ll-dg-um-identity {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid #3f3f3f;
}
.ll-dg-um-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #2a2a2a;
}
.ll-dg-um-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ll-dg-um-avatar-fallback {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}
.ll-dg-um-id-text {
  min-width: 0;
  flex: 1;
}
.ll-dg-um-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
  min-width: 0;
}
.ll-dg-um-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ll-dg-um-chip {
  /* Mirrors .ll-dg-admin-badge tokens for consistency */
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #ff8c42;
  border: 1px solid rgba(255,140,66,0.35);
  padding: 2px 7px;
  border-radius: 10px;
  flex-shrink: 0;
}
.ll-dg-um-email {
  font-size: 12px;
  color: #9a9a9a;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ll-dg-um-tier {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #d0d0d0;
  margin-top: 6px;
}
/* Per-tier accent — subtle text-color shift only, no chip background */
.ll-dg-um-tier-admin       { color: #ff8c42; }
.ll-dg-um-tier-partnership { color: #f0c040; }
.ll-dg-um-tier-accelerator { color: #4fc3f7; }
.ll-dg-um-tier-rapid       { color: #66bb6a; }
.ll-dg-um-tier-member      { color: #d0d0d0; }
.ll-dg-um-tier-guest       { color: #777; }

/* --- Sections --- */
.ll-dg-um-section {
  padding: 6px 0;
  border-bottom: 1px solid #3f3f3f;
}
.ll-dg-um-section:last-child,
.ll-dg-um-section-signout {
  border-bottom: none;
}
.ll-dg-um-section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #9a9a9a;
  padding: 8px 16px 4px;
}
.ll-dg-um-section-offers .ll-dg-um-row-icon { color: #ff8c42; }

/* --- Rows --- */
.ll-dg-um-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 16px;
  background: transparent;
  border: none;
  color: #f1f1f1;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.ll-dg-um-row:hover,
.ll-dg-um-row:focus-visible {
  background: rgba(255,255,255,0.06);
  color: #fff;
  outline: none;
}
.ll-dg-um-row:focus-visible {
  box-shadow: inset 2px 0 0 #ff8c42;
}
.ll-dg-um-row-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #c0c0c0;
}
.ll-dg-um-row-icon svg {
  width: 18px;
  height: 18px;
}
.ll-dg-um-row:hover .ll-dg-um-row-icon { color: #fff; }
.ll-dg-um-row-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ll-dg-um-row-meta {
  font-size: 16px;
  color: #9a9a9a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ll-dg-um-row-meta svg {
  width: 14px;
  height: 14px;
}
.ll-dg-um-row:hover .ll-dg-um-row-meta { color: #c0c0c0; }
.ll-dg-um-row-signout:hover {
  background: rgba(244,67,54,0.12);
  color: #ff7a6b;
}
.ll-dg-um-row-signout:hover .ll-dg-um-row-icon { color: #ff7a6b; }

/* --- Light theme --- */
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-avatar-trigger {
  background: #ececec;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-avatar-trigger:hover { background: #dcdcdc; }
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-avatar-trigger.is-open {
  background: #dcdcdc;
  border-color: rgba(255,140,66,0.55);
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-avatar-fallback { color: #0f0f0f; }

#ll-dashboard-grid-root[data-theme="light"] .ll-dg-user-menu {
  background: #ffffff;
  border-color: #d0d0d0;
  color: #0f0f0f;
  box-shadow: 0 12px 32px rgba(0,0,0,0.18), 0 0 0 1px rgba(0,0,0,0.04);
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-um-identity { border-bottom-color: #e5e5e5; }
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-um-avatar { background: #ececec; }
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-um-avatar-fallback { color: #0f0f0f; }
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-um-name { color: #0f0f0f; }
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-um-chip {
  color: #c94800;
  background: rgba(249,110,47,0.12);
  border-color: rgba(249,110,47,0.35);
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-um-email { color: #606060; }
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-um-tier { color: #404040; }
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-um-tier-admin       { color: #c94800; }
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-um-tier-partnership { color: #b08a00; }
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-um-tier-accelerator { color: #0277bd; }
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-um-tier-rapid       { color: #2e7d32; }
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-um-tier-member      { color: #404040; }
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-um-tier-guest       { color: #707070; }
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-um-section { border-bottom-color: #e5e5e5; }
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-um-section-label { color: #606060; }
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-um-row { color: #0f0f0f; }
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-um-row:hover,
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-um-row:focus-visible {
  background: rgba(0,0,0,0.05);
  color: #0f0f0f;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-um-row-icon { color: #606060; }
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-um-row:hover .ll-dg-um-row-icon { color: #0f0f0f; }
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-um-row-meta { color: #707070; }
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-um-row-signout:hover {
  background: rgba(217,48,37,0.10);
  color: #c5221f;
}
#ll-dashboard-grid-root[data-theme="light"] .ll-dg-um-row-signout:hover .ll-dg-um-row-icon { color: #c5221f; }

/* --- Mobile (panel near edges, top anchor preserved) --- */
@media (max-width: 640px) {
  .ll-dg-user-menu {
    right: 8px;
    left: 8px;
    width: auto;
    max-width: 360px;
    margin-left: auto;
  }
  .ll-dg-um-row { padding: 12px 16px; }
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  .ll-dg-user-menu { transition: opacity 0.12s ease; transform: none !important; }
}

/* End user dropdown — owner: a231 */

/* === a231 phase-2 polish (2026-05-03, owner: a231) === */
/* Three visible-broken fixes greenlit by a63 11:01 UTC.
   Anchor-safe: this block is appended at EOF after the prior owner-marker. */

/* --- Fix #1: trigger .is-open border in spec orange ---
   Lens + a232 both reported computed border rgb(241,241,241) (white-grey)
   instead of rgba(255,140,66,0.55). Bump specificity with body+ID prefix
   to defeat whatever inherits currentColor onto the border. */
body #ll-dashboard-grid-root .ll-dg-avatar-trigger.is-open {
  border-color: rgba(255,140,66,0.55);
  background: #383838;
}
body:has(#ll-dashboard-grid-root[data-theme="light"]) .ll-dg-avatar-trigger.is-open {
  border-color: rgba(255,140,66,0.55);
  background: #dcdcdc;
}

/* --- Fix #3: light-theme dropdown panel ---
   Pre-existing live CSS uses body:has(#root[data-theme="light"]) pattern at line 44
   for body bg — proven to work in this codebase. Switching to that pattern in case
   the panel renders outside grid root scope (portal, late-mount) or loses cascade
   to a higher-specificity dark rule. */
body:has(#ll-dashboard-grid-root[data-theme="light"]) .ll-dg-user-menu {
  background: #ffffff;
  border-color: #d0d0d0;
  color: #0f0f0f;
  box-shadow: 0 12px 32px rgba(0,0,0,0.18), 0 0 0 1px rgba(0,0,0,0.04);
}
body:has(#ll-dashboard-grid-root[data-theme="light"]) .ll-dg-um-identity { border-bottom-color: #e5e5e5; }
body:has(#ll-dashboard-grid-root[data-theme="light"]) .ll-dg-um-avatar { background: #ececec; }
body:has(#ll-dashboard-grid-root[data-theme="light"]) .ll-dg-um-avatar-fallback { color: #0f0f0f; }
body:has(#ll-dashboard-grid-root[data-theme="light"]) .ll-dg-um-name { color: #0f0f0f; }
body:has(#ll-dashboard-grid-root[data-theme="light"]) .ll-dg-um-chip {
  color: #c94800;
  background: rgba(249,110,47,0.12);
  border-color: rgba(249,110,47,0.35);
}
body:has(#ll-dashboard-grid-root[data-theme="light"]) .ll-dg-um-email { color: #606060; }
body:has(#ll-dashboard-grid-root[data-theme="light"]) .ll-dg-um-tier { color: #404040; }
body:has(#ll-dashboard-grid-root[data-theme="light"]) .ll-dg-um-tier-admin       { color: #c94800; }
body:has(#ll-dashboard-grid-root[data-theme="light"]) .ll-dg-um-tier-partnership { color: #b08a00; }
body:has(#ll-dashboard-grid-root[data-theme="light"]) .ll-dg-um-tier-accelerator { color: #0277bd; }
body:has(#ll-dashboard-grid-root[data-theme="light"]) .ll-dg-um-tier-rapid       { color: #2e7d32; }
body:has(#ll-dashboard-grid-root[data-theme="light"]) .ll-dg-um-tier-member      { color: #404040; }
body:has(#ll-dashboard-grid-root[data-theme="light"]) .ll-dg-um-tier-guest       { color: #707070; }
body:has(#ll-dashboard-grid-root[data-theme="light"]) .ll-dg-um-section { border-bottom-color: #e5e5e5; }
body:has(#ll-dashboard-grid-root[data-theme="light"]) .ll-dg-um-section-label { color: #606060; }
body:has(#ll-dashboard-grid-root[data-theme="light"]) .ll-dg-um-row { color: #0f0f0f; }
body:has(#ll-dashboard-grid-root[data-theme="light"]) .ll-dg-um-row:hover,
body:has(#ll-dashboard-grid-root[data-theme="light"]) .ll-dg-um-row:focus-visible {
  background: rgba(0,0,0,0.05);
  color: #0f0f0f;
}
body:has(#ll-dashboard-grid-root[data-theme="light"]) .ll-dg-um-row-icon { color: #606060; }
body:has(#ll-dashboard-grid-root[data-theme="light"]) .ll-dg-um-row:hover .ll-dg-um-row-icon { color: #0f0f0f; }
body:has(#ll-dashboard-grid-root[data-theme="light"]) .ll-dg-um-row-meta { color: #707070; }
body:has(#ll-dashboard-grid-root[data-theme="light"]) .ll-dg-um-row-signout:hover {
  background: rgba(217,48,37,0.10);
  color: #c5221f;
}
body:has(#ll-dashboard-grid-root[data-theme="light"]) .ll-dg-um-row-signout:hover .ll-dg-um-row-icon { color: #c5221f; }

/* End a231 phase-2 polish */

/* === a231 phase-2.5 polish (2026-05-03, owner: a231) === */
/* RE-SHIP after stomp regression. Original 11:34 UTC ship stripped during a downstream
   CSS update that pulled stale source. Anchor-based replay restores phase-2.5 verbatim.
   Fix #1 follow-up: phase-2 used border-color longhand, but the button reset at line 84
   (`#ll-dashboard-grid-root button { border: none; }`, specificity 0,1,0,1) clobbers
   border-width and border-style. My .is-open rule wins on color but the longhands stay
   0/none — orange invisible. Switch to `border:` shorthand to set all 3 longhands. */
body #ll-dashboard-grid-root .ll-dg-avatar-trigger.is-open {
  border: 1px solid rgba(255,140,66,0.55);
  background: #383838;
}
body:has(#ll-dashboard-grid-root[data-theme="light"]) .ll-dg-avatar-trigger.is-open {
  border: 1px solid rgba(255,140,66,0.55);
  background: #dcdcdc;
}
/* End a231 phase-2.5 border fix */

/* === a231 phase-3 polish (2026-05-03, owner: a231) === */
/* Theme-toggle row uses <button> markup (semantically correct: it's a state-toggle
   action, not navigation). The `#ll-dashboard-grid-root button { padding: 0; }` reset
   at line 84 (specificity 0,1,0,1) beats .ll-dg-um-row's (0,1,0) on padding. Result:
   theme row's icon sits at left edge while all anchor rows are inset 16px → visible
   left-margin mismatch. Same cascade-defeat pattern as phase-2.5. Fix: bump specificity
   to (0,1,2,1) via body+ID prefix. Mirror the mobile media query. */
body #ll-dashboard-grid-root .ll-dg-um-row { padding: 10px 16px; }
@media (max-width: 640px) {
  body #ll-dashboard-grid-root .ll-dg-um-row { padding: 12px 16px; }
}
/* End a231 phase-3 row padding */

/* === a229 hub composition — hide Continue Learning shelf (Chris asked 2026-05-03) ===
   JS still emits the section; we hide it at the layout level. Remove this rule
   to bring it back. Permanent removal would route to a149 for JS cleanup. */
#ll-dg-row-continue { display: none; }
