/* Audio leads native workspace view (#audioLeadsPage) matching #aiVis / #aiPlan inside #workspaceFrames. */
html[data-audio-leads-open] #glance{
  display:none!important;
}
html[data-audio-leads-open].has-glance #workspaceFrames{
  margin-right:0!important;
}
html[data-audio-leads-open] #workspaceFrames{
  position:relative;
}
#audioLeadsPage{
  position:absolute;
  inset:0;
  z-index:19;
  display:flex;
  flex-direction:column;
  background:var(--bg,#000);
  color:var(--ink,#fafafa);
  overflow-y:auto;
  overflow-x:hidden;
  font-family:inherit;
  box-sizing:border-box;
  animation:al-in .2s cubic-bezier(.23,1,.32,1);
}
@media (min-width:861px){
  html body #workspaceFrames>#audioLeadsPage{
    position:fixed;
    top:var(--bar-h,64px);
    left:72px;
    right:0;
    bottom:0;
    inset:var(--bar-h,64px) 0 0 72px;
    width:auto;
    height:auto;
    z-index:20;
  }
}
#audioLeadsPage[hidden]{
  display:none!important;
}
@keyframes al-in{from{opacity:0;transform:translateY(4px)}}
#audioLeadsPage .al-vhead{
  position:sticky;
  top:0;
  z-index:4;
  background:var(--bg,#000);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px 16px;
  flex-wrap:wrap;
  width:100%;
  max-width:1100px;
  margin:0 auto;
  padding:16px 20px;
  border-bottom:1px solid var(--line,#1f1f1f);
  box-sizing:border-box;
}
#audioLeadsPage .al-vhead-title{
  min-width:0;
}
#audioLeadsPage .al-vhead-title h1{
  margin:0;
  font-size:20px;
  font-weight:800;
  letter-spacing:-.02em;
  line-height:1.2;
}
#audioLeadsPage .al-vhead-title p{
  margin:3px 0 0;
  font-size:12.5px;
  line-height:1.4;
  color:var(--muted,#8b8b8b);
}
.al-head-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.al-sheet-pill{
  display:inline-flex;
  align-items:center;
  min-height:32px;
  padding:0 11px;
  border-radius:999px;
  border:1px solid var(--line,#1f1f1f);
  background:var(--s1,#0a0a0a);
  font-size:12px;
  font-weight:600;
  color:var(--muted,#8b8b8b);
  white-space:nowrap;
}
.al-page-wrap{
  width:100%;
  max-width:1100px;
  margin:0 auto;
  padding:18px 20px 96px;
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:16px;
  align-content:start;
  min-width:0;
  box-sizing:border-box;
}

/* Interactive controls */
html:root #audioLeadsPage button,
html:root #audioLeadsPage a.al-btn{
  font:inherit;
  cursor:pointer;
}
html:root #audioLeadsPage .al-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-height:38px;
  padding:0 16px;
  border-radius:999px!important;
  border:1px solid var(--line2,var(--line,#262626))!important;
  background:transparent!important;
  color:var(--ink,#fafafa)!important;
  font-size:13.5px;
  font-weight:700;
  white-space:nowrap;
  text-decoration:none;
  transition:background-color .15s ease,opacity .15s ease,transform .12s ease;
}
html:root #audioLeadsPage .al-btn:active{
  transform:scale(.97);
}
html:root #audioLeadsPage .al-btn:disabled{
  opacity:.42;
  cursor:default;
}
html:root #audioLeadsPage .al-btn.primary{
  background:var(--ink,#fafafa)!important;
  color:var(--bg,#000)!important;
  border-color:var(--ink,#fafafa)!important;
}
html:root #audioLeadsPage .al-btn.ghost-sm{
  min-height:32px;
  padding:0 12px;
  font-size:12.5px;
  font-weight:600;
}
html:root #audioLeadsPage .al-btn.mini{
  min-height:28px;
  padding:0 10px;
  font-size:12px;
  font-weight:600;
}
html:root #audioLeadsPage .al-btn.danger:hover{
  border-color:var(--bad,#e5484d)!important;
  color:var(--bad,#e5484d)!important;
}
@media (hover:hover) and (pointer:fine){
  html:root #audioLeadsPage .al-btn:not(.primary):not(:disabled):hover{
    background:var(--s2,#111)!important;
  }
  html:root #audioLeadsPage .al-btn.primary:not(:disabled):hover{
    background:var(--ink2,#e6e6e6)!important;
  }
}

html:root #audioLeadsPage input[type="url"],
html:root #audioLeadsPage input[type="text"],
html:root #audioLeadsPage input[type="search"],
html:root #audioLeadsPage select,
html:root #audioLeadsPage textarea{
  width:100%;
  min-width:0;
  box-sizing:border-box;
  font:inherit;
  font-size:14px;
  padding:9px 12px!important;
  border-radius:12px!important;
  border:1px solid var(--line2,var(--line,#262626))!important;
  background:var(--s2,#111)!important;
  color:var(--ink,#fafafa)!important;
}
html:root #audioLeadsPage input::placeholder,
html:root #audioLeadsPage textarea::placeholder{
  color:var(--muted,#8b8b8b);
}
html:root #audioLeadsPage textarea{
  min-height:112px;
  max-height:240px;
  resize:vertical;
  line-height:1.45;
}

/* Sections */
.al-sec{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:12px;
  padding:16px;
  border:1px solid var(--line,#1f1f1f);
  border-radius:16px;
  background:var(--s1,#0a0a0a);
  min-width:0;
  box-sizing:border-box;
}
.al-sec-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}
.al-sec-label{
  font-size:12px;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--muted,#8b8b8b);
  margin:0;
}
.al-sec-meta{
  font-size:12.5px;
  color:var(--muted,#8b8b8b);
}
.al-sheet-status{
  display:inline-flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

/* Starter / saved reference sound chips */
.al-sounds{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
}
.al-sound-pill{
  display:inline-flex;
  align-items:center;
  gap:2px;
  border:1px solid var(--line2,var(--line,#262626));
  border-radius:999px;
  background:var(--bg,#000);
  color:var(--ink,#fafafa);
  min-height:36px;
  padding:2px 4px 2px 12px;
  max-width:100%;
  box-sizing:border-box;
}
.al-sound-pill[data-active="true"]{
  background:var(--ink,#fafafa);
  color:var(--bg,#000);
  border-color:var(--ink,#fafafa);
}
html:root #audioLeadsPage .al-sound-select{
  border:0!important;
  background:transparent!important;
  color:inherit!important;
  font-size:13px;
  font-weight:600;
  padding:4px 6px 4px 0;
  text-align:left;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  max-width:250px;
}
.al-sound-artist{
  font-size:11.5px;
  opacity:.72;
  margin-left:5px;
  font-weight:500;
}
.al-sound-action,
html:root #audioLeadsPage .al-sound-del{
  flex:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:28px;
  height:28px;
  padding:0 9px;
  border-radius:999px;
  border:0!important;
  background:transparent!important;
  color:inherit!important;
  text-decoration:none;
  font-size:12px;
  font-weight:600;
  opacity:.84;
  white-space:nowrap;
}
html:root #audioLeadsPage .al-sound-del{
  width:28px;
  padding:0;
  font-size:15px;
  line-height:1;
}
.al-sound-action:hover,
html:root #audioLeadsPage .al-sound-del:hover{
  opacity:1;
  background:rgba(127,127,127,.18)!important;
}
.al-sound-pill--all{
  padding-right:12px;
}

/* One focused sound-page review panel. */
.al-discover-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:14px;
}
.al-box{
  display:grid;
  gap:10px;
  align-content:start;
  padding:14px;
  border:1px solid var(--line,#1f1f1f);
  border-radius:14px;
  background:var(--bg,#000);
}
.al-box h4{
  margin:0;
  font-size:14.5px;
  font-weight:700;
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.al-box p{
  margin:0;
  font-size:12.5px;
  line-height:1.45;
  color:var(--muted,#8b8b8b);
}
.al-form-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto;
  gap:8px;
  align-items:center;
}
.al-form-row select,
.al-form-row .al-btn{
  height:40px;
  box-sizing:border-box;
}
.al-form-sound{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(160px,.7fr) auto;
  gap:8px;
  align-items:center;
  margin-top:8px;
}

/* Honest accuracy badges & callout */
.al-accuracy{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  padding:10px 12px;
  border:1px solid var(--line2,var(--line,#262626));
  border-radius:12px;
  background:var(--s2,#111);
  font-size:12.5px;
  line-height:1.45;
}
.al-tag{
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:2px 9px;
  border-radius:999px;
  background:var(--s2,#111);
  border:1px solid var(--line2,var(--line,#262626));
  color:var(--muted,#8b8b8b);
  font-size:11.5px;
  font-weight:600;
  white-space:nowrap;
}
.al-tag.exact{
  color:var(--ink,#fafafa);
  border-color:var(--ink,#fafafa);
}
.al-tag.search-tag{
  color:var(--ink,#fafafa);
}
.al-tag.dup{
  color:var(--ink,#fafafa);
  background:var(--s3,#1c1c1c);
}

/* Live feedback */
.al-msg{
  margin:0;
  padding:8px 12px;
  border-radius:10px;
  border:1px solid var(--line,#1f1f1f);
  background:var(--s2,#111);
  font-size:13px;
  font-weight:500;
  color:var(--muted,#8b8b8b);
  line-height:1.4;
}
.al-msg:empty{
  display:none;
}
.al-msg[data-tone="bad"]{
  color:var(--bad,#e5484d);
  border-color:color-mix(in srgb,var(--bad,#e5484d) 45%,var(--line,#1f1f1f));
}
.al-msg[data-tone="ok"]{
  color:var(--ink,#fafafa);
  border-color:var(--line2,var(--line,#262626));
}

/* Underline tabs */
.al-tabs{
  display:flex;
  width:100%;
  gap:0;
  border-bottom:1px solid var(--line,#1f1f1f);
}
html:root #audioLeadsPage .al-tabs button{
  flex:1 1 0;
  min-width:0;
  min-height:44px;
  padding:10px 6px!important;
  background:transparent!important;
  color:var(--muted,#8b8b8b)!important;
  border:0!important;
  border-bottom:2px solid transparent!important;
  border-radius:0!important;
  box-shadow:none!important;
  font-size:14px;
  font-weight:600;
}
html:root #audioLeadsPage .al-tabs button:hover{
  color:var(--ink,#fafafa)!important;
}
html:root #audioLeadsPage .al-tabs button[aria-pressed="true"]{
  color:var(--ink,#fafafa)!important;
  border-bottom-color:var(--ink,#fafafa)!important;
  font-weight:700;
}
.al-tabs button b{
  font-weight:600;
  opacity:.72;
  margin-left:4px;
}

/* Toolbars & bulk select bar */
.al-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}
.al-toolbar-left,
.al-toolbar-right{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.al-search{
  width:min(280px,100%);
}

/* Candidate grid & lead cards */
.al-cards{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
@media (max-width:760px){
  .al-cards{
    grid-template-columns:minmax(0,1fr);
  }
}
#alSearchResults .al-show-more-wrap{
  grid-column:1/-1;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  padding-top:6px;
}
#alSearchResults [data-show-more]{
  min-width:min(280px,100%);
}
.al-card{
  display:grid;
  grid-template-columns:auto 76px minmax(0,1fr);
  gap:12px;
  align-items:start;
  padding:12px;
  border:1px solid var(--line,#1f1f1f);
  border-radius:14px;
  background:var(--bg,#000);
  transition:opacity .15s ease,border-color .15s ease;
}
.al-card.is-tracked{
  opacity:.52;
  background:var(--s2,#111);
}
.al-card.is-selected{
  border-color:var(--ink,#fafafa);
}
.al-check{
  margin-top:4px;
  width:18px;
  height:18px;
  accent-color:var(--ink,#fafafa);
  cursor:pointer;
}
.al-thumb{
  position:relative;
  width:76px;
  height:112px;
  border-radius:10px;
  overflow:hidden;
  border:1px solid var(--line,#1f1f1f);
  background:var(--s2,#111);
  display:grid;
  place-items:center;
  color:var(--muted,#8b8b8b);
  text-decoration:none;
  flex:none;
}
.al-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.al-thumb-play{
  position:absolute;
  right:5px;
  bottom:5px;
  width:22px;
  height:22px;
  border-radius:999px;
  background:rgba(0,0,0,.72);
  color:#fff;
  display:grid;
  place-items:center;
}
.al-thumb-play svg,
.al-thumb svg{
  width:12px;
  height:12px;
  fill:currentColor;
}
.al-main{
  min-width:0;
  display:grid;
  gap:6px;
}
.al-badges{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
}
.al-card-title{
  margin:0;
  font-size:13.5px;
  font-weight:700;
  line-height:1.3;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  color:var(--ink,#fafafa);
  text-decoration:none;
}
.al-card-title:hover{
  text-decoration:underline;
  text-underline-offset:3px;
}
.al-channel-row{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
  font-size:13px;
}
.al-handle-link{
  font-weight:700;
  color:var(--ink,#fafafa);
  text-decoration:none;
  overflow-wrap:anywhere;
}
.al-handle-link:hover{
  text-decoration:underline;
  text-underline-offset:3px;
}
.al-chan-name{
  color:var(--muted,#8b8b8b);
  font-size:12.5px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  max-width:100%;
}
.al-handle-in{
  min-height:32px;
  padding:4px 9px!important;
  font-size:12.5px!important;
}
.al-card-actions{
  grid-column:1/-1;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  flex-wrap:wrap;
  padding-top:8px;
  border-top:1px solid var(--line,#1f1f1f);
}
.al-card-btns{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
}

.al-empty{
  padding:24px 16px;
  text-align:center;
  border:1px dashed var(--line2,var(--line,#262626));
  border-radius:14px;
  color:var(--muted,#8b8b8b);
  font-size:13.5px;
  line-height:1.5;
}

/* Profile sheet badge */
#cuSheet .cu-b .al-badge{
  margin-left:auto;
  padding:2px 8px;
  border-radius:999px;
  background:var(--s2,#111);
  border:1px solid var(--line,#1f1f1f);
  color:var(--ink,#fafafa);
  font-size:11.5px;
  font-weight:700;
}

html:root #audioLeadsPage button:focus-visible,
html:root #audioLeadsPage a:focus-visible,
html:root #audioLeadsPage input:focus-visible,
html:root #audioLeadsPage textarea:focus-visible,
html:root #audioLeadsPage select:focus-visible,
html:root #audioLeadsPage summary:focus-visible{
  outline:2px solid var(--ink,#fafafa)!important;
  outline-offset:2px;
}

@media (max-width:900px){
  .al-discover-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width:640px){
  #audioLeadsPage .al-vhead{
    padding:14px;
  }
  .al-page-wrap{
    padding:14px 14px 88px;
  }
  .al-sec{
    padding:12px;
  }
  .al-box{
    min-width:0;
    padding:12px;
  }
  .al-sound-select{
    max-width:140px!important;
  }
  html:root #audioLeadsPage .al-btn{
    white-space:nowrap;
    text-align:center;
    max-width:100%;
    padding:0 12px;
  }
  .al-toolbar-left,
  .al-toolbar-right{
    flex-wrap:wrap;
    gap:8px;
    width:100%;
  }
  #alCopyApproved,
  #alAppendSheet{
    flex:1 1 auto;
    justify-content:center;
  }
  .al-cards{
    grid-template-columns:1fr;
  }
  .al-card{
    grid-template-columns:auto 64px minmax(0,1fr);
    gap:10px;
  }
  .al-thumb{
    width:64px;
    height:94px;
  }
  .al-form-row{
    grid-template-columns:auto minmax(0,1fr);
  }
  .al-form-row select{
    grid-column:1/-1;
  }
  .al-form-sound{
    display:grid;
    grid-template-columns:1fr;
  }
  html:root #audioLeadsPage input[type="url"],
  html:root #audioLeadsPage input[type="text"],
  html:root #audioLeadsPage input[type="search"],
  html:root #audioLeadsPage select,
  html:root #audioLeadsPage textarea{
    font-size:16px;
  }
}

@media (prefers-reduced-motion:reduce){
  .al-card,
  html:root #audioLeadsPage .al-btn{
    transition:none;
  }
}
